Skip to content

Correctly transfer the co2luc subcategories in the coupling#2395

Merged
dklein-pik merged 1 commit into
remindmodel:developfrom
dklein-pik:develop
Jul 7, 2026
Merged

Correctly transfer the co2luc subcategories in the coupling#2395
dklein-pik merged 1 commit into
remindmodel:developfrom
dklein-pik:develop

Conversation

@dklein-pik

@dklein-pik dklein-pik commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Purpose of this PR

Use the correct domain (all_enty instead of enty) for the set emiMacMagpieCO2Sub to actually transfer the co2luc subcategories in the coupling. Until now, the set-domain combination was empty, no emissions were transferred, and the values taken from the lookup table remained unchanged.

Type of change

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

  • 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)

…the coupling. Until now, the set was empty, no emissions were transferred, and the values taken from the lookup table remained unchanged.
Copilot AI review requested due to automatic review settings July 7, 2026 13:07

Copilot AI 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.

Pull request overview

Fixes the MAgPIE→REMIND coupling for CO2 land-use change (CO2LUC) subcategories by using the correct domain so that CO2LUC subcategory values are actually transferred (instead of silently iterating over an empty intersection).

Changes:

  • Update p_co2lucSub assignment to index emiMacMagpieCO2Sub over all_enty (matching its set declaration and other usages), enabling proper transfer from f_macBaseMagpie_coupling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dklein-pik
dklein-pik requested a review from merfort July 7, 2026 13:32

@merfort merfort 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.

Thanks a lot! I guess this is a candidate for the smallest REMIND PR ever 😁

@dklein-pik
dklein-pik merged commit 9d421d1 into remindmodel:develop Jul 7, 2026
4 checks passed
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