-
Notifications
You must be signed in to change notification settings - Fork 174
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
New forest recovery based on potential forest area #676
Conversation
…f_newPotForest
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.
Many thanks for this development!
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.
changes look good to me and a quick check in shinyresults suggested to me that the new implementation might be even slightly faster. Nice work!
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.
Looks very good overall. Thanks for these improvements.
I left some minor comments, mostly for clarification.
Do your test runs including the forestry sector?
It would be important to check if the new constraint for forest/forestry area expansion has major implications on plantation establishment.
|
||
q35_carbon_other(j2,ag_pools,stockType) .. | ||
vm_carbon_stock(j2,"other",ag_pools,stockType) =e= | ||
m_carbon_stock_ac(v35_other,pm_carbon_density_ac,"ac","ac_sub"); | ||
m_carbon_stock_ac(v35_other,pm_carbon_density_other_ac,"ac","ac_sub") | ||
+ m_carbon_stock_ac(v35_youngsecdf,pm_carbon_density_secdforest_ac,"ac","ac_sub"); | ||
|
||
*' The biodiversity value (BV) of primary forest, secondary forest and other land is computed by multiplying their respective land area with bii coefficients, which depend on the age class and whether the potential natural vegetation forest or non-forest (luh2 side layers). | ||
|
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 the constraint q35_min_forest(j2)
further below you can make use of the new set land_forest
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 for spotting this. Changed the equation accordingly!
@@ -47,25 +47,25 @@ if (magpie.modelstat > 2, | |||
if(s80_resolve_option = 1, | |||
display "Modelstat > 2 | Retry solve with CONOPT4 default setting"; | |||
option nlp = conopt4; | |||
magpie.optfile = 0; | |||
elseif s80_resolve_option = 2, | |||
magpie.optfile = 0; |
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 file seems content-wise unchanged. Only formatting has changed. Consider reverting.
For future work it would be good to find out why this happens and if it can be avoided.
It might be an inconsistency between editors used by different users
maybe @tscheypidi can help to sort this out for future work
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.
My editor seems to remove trailing white spaces by default.
*' the potential natural forest area minus the recovering secondary | ||
*' forest area. | ||
|
||
q35_max_forest_establishment(j2).. |
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 is the core constraint of the new imlementation, which also includes "forestry", i.e. plant, aff and npi.
Consider adding this detail in the above comment to make it clear that not only land in 35_natveg but also land in 32_forestry is affected by this constraint.
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.
done
pc35_other(j,ac) Other land per age class in current time step (mio. ha) | ||
p35_min_forest(t,j) Minimum forest and other stock based on NPI or NDC targets (mio. ha) | ||
p35_min_other(t,j) Minimum forest and other stock based on NPI or NDC targets (mio. ha) | ||
p35_damage_fader(t_all) Fader for forest damage (1) | ||
p35_forest_recovery_shr(j) Forest share in natveg recovery (1) | ||
p35_recovered_forest(t,j,ac) Recovered forest (mio. ha) |
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.
Please remove if no longer needed.
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.
p35_recovered_forest
is still used to separated what goes into v35_other
and v35_youngsecdf
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.
tom remove any ambiguity in the reporting ,p35_recovered_forest
is now renamed to p35_forest_recovery_area
.
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.
GAMS code looks good.
magpie4 R library still needs to be updated.
🐦 Description of this PR 🐦
Up to now, we used the average carbon density per cluster to determine whether other land would transform into secdforest over time. Also forestry could be expanded in all clusters, regardless of the forest potential and carbon density.
With this PR, forest expansion is only constrained to 0.5° grid cells with a carbon density of >20t/ha (which creates an area per cluster that can be used for forest expansion). This also means that carbon densities for forest are not anymore calculated based on all grid cells of a cluster but only consider cells where forest can potentially grow.
The forest potential is derived from LPJmL data and can therefore change across different RCPs.
🔧 Checklist for PR creator 🔧
Label pull request from the label list.
Self-review own code
magpie4
R library has been updated accordingly and backwards compatible where necessary.scenario_config.csv
has been updated accordingly (important ifdefault.cfg
has been updated)Document changes
CHANGELOG.md
goxygen::goxygen()
and verify the modified code is properly documentedPerform test runs
Rscript start.R --> "compilation check"
Rscript start.R --> "test runs"
Rscript start.R --> "test runs"
📉 Performance changes 📈
🚨 Checklist for reviewer 🚨
CHANGELOG
is updated correctly