Fix summation errors in CO2 land use also for coupled runs#2403
Merged
Conversation
…ndalone runs. This commit adds the same correction also for coupled runs. This is necessary because in coupled runs the values are updated and the correction needs to be applied to this update mechanism as well.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts how p_co2lucSub (CO2 land-use subcategories passed through for reporting) is populated in coupled REMIND–MAgPIE runs so that values for years before cm_startyear remain consistent with the fixing/reference mechanism (as already implemented for standalone runs in #2389).
Changes:
- Restrict the coupled-run overwrite of
p_co2lucSubincore/presolve.gmsto only affect years ≥cm_startyear. - Clarify comments in
core/datainput.gmsaround whenp_co2lucSubis loaded frominput_ref.gdxvs. overwritten from lookup/coupling sources.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| core/presolve.gms | Limits coupled-run overwrite of p_co2lucSub to years ≥ cm_startyear (to avoid breaking fixing for earlier years). |
| core/datainput.gms | Comment clarification about p_co2lucSub being loaded from input_ref.gdx and overwritten for years ≥ cm_startyear. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
This is a follow-up to #2389 that corrected the fixing to a reference runs for
p_co2lucSub. However, the fix only worked for standalone runs. This PR corrects the fixing also for coupled runs.Important note: this fix is only about
p_co2lucSub, which is a parameter that is only passed through REMIND to the reporting. The wrong fixing did not have any impact on the optimization.Type of change
Parts concerned
Impact
Checklist
make test) after my final commit and all tests pass (FAIL 0)remind2if and where it was neededforbiddenColumnNamesin readCheckScenarioConfig.R in case the PR leads to deprecated switchesCHANGELOG.mdcorrectly (added, changed, fixed, removed, input data/calibration)