Repository navigation
feat: produce future data until 2150 by default - #90
Conversation
REMIND runs until 2150, and thus needs projections from remind-mfa until then. Here, we set fullMFA therefore to end_future = 2150 as preparetion for the remind-mfa extension. Note: Population, GDP and EDGE-B floorspace are spline smoothed until 2100 only, the later years are kept unsmoothed due to their low data quality. As the spline does not pass through the further data, splicing the two left a jump in level and slope between 2100 and 2101 (e.g. the yearly population decline of the eu21 regions doubled in 2101, the yearly GDP per capita gain of CHA halved). toolHistoricallyConsistentSmoothing therefore corrects the deviation. Population and GDP until 2100 are unchanged; floorspace changes by up to 0.5% in 2096-2099, since it is interpolated to yearly values from 5-year steps after the smoothing.
|
@fbenke-pik is it okay to use helper functions like this in tools? I remembered that there were issues with extracted functions and madrat caching, but I'm not totally sure if this also applies to tools and where the exact limitation is. Thanks! @bennet21 I had a look at what we discussed, and the easy solution would be to first interpolate and then smooth (only smoothing using the current function is not possible as it returns only at the same resolution). But I'm not sure the results is that nice:
It also has other issues - like what happens to "historic" years that are common to different scenarios for which the future values then change the smoothing of the historic years. So I would revisit this topic in a new PR. |
As of now Easiest way to fix it is to move them simply into the tool function (preferred). Alternatively, make them tool functions (clumsy in my eyes). Third option is using control flags in functions to explicitly include or exclude them from cache monitoring, but it is rarely used in our packages and I haven't tried myself recently (read more here) |
|
Thanks a lot @fbenke-pik! I've now moved the helper functions to inside the tool function. |
…dustry) (#332) The model years are currently listed per model in time.csv and historical_time.csv. These files are removed here, and the time dimensions now follow from three model switches: start_historical and end_historical, and end_future (2100 by default and 2150 in mrindustry). The parameter reader crops the input data to this horizon. Years outside are dropped, so an archive with a longer future or history also serves shorter runs. Data that ends before end_future or end_historical, or that starts after start_historical in every parameter, was filled with zeros by flodym. It now raises an InputHorizonError naming the parameter and the switch. The IAMC exports take start_year and end_year instead of a "start:stop" string. Without end_year, the default, they end with end_future. Depends on pik-piam/mrmfa#90, which makes mrmfa produce future data until 2150. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pik-piam-bot[bot] <335062343+pik-piam-bot[bot]@users.noreply.github.com>

REMIND runs until 2150, and thus needs projections from remind-mfa until then. Here, we set fullMFA therefore to
end_future = 2150 as preparetion for the remind-mfa extension.
Note: Population, GDP and EDGE-B floorspace are spline smoothed until 2100 only, the later years are kept unsmoothed due to their low data quality. As the spline does not pass through the further data, splicing the two left a jump in level and slope between 2100 and 2101 (e.g. the yearly population decline of the eu21 regions doubled in 2101, the yearly GDP per capita gain of CHA halved).
toolHistoricallyConsistentSmoothing therefore corrects the deviation. Population and GDP until 2100 are unchanged while floorspace changes by up to 0.5% in 2096-2099, since it is interpolated to yearly values from 5-year steps after the smoothing.