-
Notifications
You must be signed in to change notification settings - Fork 48
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
replace stationary by ONONSPEC projection #644
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.
Thanks, the implementation looks good and makes sense and I find most of the resulting projections reasonable (with few exceptions). Let me know if you want me to look at some more details.
periodEOH <- max(x$period) | ||
coefs <- data.frame(periodEOH = periodEOH, | ||
slopeEOH = coef(m)[["period"]], | ||
valueEOH = predict(m, list(period = periodEOH))) |
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.
valueEOH = predict(m, list(period = periodEOH))) | |
valueEOH = predict(m, data.frame(period = periodEOH))) |
Not sure if this makes much of a difference, but usually predict
takes data frames.
yes, the second version looks better, especially when looking at REF :-) |
Thanks @robertpietzcker. If you could quickly answer these questions (or approve my suggestions). Thanks!
|
yes, looks good to me. |
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.
I can't comment on the R code, but the results look good
This PR introduces a new projection of non-specified IEA balance flows that are currently mapped to buildings. A different allocation across sectors proposed in #609 is not subject of this PR.
status quo
There is a very old file that has SSP1 - SSP5 scenarios for all demand mapped to industry and buildings. All energy demand that is mapped to buildings but not represented in EDGE-B currently comes from this file as "stationary". In
convertStationary
, the outdated historic demand from the file is replaced by current IEA balance data that linearly transitions to the projections in the file when going into the future. The respective flows belong to the IEA flowONONSPEC
- other non-specified demand. Even though we have no idea what this is, there are different projections either approaching zero or higher values. In the most striking example, we see exponentially increasing historic electricity demand in CHN but a decay towards zero in the projections.change
This PR gets rid of the file overall. Instead we now project the IEA demand dynamically based on the most recent historic observations. As we have no idea, where the demand comes from, I want to avoid to make too specific assumptions for the future, so we just continue with the recent slope and then approach a constant value.
method
We assume an asymptotic model. It start from the level$x_0$ at the end of history (EOH) and with the EOH slope $\dot{x}_0$ and approaches the fraction $\epsilon$ of this slope within $\Delta t$ . Both $x_0$ and $\dot{x}_0$ are determined through a linear regression of the last $n$ time steps.
with the decay rate
The method requires the following parameters. I indicated my current choice
scenarios
I had a hard time thinking of a scenario differentiation for the projections as we had them with stationary before. @robertpietzcker, do you think this is necessary? As a first example, I created a$\Delta t$ . We can adjust the parameterisation and would have to map the level scenarios to SSPs.
low
,med
andhigh
scenario referring to the long-term projection level by differentiatingThis is a comparison of the projections showing the new scenarios as thick lines and the old ones in thin lines. Mind that the old scenarios are without my hot fix in #635.

implementation
This one is for @fbenke-pik: I currently get the relevant IEA flows through
calcOutput("IOEdgeBuildings", subtype = "output_EDGE")
. This gives me the stationary IEA flows in buildings. From these, I still filter only those flows that are not represented in EDGE-B. This works fine but seems a bit intransparent. It might be better to update the mappingstructuremappingIO_outputs.csv
to get just the flows we need here and not the ones represented in EDGE-B. Not sure if this would come with an overall change tomrcommons:calcIOEdgeBuildings
and what cache implications would be.