Skip to content

Commit

Permalink
Merge pull request #472 from magpiemodel/rc
Browse files Browse the repository at this point in the history
Release of 4.6.0
  • Loading branch information
pfuehrlich-pik authored Nov 9, 2022
2 parents a1944d1 + 51f788d commit 0c46827
Show file tree
Hide file tree
Showing 257 changed files with 5,954 additions and 3,887 deletions.
97 changes: 44 additions & 53 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,49 @@
## :bird: Purpose of this PR :bird:
## :bird: Description of this PR :bird:

- Briefly explain the purpose of this pull request

## :wrench: Checklist for PR creator :wrench:

- [ ] Labeling pull request correctly [from the label list](https://github.com/magpiemodel/magpie/labels).

* Low risk : Simple bugfixes (missing files, updated documentation, typos) or Start/output scripts
* Medium risk : New realization / Changes to existing realization / Other changes which don't modify default.cfg
* High risk : New input files (if cfg$input is changed in default.cfg) / Modification to core model (eg. changes in equations, calculations, introduction of new sets etc.) / Other changes in default.cfg

- [ ] Providing additional information based on PR label

* Low risk : No new model run needed.
* Medium risk : Default run based on the current version of the fork from which PR is made
* High risk
* Default run from the current develop branch
* Default run based on the current version of the fork from which PR is made

- [ ] :chart_with_downwards_trend: Performance loss/gain from current default behavior :chart_with_upwards_trend:
* Current develop branch default : ** mins
* This PR's default : ** mins

- [ ] Added changes to `CHANGELOG.md`
- [ ] Compilation check (model starts without compilation errors - use `gams main.gms action=c` in model folder for testing).
- [ ] No hard coded numbers and cluster/country/region names.
- [ ] The new code doesn't contain declared but unused parameters or variables.
- [ ] Where relevant, In-code comments added including documentation comments.
- [ ] Made sure that documentation created with [`goxygen`](https://github.com/pik-piam/goxygen) is okay (use `goxygen::goxygen()` for testing).
- [ ] Changes to [`magpie4`](https://github.com/pik-piam/magpie4) R library for post processing of model output (ideally backward compatible).
- [ ] Self-review of my own code.
- [ ] In case of updated cellular input tgz file in default.cfg: scenario_config.csv has been updated accordingly (rcp1p9, rcp2p6 etc)
- [ ] For high risk runs: validation of major model indicators - Land-use, emissions, food prices, Tau. %Delete this line in case it is not a high risk run%

## :warning: Additional notes or warnings :warning:
NA

## :rotating_light: Checklist for RSE reviewer :rotating_light:

- [ ] PR is labeled correctly.
- [ ] `CHANGELOG` is updated correctly
- [ ] No hard coded numbers and cluster/country/region names.
- [ ] No unnecessary increase in module interfaces
- [ ] All required updates in interfaces (if any) have been properly adressed in the module contracts
- [ ] In-code comments and documentation comments are satisfactory.
- [ ] model behavior/performance is satisfactory.
- [ ] Requested changes (if any) were applied correctly

## :rotating_light: Checklist for MAgPIE reviewer :rotating_light:

- [ ] PR is labeled correctly.
- [ ] `CHANGELOG` is updated correctly
- [ ] No hard coded numbers and cluster/country/region names.
- [ ] Changes to the model are scientifically sound
- [ ] In-code comments and documentation comments are satisfactory.
- [ ] model behavior/performance is satisfactory.
- [ ] Requested changes (if any) were applied correctly
- [ ] Label pull request [from the label list](https://github.com/magpiemodel/magpie/labels).
- **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`](https://github.com/pik-piam/magpie4) R library has been updated accordingly and backwards compatible where necessary.
- `scenario_config.csv` has been updated accordingly (important if `default.cfg` has been updated)

- [ ] 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()`](https://github.com/pik-piam/goxygen) and verify the modified code is properly documented

- [ ] Perform test runs
- **Low risk**:
- Run a compilation check via `gams main.gms action=c`
- **Medium risk**:
- Run test runs via `Rscript start.R --> "test runs"`
- **High risk**:
- Run test runs via `Rscript start.R --> "test runs"`
- Default run based on the current version of the fork from which PR is made
- Provide relevant comparison plots (land-use, emissions, food prices, land-use intensity,...)

### :chart_with_downwards_trend: Performance changes :chart_with_upwards_trend:

- Current develop branch default : ** mins
- This PR's default : ** 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ magpie_calib.*
#ignore run specific files and folders
/225*/
/run_details/
/logs/
*.out
/scripts/npi_ndc/npi_ndc_overview.txt
Rplots.pdf
Expand Down
13 changes: 11 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "MAgPIE - An Open Source land-use modeling framework",
"version": "4.5.0",
"version": "4.6.0",
"creators": [
{
"name": "Dietrich, Jan Philipp",
Expand Down Expand Up @@ -65,6 +65,10 @@
"affiliation": "Potsdam Institute for Climate Impact Research",
"orcid": "0000-0003-1282-400X"
},
{
"name": "Leip, Debbora",
"affiliation": "Potsdam Institute for Climate Impact Research"
},
{
"name": "Klein, David",
"affiliation": "Potsdam Institute for Climate Impact Research"
Expand All @@ -85,6 +89,11 @@
"name": "Biewald, Anne",
"affiliation": "Potsdam Institute for Climate Impact Research"
},
{
"name": "Führlich, Pascal",
"affiliation": "Potsdam Institute for Climate Impact Research",
"orcid": "0000-0002-6856-8239"
},
{
"name": "Lotze-Campen, Hermann",
"affiliation": "Potsdam Institute for Climate Impact Research",
Expand All @@ -100,5 +109,5 @@
"license": {
"id": "AGPL-3.0-or-later"
},
"publication_date": "2022-07-07"
"publication_date": "2022-11-09"
}
82 changes: 78 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,80 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [4.6.0] - 2022-11-09

### changed
- **18_residues** bugfix in `q18_cost_prod_res`
- **36_employment** included calculations for minimum wage scenario
- **38_factor_costs** included labor cost scaling in case of wage scenario
- **42_water_demand** account for multiple cropping in water requirements
- **51_nitrogen** moved maccs into emission modules. change of interface from vm_btm_reg to vm_emissions_reg
- **52_carbon** change of interface from vm_btm_reg to vm_emissions_reg
- **52_carbon** Soil C of urban areas set to soil C of natural other land
- **57_maccs** default changed from PBL2007 to PBL2022
- **58_peatland** moved maccs into emission modules. change of interface from vm_btm_reg to vm_emissions_reg
- **59_som** Now calculates soil C for fallow and urban areas
- **62_material** added biomass demand for bioplastic production
- **70_livestock** included labor cost scaling in case of wage scenario
- **config** added `s62_max_dem_bioplastic` and `s62_midpoint_dem_bioplastic` to define bioplastic scenario
- **config** adjusted PR template
- **config** best_calib set to FALSE in default
- **config** new switches `s36_minimum_wage`, `s36_scale_productivity_with_wage`, and `s38_fix_capital_need`
- **config** non-food system emission MAGICC switch
- **config** updated config to new module setup of MACCs
- **config** updated default realization of 15_food from anthropometrics_jan18 to anthro_iso_jun22
- **config** updated SHAPE SDP scenarios in scenario_config.csv
- **documentation** added literature
- **inputs** update of NPi for China (additional data 4.30)
- **inputs** updated f56_emis_policy (additional data 4.29)
- **inputs** updated non-food initial prices, MACCs curves, and removed suitability threshold of 0.1 in all_marginal setting
- **scripts** added single time step run to test runs
- **scripts** fix in start_functions for the calibration setting `ifneeded`
- **scripts** FSDP_collect handles the health impacts data provided by Marco Springmann, distributed it into the scenario's various reports. It performs a similar operation for global nutrient surplus (which must be calculated on the grid-level and then aggregated).- **13_tc** relaxed vm_tau upper limit
- **scripts** log files are now written in a subfolder "logs"
- **scripts** output/extra/disaggregation_BII.R adjusted BII output for primary and secondary other land
- **scripts** quit with exit code = gams status at the end of submit.R
- **scripts** update of rds_report to allow gridded intermediate outputs
- **scripts** updated FSEC start and output scripts
- **scripts** updated FSEC start scripts and related config files to introduce new scenarios
- **scripts/start** cleanup of old start scripts

### added
- **14_yields** added input file containing AQUASTAT yield calibration factors and switch `s14_calib_ir2rf` in default.cfg to activate this yield calibration
- **15_food** added new realization with country level exogenous diets, product-specific intake estimates, new scenarios for exogenous BMI and decomposition switches for EAT Lancet diets. Simplified code and improved iteration procedure.
- **50_nr_soil_budget** new module realization for more consistent MACCs implementation. change of interface from vm_btm_reg to vm_emissions_reg
- **53_methane** moved maccs into emission modules. change of interface from vm_btm_reg to vm_emissions_reg
- **56_ghg_policy** added new ecosystem protection scenarios
- **56_ghg_policy** new module realization for more consistent MACCs implementation
- **57_maccs** added new Marginal Abatement Cost Curve (MACCs) data set from PBL (PBL2022)
- **57_maccs** new more consistent maccs implementation. different mapping of emission sources to maccs.
- **f32_forest** added the option to run generic disturbance scenarios of secondary forest types determined in `f32_forest_shock.csv`
- **f35_natveg** added the option to run generic disturbance scenarios of primary forest determined in `f35_forest_shock.csv`
- **scripts** added output script creating a merged .csv for dietaryIndicators and caloricSupply outputs
- **scripts** added output script creating a merged .csv for dietaryIndicators and caloricSupply outputs
- **scripts** added output script creating a set of outputs for Alessandro Passaro in the FSEC context
- **scripts** added output script creating a set of outputs for Simon Dietz in the FSEC context
- **scripts** added output script for gridded crop diversity indices
- **scripts** added output script running MAGICC7 on a MAgPIE scenario
- **scripts** added output script, FSDP_process creating a merged .csv and .gdx for dietaryIndicators and caloricSupply outputs
- **scripts** added output scripts for FSEC FSDP runs
- **scripts** added water output script for FSEC model runs

### removed
- **15_food** removed read-in of non-needed input file "f15_calib_factor_FAOfsupply_iso"
- **38_factor_costs** removed `mixed_reg_feb17` realization
- **50_nr_soil_budget** old inconsistent module realizations
- **53_methane** old inconsistent module realizations
- **56_ghg_policy** old inconsistent module realizations
- **57_maccs** old inconsistent module realizations

### fixed
- **38_factor_costs** fixed calibration of share parameter in `sticky_labor` realization
- **43_water_availability** added missing years after 2100 in "f43_wat_avail" to avoid infeasibilities in coupled runs with less_ts timesteps
- **59_som** corrected the som pool due to the carbon transfer from other and primary forest to secondary forest before optimization (presolve)
- **scripts** fixed some bugs related to background execution of start/output scripts


## [4.5.0] - 2022-07-07

### changed
Expand Down Expand Up @@ -46,10 +120,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **scripts** clean up of the recalibrate_realizations.R script, project_LAMACLIMA_WP4.R, and sticky.R to remove sticky dynamic/free switch.
- **scripts** bugfix in disaggregation.R, disaggregation_BII.R with respect to urban scenario
- **scripts** added FSEC modeling start script (global runs)
- **scripts** The disaggregation_LUH2.R was extended to include the changes used to generate ISIMIP3b maps for LUH harmonization. The largest changes are: 1) The convertLUH function now breaks the grid level magpie objects by groups of years, then creates the raster for the groups and aggregates them to create the final map at a quarter of a degree resolution (this speeds up the process). 2) The mapping between LUH and MAgPIE is now defined by country and magpie-LUH types (not 1 to 1 anymore). 3) The split of MAgPIE's pasture land type between pasture and rangeland changed. Rangeland is assumed to stay constant after 2015, and changes in MAgPIE's pasture are due to pasture. 4) IFs were added so if a certain map already exists in the output folder, it will not generate it once again. 5) Flooded land now corresponds to a share of rice cropland, based on historical values. 6) To speed calculations, yields are read at the cell level, the crops are aggregated based on the new MAgPIE-LUH mapping, and then disaggregated to grid level.
- **scripts** The disaggregation_LUH2.R was extended to include the changes used to generate ISIMIP3b maps for LUH harmonization. The largest changes are: 1) The convertLUH function now breaks the grid level magpie objects by groups of years, then creates the raster for the groups and aggregates them to create the final map at a quarter of a degree resolution (this speeds up the process). 2) The mapping between LUH and MAgPIE is now defined by country and magpie-LUH types (not 1 to 1 anymore). 3) The split of MAgPIE's pasture land type between pasture and rangeland changed. Rangeland is assumed to stay constant after 2015, and changes in MAgPIE's pasture are due to managed pasture. 4) IFs were added so if a certain map already exists in the output folder, it will not generate it once again. 5) Flooded land now corresponds to a share of rice cropland, based on historical values. 6) To speed calculations, yields are read at the cell level, the crops are aggregated based on the new MAgPIE-LUH mapping, and then disaggregated to grid level.
- **scripts** added new disaggregation script to provide grid cell level BII
- **scripts** removed test script "irrig_dep_test" from "start" folder to "extra" folder
- **scripts** Added script to folder projects paper_grassland.R
- **scripts** Added script projects/paper_grassland.R
- **scripts** scripts/output/extra/emulator.R Remove dependency on deprecated R package "magpie"

### added
Expand All @@ -75,7 +149,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **scripts** output/projects/FSEC_costs.R to create costs ouput for the FSEC project
- **scripts** output/projects/FSEC_dietaryIndicators.R to create output datasets for the FSEC project
- **scripts** output/projects/FSEC_nitrogenPollution.R to create output datasets of nitrogen pollutants for the FSEC project
- **scripts** Added script to folder projects paper_grassland.R
- **scripts** Extended dissagregation.R script to replace single "past" land class by LHU range and pastr classes when grassland_apr22 realization is used.
- **scripts** `start/projects/test_rotations.R` testscript for different rotation scenario settings

Expand Down Expand Up @@ -465,7 +538,8 @@ This release version is focussed on consistency between the MAgPIE setup and the
First open source release of the framework. See [MAgPIE 4.0 paper](https://doi.org/10.5194/gmd-12-1299-2019) for more information.


[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.5.0...develop
[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.0...develop
[4.6.0]: https://github.com/magpiemodel/magpie/compare/v4.5.0...v4.6.0
[4.5.0]: https://github.com/magpiemodel/magpie/compare/v4.4.0...v4.5.0
[4.4.0]: https://github.com/magpiemodel/magpie/compare/v4.3.5...v4.4.0
[4.3.5]: https://github.com/magpiemodel/magpie/compare/v4.3.4...v4.3.5
Expand Down
15 changes: 13 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ authors:
affiliation: "Potsdam Institute for Climate Impact Research"
email: [email protected]

- family-names: Leip
given-names: Debbora
affiliation: "Potsdam Institute for Climate Impact Research"
email: [email protected]

- family-names: Klein
given-names: David
affiliation: "Potsdam Institute for Climate Impact Research"
Expand All @@ -101,6 +106,12 @@ authors:
given-names: Anne
affiliation: "Potsdam Institute for Climate Impact Research"

- family-names: Führlich
given-names: Pascal
orcid: https://orcid.org/0000-0002-6856-8239
affiliation: "Potsdam Institute for Climate Impact Research"
email: [email protected]

- family-names: Lotze-Campen
given-names: Hermann
orcid: https://orcid.org/0000-0002-0003-5508
Expand All @@ -114,8 +125,8 @@ authors:
email: [email protected]

title: MAgPIE - An Open Source land-use modeling framework
version: 4.5.0
date-released: 2022-07-07
version: 4.6.0
date-released: 2022-11-09
repository-code: https://github.com/magpiemodel/magpie
keywords:
- landuse
Expand Down
Loading

0 comments on commit 0c46827

Please sign in to comment.