Skip to content

Fix non-CO2 MACC price handling and emission accounting inconsistencies (audit results) - #2537

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

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

Conversation

@simonkrogmann

@simonkrogmann simonkrogmann commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of this PR

Eight small, independent fixes in the emissions-related code: non-CO2 MAC (marginal
abatement cost curve) price lookup, air-pollutant emission factors, regional emission-cap
allocation, and unit documentation. None of them touches the default CO2 accounting path;
items 1, 2, 5 and 6 change results in the affected switches.

Changes

  1. core/datainput.gms: remove sm_dmac = 5 override for PBL_2007 MACCs.
    core/declarations.gms already sets sm_dmac = 5 * sm_D2005_2_D2017 (PBL_2007) and
    20 * s_D2010_2_D2017 (PBL_2022) so that the MAC price step is in US$2017/tCeq.
    The later assignment in datainput.gms reset the PBL_2007 step to 5 US$2005/tCeq,
    so the deflator introduced in d7490b4 had no effect for that MACC version.
    The default PBL_2022 path is unaffected.

  2. core/presolve.gms: use the AR4 methane GWP in the gas-price conversion for the CH4 MAC step.
    The MAC step for ch4gas/ch4coal is driven by the maximum of the carbon price and the
    gas-price increase since 2005. The carbon price is rescaled with 25/s_gwpCH4 so that it
    sits on the AR4-based price axis of the MACC data, but the gas price was converted to
    US$/tCeq with the AR5 GWP (28). Both prices now use the same AR4 basis (s_gwpCH4_AR4).
    Effect: the gas-price driven abatement step is about 12 % higher than before.

  3. core/declarations.gms: correct unit description of p_histEmiMac and p_histEmiSector.
    The input files (mrcommons calcHistEmissions) are in Mt CO2, Mt CH4 and Mt N2O, and
    presolve.gms divides the N2O values by 44/28 accordingly. The description said
    [GtC, Mt CH4, Mt N]. Documentation only.

  4. core/datainput.gms: fix units in the cm_altFeEmiFac comments.
    The derived numbers 73.33 and 107.31 are MtCO2/EJ, not GtC/TWa, and the source values
    are GtC/ZJ, not "zeta joule". Comment only.

  5. modules/11_aerosols/exoGAINS2025/datainput.gms: global mean emission factor divided by card(regi).
    p11_EF_mean divided the regional sum by a hard-coded 11. The default H12 mapping has
    12 regions and EU21 has 21, so the mean used in the pollution-cost calculation was
    biased by card(regi)/11.

  6. modules/41_emicapregi/AbilityToPay/datainput.gms: ** 1/3 replaced by **(1/3).
    In GAMS ** binds tighter than /, so the expression was a division by 3 instead of
    the cube root described in the comment and the parameter description. The factor 1/3
    cancels in p41_correct_factor, but the regional allocation was linear in relative
    GDP per capita instead of cube-root.

  7. modules/41_emicapregi/PerCapitaConvergence/datainput.gms: fix misspelled p41_shEmi20200.
    The symbol is not declared (p41_shEmi2020 is), so this realization did not compile.

  8. Unit and switch names in comments and descriptions.
    p11_emiFacAP is Tg(species)/TWa as in the input-file header, not Gt; the bunker
    subtraction comment in core/postsolve.gms referred to cm_bunkerscen while the code
    uses c_budgetscen.

Open question for reviewers (not changed in this PR)

The direction of the AR4 correction of the carbon price itself (p_priceCO2forMAC * (25/28)
for CH4, (298/265) for N2O in presolve.gms) looks inverted: REMIND values 1 t CH4 at
28*(12/44) tC, while a MAC step at AR4 price p costs p25(12/44) US$/tCH4, so the lookup
price should be P*28/25. The correction is also applied only to the MAgPIE sectors and to
ch4gas/ch4coal, while p_emi_quan_conv_ar4 treats all CH4/N2O MAC sectors as AR4-based.
This needs confirmation of how the MACC input data were built before changing it.

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?):

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