-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fix issue when subsector variables not available #474
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR […] basically just improves
reportEmi
s handling of GDXs without subsector information.
That would be two year-old gdxes. Is there a use case for running remind2
on these old files?
But it's also useful because it makes the function work with GDXs written after the loop but before the postsolve,
Those gdxes still will have all the parameters, including o37_demFeIndSub
, but only with outdated values from the previous iteration, or from whatever gdx was loaded initially (i.e. the input.gdx
).
And since there's no CCS in
fixed_shares
, this shouldn't affect summations in that case.
There is CCS in fixed_shares
.
I frankly fail to see the need for this change. Do you have calls to reportEmi()
on some intermediate gdxes that are failing? If so, then we can discuss the structure of the changes. Otherwise it is just making the function more confusing with code that will never actually run.
Yes, I have calls that fail on this file here:
It happens because it's the first iteration, so postsolve wasn't run yet. In this particular case, we could skip running this step (the climate assessment) in the first iteration, but I thought it would be better to have |
I did not know only variables and sets get carried over from the So, there are a couple of options before us.
Option three is the best from a pure code perspective. Option two is the best if we are realistic about our workload. |
This PR is motivated by the implementation of the AR6 climate assessment, and basically just improves
reportEmi
s handling of GDXs without subsector information. This used to be case for compatibility with thefixed_shares
of the industry module, that has been stagnant for a while.But it's also useful because it makes the function work with GDXs written after the loop but before the postsolve, which is necessary for evaluating climate outcomes between iterations before they are needed for the damage step of postsolve. Of course, the subsector variables are not written.
In the case of operating with pre-postsolve GDXs, this can also affect some summations, notably
Emi|CO2|Energy|+|Demand
. The function wasn't designed for this in mind anyway, but the totals relevant for the climate assessment seem to work. And since there's no CCS infixed_shares
, this shouldn't affect summations in that case.