Skip to content

Audit PE and inital calibration (audit results) - #2540

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

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

Conversation

@simonkrogmann

@simonkrogmann simonkrogmann commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of this PR

Seven small, independent fixes in trade, fossil, biomass, PE/FE parameter and initial-capacity
code. Items 1 to 3 change results slightly; the rest is documentation.

Changes

  1. modules/24_trade/standard/bounds.gms: export redistribution in the initial year sums over the right regions.
    The extra exports that compensate the import corrections are distributed to regions
    without a correction, proportional to their share in exports of "regions with no balance
    problems". The denominator used regi instead of regi2 inside the sum, so it summed
    over all regions and the 2005 fixed trade was not globally balanced.

  2. modules/31_fossil/grades2poly/bounds.gms: rent-discount clamp starts in the same year as the ramp.
    p31_rentdisctot ramps linearly from s31_fuEx_startyr (2005) to p31_rentdisc2 over
    p31_rentconv years, but the clamp to p31_rentdisc2 applied only after 2010 + p31_rentconv.
    In between the factor overshot the target (oil with defaults: 0.97 in 2060, then 0.9 in 2065).
    Commit f7692fc replaced cm_startyear with s31_fuEx_startyr in the ramp but left the
    hard-coded 2010 in the clamp.

  3. modules/05_initialCap/on/preloop.gms: residue-capacity vintages use the same depreciation index as q_cap.
    p05_cap_res used pm_omeg(regi,opTimeYr,te) without the opTimeYr+1 shift and the
    opTimeYr.val ge 1 guard that q_cap and every other replica of the pattern in this file
    use. The implied standing capacity of residue-using technologies, and hence pm_pedem_res,
    was depreciated one year less than the model's own capacity equation. Effect is small.

  4. modules/04_PE_FE_parameters/iea2014/declarations.gms: descriptions of pm_fuExtrOwnCons and pm_histfegrowth.
    The first index of pm_fuExtrOwnCons is the energy carrier consumed and the second the
    extracted fuel, the inverse of what the description said. pm_histfegrowth is computed
    from 1995 to 2010 (exponent 1/15), not 1995 to 2005.

  5. modules/31_fossil/grades2poly/datainput.gms: description of f31_ffPolyCumEx.
    It was a copy of the f31_ffPolyRent description; the parameter holds the minimum and
    maximum cumulative extraction of the polynomial cost curves.

  6. core/datainput.gms: p_histProdSe is read in TWh/yr.
    The description said TWa; the input-file header is TWh/year and the code divides by
    sm_TWa_2_TWh directly afterwards.

  7. Comments aligned with code. Trade bounds: 2 % growth (not 1 %) and years 2010, 2015,
    2020. Biomass production limit applies from max(2010, cm_startyear), not 2035.
    Gas split comment: 85/15 as coded (p04_shareNGTinGas = 0.15). Eta recalibration fades
    out linearly until 2030, not 2025 or "next 15 years".

Open points (not changed here)

  • 24_trade bounds lines 36-38: the comment says imports are set to 80 % of PE demand plus
    exports, the code uses 100 %, and the correction formula ignores import losses that the
    trigger condition accounts for. Needs a decision on which side is intended.
  • 04 datainput: whether the gas split for low-gas regions was meant to be 85/15 or 80/20 is
    unknown; the comment was aligned to the code.

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
  • ◻️ 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
.

  • 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 PE and inital calibration Audit PE and inital calibration (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