magpie
magpie copied to clipboard
AgroForestry: treecover on cropland and betr
:bird: Description of this PR :bird:
This PR adds tree cover on cropland and bioenergy trees as two different AgroForestry systems to MAgPIE To intergrate cropland tree cover properly into the existing model, the following changes are applied:
- new module
29_cropland
, accouting for crop area, fallow cropland and tree cover on cropland - module
30_crop
renamed to30_croparea
, which now only accounts for crop area. - module
29_ageclass
has been renamed to28_ageclass
- SNV has been moved from
30_crop
to29_cropland
-
30_crop/penalty
and30_crop/rotation
realizations have been merged into a singe30_croparea/detail_apr24
realization - the previous
30_crop/endo_apr21
crop realization has been renamed to30_croparea/simple_apr24
- The new module
29_cropland
has two realizations:detail_apr24
andsimple_apr24
(default) - 29_cropland/detail_apr24 includes all tree cover (includign age-classes) and fallow land calculations
- 29_cropland/simple_apr24 assumes zero tree cover and fallow land.
todo: include input files for 30_croparea in additional_data.tgz.
todo: emisCO2 in magpie4 reporting
Changelog
changed
-
29_ageclass module 29_ageclass has been renamed to 28_ageclass to make space for
29_cropland
just before30_croparea
-
30_crop module
30_crop
renamed to30_croparea
, which now only accounts for crop area. -
30_crop SNV implementation has been moved from
30_crop
to29_cropland/detail_apr24
-
30_crop the two realizations
penalty_apr22
androtation_apr22
have been merged into a single30_croparea/detail_apr24
realization -
30_crop the previous
30_crop/endo_apr21
realization has been moved to30_croparea/simple_apr24
- 80_optimization Simplifed cycling through CONOPT4, CONOPT4 with OPTFILE, CONOPT4 without preprocessing and CONOPT3.
added
-
29_cropland new module
29_cropland
accounting for crop area, fallow cropland and tree cover on cropland with two realizations:detail_apr24
andsimple_apr24
(default) . -
10_land added interface
pm_land_hist
with historic land use patterns -
32_forestry added technical balance term
v32_land_missing_ndc
- default.cfg cfg$gms$s80_secondsolve option for second solve statement with 0=off as default
fixed
- 80_optimization bugfix in nlp_par. Double solve statement was not working
:wrench: Checklist for PR creator :wrench:
-
[x] Label pull request from the label list.
- Low risk: Simple bugfixes (missing files, updated documentation, typos) or changes in start or output scripts
- Medium risk: Uncritical changes in the model core (e.g. moderate modifications in non-default realizations)
- High risk: Critical changes in model core or default settings (e.g. changing a model default or adjusting a core mechanic in the model)
-
[ ] Self-review own code
- No hard coded numbers and cluster/country/region names.
- The new code doesn't contain declared but unused parameters or variables.
-
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)
-
[x] Document changes
- Add changes to
CHANGELOG.md
- Where relevant, put In-code documentation comments
- Properly address updates in interfaces in the module documentations
- run
goxygen::goxygen()
and verify the modified code is properly documented
- Add changes to
-
[x] Perform test runs
-
Low risk:
- Run a compilation check via
Rscript start.R --> "compilation check"
- Run a compilation check via
-
Medium risk:
- Run test runs via
Rscript start.R --> "test runs"
- Check logs for errors/warnings
- Run test runs via
-
High risk:
- Run test runs via
Rscript start.R --> "test runs"
- Check logs for errors/warnings
- Default run from the PR target branch for comparison
- Provide relevant comparison plots (land-use, emissions, food prices, land-use intensity,...)
- Run test runs via
-
Low risk:
:chart_with_downwards_trend: Performance changes :chart_with_upwards_trend:
- Current develop branch default : 27 mins
- This PR's default : 27 mins
:rotating_light: Checklist for reviewer :rotating_light:
- PR is labeled correctly
- Code changes look reasonable
- No hard coded numbers and cluster/country/region names.
- No unnecessary increase in module interfaces
- model behavior/performance is satisfactory.
- Changes are properly documented
-
CHANGELOG
is updated correctly - Updates in interfaces have been properly addressed in the module documentations
- In-code documentation looks appropriate
-
- [ ] content review done (at least 1)
- [ ] RSE review done (at least 1)
A few documentation changes. Seems good to me, but should be done analogous for all 3 realizations. Please let me know if you need help with understanding the penalty implementation!
Sure. This will be included in all 3 realizations once we agreed that the overall approach is fine.