Skip to content

Audit core, macro and units (audit results) - #2541

Open
simonkrogmann wants to merge 1 commit into
remindmodel:developfrom
simonkrogmann:audit-core
Open

simonkrogmann wants to merge 1 commit into
remindmodel:developfrom
simonkrogmann:audit-core

Conversation

@simonkrogmann

@simonkrogmann simonkrogmann commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of this PR

Six small, independent fixes. Item 1 changes which equations are generated; items 2 and 3
touch currently inactive code; the rest is documentation.

Changes

  1. core/equations.gms: operator precedence in q_limitCapFeH2BI.
    The condition was build OR indst AND t.val ge max(2015, cm_startyear). GAMS binds AND
    tighter than OR, so the start-year filter applied to industry only and the buildings
    equation was generated for all years, including fixed years before cm_startyear.
    Parentheses added so the filter applies to both sectors, as in q_capH2BI above it.

  2. modules/01_macro/*/equations.gms: offset index in q01_limtRatioPpfen.
    The denominator factor for in2 used pm_cesdata(t,regi,in,"offset_quantity"); it should
    use in2, as in q01_limitShPpfen. Fixed in both realizations. Currently inactive, since
    p01_ppfen_ratios is always 0.

  3. core/preloop.gms: level initialisation of vm_prodFe was a no-op.
    vm_prodFe.l(ttot,regi,entyFe2,entyFe2,te) = 0 addressed only diagonal elements
    (SE equal to FE), which do not exist. Now (entySe,entyFe), matching the other
    initialisations in the block.

  4. modules/33_carbonRemoval/portfolio/declarations.gms: s33_OAE_efficiency description.
    It is ocean CO2 uptake per unit CaO [GtC / Gt CaO], as computed and used in datainput;
    the description said the inverse (Gt rock per GtC).

  5. modules/39_carbonUtilization/on/declarations.gms: p39_co2_dem is in GtC/TWa.
    It is derived from pm_emifac (GtC/TWa) and compared with vm_co2CCUshort (GtC/a);
    the description said tC/TWa.

  6. Comments. core/bounds.gms: early retirement is allowed between 2010 and 2110 as
    coded, not 2015 to 2100. modules/80_optimization/nash/declarations.gms: the goods
    surplus tolerance is in trillion US$2017/yr (the code uses 100/1000 T$), not million.

Type of change

Indicate the items relevant for your PR by replacing ◻️ with ☑️.
Do not delete any lines. This makes it easier to understand which areas are affected by your changes and which are not.

Parts concerned

  • ☑️ GAMS Code
  • ◻️ R-scripts
  • ◻️ Documentation (GAMS incode documentation, comments, tutorials)
  • ◻️ Input data / CES parameters
  • ◻️ Tests, CI/CD (continuous integration/deployment)
  • ◻️ Configuration (switches in main.gms, default.cfg, and scenario_config*.csv files)
  • ◻️ Other (please give a description)

Impact

  • ☑️ Bug fix
  • ◻️ Refactoring
  • ◻️ Deletion
  • ◻️ Documentation / comments
  • ◻️ New feature
  • ◻️ Change of parameter values or input data (including CES parameters)
  • ◻️ Minor change (default scenarios show only small differences)
  • ◻️ Fundamental change of results of default scenarios

Checklist

Do not delete any line. Leave unfinished elements unchecked so others know how far along you are.
In the end all checkboxes must be ticked before you can merge
.

Note: This is not required for documentation PRs that only touch tutorials/ or *.md/*.Rmd files.

  • I executed the automated model tests (make test) after my final commit and all tests pass (FAIL 0)
  • I adjusted the reporting in remind2 if and where it was needed
  • I adjusted the madrat packages (mrremind and other packages involved) for input data generation if and where it was needed
  • My code follows the coding etiquette
  • I explained my changes within the PR, particularly in hard-to-understand areas
  • I checked that the in-code documentation is up-to-date
  • I adjusted forbiddenColumnNames in readCheckScenarioConfig.R in case the PR leads to deprecated switches
  • I updated the CHANGELOG.md correctly (added, changed, fixed, removed, input data/calibration)

Further information (optional)

  • Runs with these changes are here:
  • Comparison of results (what changes by this PR?):

@simonkrogmann simonkrogmann changed the title Audit core, macro and units Audit core, macro and units (audit results) Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant