Skip to content

Rewriting 46/netZero - #2307

Merged
lecfab merged 28 commits into
remindmodel:developfrom
lecfab:ngfs
Mar 19, 2026
Merged

Rewriting 46/netZero#2307
lecfab merged 28 commits into
remindmodel:developfrom
lecfab:ngfs

Conversation

@lecfab

@lecfab lecfab commented Mar 12, 2026

Copy link
Copy Markdown
Contributor
  • Update national net-zero targets for NGFS, using the work by @RahelMA on ELEVATE: net-zero #2303
  • Rewrite the code for more clarity and maintainability
  • Add a macro for linear interpolation, that can simplify common equations that are prone to error
  • Correct typos
  • remove NDC realisation, as all NDC mechanisms happen in module 45 (and no config file was using 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?):

@lecfab
lecfab requested review from RahelMA and fschreyer March 12, 2026 02:05

@RahelMA RahelMA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Fabrice, for cleaning the 46 module! It looks really nice now!

Overall I have just some minor comments (e.g., I noticed little errors I introduced)...

Maybe you can provide some description of the difference of cm_netZeroScen? Do I understand it correctly, that the ELEVATE offset calculation is now the new default? And we only have two divergences:

  1. ELEVATE with 100 offset in EUR
  2. NGFS 20% reduction?

Would be helpful to have this overall description maybe in the realization, what do you think?

Comment thread modules/46_carbonpriceRegi/NDC/datainput.gms Outdated
Comment thread core/bounds.gms
Comment thread core/sets.gms
Comment thread modules/46_carbonpriceRegi/netZero/datainput.gms Outdated
Comment thread modules/46_carbonpriceRegi/netZero/sets.gms Outdated
Comment thread main.gms Outdated
Comment thread modules/46_carbonpriceRegi/netZero/datainput.gms Outdated
Comment thread modules/46_carbonpriceRegi/netZero/postsolve.gms Outdated

@fschreyer fschreyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, unfortunately I am not really familiar with this module.

Thanks for all typo corrections etc.

I adapted one of the descriptions. Hope that worked.

Comment thread core/declarations.gms
Comment thread core/sets.gms
@fschreyer

This comment was marked as resolved.

Comment thread modules/46_carbonpriceRegi/netZero/postsolve.gms Outdated
@lecfab
lecfab requested review from RahelMA and lea-hayez March 16, 2026 13:21
Comment thread modules/46_carbonpriceRegi/netZero/datainput.gms
Comment thread modules/46_carbonpriceRegi/netZero/datainput.gms
Comment thread modules/46_carbonpriceRegi/netZero/datainput.gms Outdated
*' pm_taxCO2eqRegi grows linearly from zero in cm_LTSstartYr to p46_taxCO2eqRegiInitial in the target year, then back toward zero in 2200.
p46_taxCO2eqRegiInitial = 100 * sm_DptCO2_2_TDpGtC; !! [$/tCO2 converted to T$/GtC]
loop((regi,t,targetSpecies) $ p46_netZeroTargetCoverage(regi,t,targetSpecies),
pm_taxCO2eqRegi(t2,regi) $ (cm_LTSstartYr <= t2.val and t2.val <= t.val) = macro_interpolate(t2.val, cm_LTSstartYr-5, t.val, 0, p46_taxCO2eqRegiInitial);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused we now only use cm_LTSstartYr for pm_taxCO2eqRegi, do I understand it correctly that we don't need this in postsolve for calculating the mark-up as we only initialize it here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the algorithm only rescales the markup at the target year. Then the shape is fixed, going up linearly from cm_LTSstartYr to the target year, and down again until the (future) switch cm_LTSendYr if activated

Comment thread modules/46_carbonpriceRegi/netZero/declarations.gms
Comment thread modules/46_carbonpriceRegi/netZero/postsolve.gms Outdated
@lecfab lecfab changed the title 46/netZero realisation for NGFS: update and refactoring Rewriting 46/netZero Mar 17, 2026
@lecfab
lecfab merged commit 325a56a into remindmodel:develop Mar 19, 2026
3 of 4 checks passed
@RahelMA RahelMA mentioned this pull request Mar 20, 2026
8 tasks
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.

3 participants