Skip to content

feat: produce future data until 2150 by default - #90

Merged
tobiasdiez merged 3 commits into
pik-piam:mainfrom
tobiasdiez:horizon-2150
Nov 11, 2026
Merged

tobiasdiez merged 3 commits into
pik-piam:mainfrom
tobiasdiez:horizon-2150

Conversation

@tobiasdiez

@tobiasdiez tobiasdiez commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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.

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.

@JakobBD JakobBD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesome, thanks!

@tobiasdiez

Copy link
Copy Markdown
Contributor Author

@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:

Image

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.

@fbenke-pik

Copy link
Copy Markdown
Contributor

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!

As of now .smootherstep, .joinContinuously and .checkFadeLength are not considered when deciding if the tool function has been updated. Only read, convert, calc and tool functions are considered to determine the hash of a function (also the actual source folders). So if the logic of any of these changes, madrat might not notice.

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)

@tobiasdiez

Copy link
Copy Markdown
Contributor Author

Thanks a lot @fbenke-pik! I've now moved the helper functions to inside the tool function.

@tobiasdiez
tobiasdiez merged commit cfc6a30 into pik-piam:main Nov 11, 2026
1 check passed
tobiasdiez added a commit to pik-piam/remind-mfa that referenced this pull request Nov 12, 2026
…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>
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.

3 participants