Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure lower bound on vm_cesIO is at least the offset_quantity, to prevent negative net energy consumption #1404

Conversation

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q
Copy link
Member

Net vm_cesIO (i.e. vm_cesIO + pm_cesdata("offset_quantity"), the latter being negative) was not limited at zero on the pf level, only on the pf-sum. Specifically, while the sum of all hydrogen net consumption in industry would be 0 in 2010 (so equal production of 0), individual industry subsectors would consume more feh2_ than indicated by their offset quantity (and others less), resulting in (very small) negative net consumption, which showed up when looking into a industry reporting issue (#1399).
I extended this to all lower bounds on vm_cesIO. Other modules probably are not affected, but this was faster then checking all production factors individually.

  • Bug fix

Checklist:

  • My code follows the coding etiquette
  • I performed a self-review of my own code
  • 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 the reporting in remind2 where it was needed
  • I adjusted forbiddenColumnNames in readCheckScenarioConfig.R in case the PR leads to deprecated switches
  • All automated model tests pass (FAIL 0 in the output of make test)
  • The changelog CHANGELOG.md has been updated correctly

Further information (optional):

  • Test runs are here: /p/tmp/pehl/Remind/output/SSP2EU-Base_2023-09-07_11.37.01
  • Comparison of results (what changes by this PR?): /p/tmp/pehl/Remind/compScen-2023-09-11_12.42.07-H12.pdf

Copy link
Contributor

@robinhasse robinhasse left a comment

Choose a reason for hiding this comment

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

Sounds and looks reasonable 👍

Copy link
Contributor

@orichters orichters left a comment

Choose a reason for hiding this comment

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

I have to admit I have not fully understood the role of the offset quantities, so I can just say that the changes look not implausible. Or rather: I trust you this fixes a problem while I can't see how this could create new ones.

@mleimbach
Copy link
Contributor

Makes sense for me as well.

@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q merged commit 526db85 into remindmodel:develop Sep 12, 2023
2 checks passed
@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q deleted the fix/vm_cesIO_underrunning_offset branch September 12, 2023 06:34
@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q
Copy link
Member Author

I have to admit I have not fully understood the role of the offset quantities

Growth of production factors is essentially multiplicative. If a production factor is zero, it will stay zero, no matter how high one cranks the efficiency parameter of that factor. So for factors that just are zero (hydrogen in 2005–15), we have the offset quantities, so that there is no production on the ESM side while there is some (virtual) consumption inside the CES function.

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