Skip to content

replace cm_startIter_EDGET with set#2283

Merged
fbenke-pik merged 20 commits intoremindmodel:developfrom
fbenke-pik:oneRegi
Mar 19, 2026
Merged

replace cm_startIter_EDGET with set#2283
fbenke-pik merged 20 commits intoremindmodel:developfrom
fbenke-pik:oneRegi

Conversation

@fbenke-pik
Copy link
Copy Markdown
Contributor

@fbenke-pik fbenke-pik commented Feb 9, 2026

Purpose of this PR

  • Adjust configuration mechanism for iterations that should run EDGE-Transport to match the configuration for MAgPIE coupling. The iterations are now listed explicitly via c_transportIter rather than via some hard coded logic and a start iteration cm_startIter_EDGET
  • Add a new scenario config config/tests/scenario_config_oneRegiPlus.csv and config/tests/scenario_config_magpie_oneRegiPlus.csv that showcases how to do oneRegi runs with more than one iteration as well as with EDGE-T and MAgPIE coupled between iterations.

Usage

  • without MAgPIE coupling Rscript start.R config/tests/scenario_config_oneRegiPlus.csv
  • with MAgPIE coupling Rscript start.R config/tests/scenario_config_magpie_oneRegiPlus.csv

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: /p/tmp/benke/model/remind_onereg/output

@fbenke-pik fbenke-pik marked this pull request as ready for review March 17, 2026 15:11
@@ -0,0 +1,2 @@
title;start;magpieIter;no_ghgprices_land_until
testOneRegiMAgPIE;1;3;y2150
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we want to add this config file?

Copy link
Copy Markdown
Contributor Author

@fbenke-pik fbenke-pik Mar 18, 2026

Choose a reason for hiding this comment

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

If I understood @dklein-pik correctly, this is necessary for coupled runs, as the MAgPIE config settings need a file with a name mirroring the REMIND config file

Copy link
Copy Markdown
Contributor

@dklein-pik dklein-pik left a comment

Choose a reason for hiding this comment

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

Thanks. Looks good to me. I have two minor naming suggestions:

  • usually the filename of the magpie config is the name of the standalone config with _magpie appended, i.e. could you rename scenario_config_magpie_oneRegiPlus.csv to scenario_config_oneRegiPlus_magpie.csv?
  • to make it clear that the transport iterations are iterations in which EDGE-T is running, I would recommend including EDGE-T in the names of the switch and the set, e.g., c_EDGEtransportIter, if you agree. Or even better c_IterEDGETransport (which I should adapt for c_magpieIter as well).

Comment thread standalone/MOFEX/MOFEX.gms
Comment thread main.gms
@ahagen-pik
Copy link
Copy Markdown
Contributor

Thank you Falk!

I added two comments. One for understanding and one request to change the iteration numbers. I also agree with David's suggestion to add EDGE to the var name. Maybe camel case like that c_edgeTransportIter

@fbenke-pik
Copy link
Copy Markdown
Contributor Author

fbenke-pik commented Mar 19, 2026

usually the filename of the magpie config is the name of the standalone config with _magpie appended, i.e. could you rename scenario_config_magpie_oneRegiPlus.csv to scenario_config_oneRegiPlus_magpie.csv?

@dklein-pik I think this is not the case. The file needs to be called scenario_config_magpie...

After renaming a test fails

Failure (test_01-readCheckScenarioConfig.R:14:5): perform readCheckScenarioConfig with scenario_config_oneRegiPlus_magpie.csv
Expected `readCheckScenarioConfig(csvfile, remindPath = "../../", testmode = TRUE)` not to throw any warnings.
Actually got a <simpleWarning> with message:
  Unknown column names: magpieIter, no_ghgprices_land_until

because here, the file is not acknowledged to be a magpie config
https://github.com/remindmodel/remind/blob/develop/scripts/start/readCheckScenarioConfig.R#L19

Also, there are other files named like this config/tests/scenario_config_magpie_shortCascade.csv

Will go back to previous name.

@dklein-pik
Copy link
Copy Markdown
Contributor

@dklein-pik I think this is not the case.

You are absolutely right. Sorry for the extra work. I don't know how I came up with that. How embarrassing.

@fbenke-pik fbenke-pik merged commit e2974ee into remindmodel:develop Mar 19, 2026
2 checks passed
@fbenke-pik fbenke-pik deleted the oneRegi branch March 19, 2026 11:32
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.

4 participants