-
Notifications
You must be signed in to change notification settings - Fork 167
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
dynamic age-class subset for plantation establishment depending on time step length #207
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.
In principle it looks good to go but I added some requests.
Also can you edit the PR using the draft template from https://raw.githubusercontent.com/magpiemodel/magpie/7c481557d9ecf66582ab92c7e875259cad33228c/.github/pull_request_template.md
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.
Thank you for addressing the small changes. For me looks good to go!
@tscheypidi we still need RSE side approval for bugfix PRs? |
Please fill following information wherever applicable.
Purpose of this PR
Problem: Time steps with a length of more than 5 years cause gaps in the age-class structure of timber plantations.
So far, we manipulatd the level of v32_land in postsolve such that additions to plantations are distrubted over several age-classes (e.g. ac0 and ac5 for a 10 year time step). However, this is bad practice because it causes inconsistencies with carbon stocks, and problems with the carbonstock function in the magpie4 R library.
Now, there is a dynamic subset "ac_est", which depedends on the time step length (e.g. ac0 and ac5 for a 10 year time step). Together with the new constraint "q32_forestry_est" this allows to distribute the establishment over several age-classes within the optimization. This makes sure that carbon stocks (and all other variables) are consistent. Manipulations in postsolve are no longer needed. The carbonstock function in the magpie4 R library has been updated accordingly.
The counterpart of ac_est is ac_sub, which is also dynamic. This required a change in the declaration of some variables and paramters. Several unnecessary sets and parameters have been removed.
Performance loss/gain from current default behavior
No difference in run time.
Type of change
How Has This Been Tested?
forestry_test start script.
One run before the bugfix. One run after the bugfix.
Default configuration additions/changes:
Checklist:
CHANGELOG.md
goxygen::goxygen()
for the new/updated parts.magpie4
R library for post processing of model output (ideally backward compatible).Special comments/warnings
Resources_Land_Cover_Forest_Managed_Forest_Plantations.pdf
Emissions_CO2_Land_Land_use_Change-10.pdf