Skip to content

Commit

Permalink
Merge branch 'magpiemodel:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
caviddhen authored Jun 13, 2024
2 parents e02000c + dc38aad commit e8a8ddd
Show file tree
Hide file tree
Showing 31 changed files with 196 additions and 116 deletions.
11 changes: 8 additions & 3 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.7.3dev",
"version": "4.8.0dev",
"creators": [
{
"name": "Dietrich, Jan Philipp",
Expand Down Expand Up @@ -99,6 +99,11 @@
"affiliation": "Potsdam Institute for Climate Impact Research",
"orcid": "0000-0003-0328-4750"
},
{
"name": "Steinhauser, Jan",
"affiliation": "Potsdam Institute for Climate Impact Research",
"orcid": "0000-0002-5989-6855"
},
{
"name": "Lotze-Campen, Hermann",
"affiliation": "Potsdam Institute for Climate Impact Research",
Expand All @@ -110,9 +115,9 @@
"orcid": "0000-0001-9500-1986"
}
],
"keywords": ["landuse", "modeling", "nlp", "partial equilibrium"],
"keywords": ["landuse", "modeling", "model", "nlp", "partial equilibrium"],
"license": {
"id": "AGPL-3.0-or-later"
},
"publication_date": "2024-04-12"
"publication_date": "2024-06-10"
}
78 changes: 49 additions & 29 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,79 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]

### changed
- **41_area_equipped_for_irrigation** updated (non-default) AEI data (from Mehta2022 to Mehta2024)
- **22_land_conservation and default.cfg** Added options for baseline protection
-

### added
-

### removed
-

### fixed
-


## [4.8.0] - 2024-06-10

### changed
- **14_yields** revised timber yield calculations
- **15_food, default.cfg and scenario_config.csv** changed fader setup and introduced new switches for specifying food substitution scenarios and exogeneous food intake scenarios
- **70_livestock** default.cfg and scenario_config.csv** changed fader setup and introduced new switches for specifying feed substitution with SCP scenarios
- **default.cfg** update additional data to rev4.50
- **default.cfg** changed default realization for 44_biodiversity to new realization `bii_target_apr24`
- **80_optimization** Simplifed cycling through CONOPT4, CONOPT4 with OPTFILE, CONOPT4 without preprocessing and CONOPT3.
- **scripts** start/test_runs.R added 2 more test runs from FSEC
- **32_forestry** revision and simplification of forestry implementation, renamed realization from `dynamic_feb21` to `dynamic_may24`.
- **22_land_conservation and default.cfg** Added options for baseline protection
- **32_forestry** renamed interface `pm_demand_ext` to `pm_demand_forestry`
- **default.cfg** Forestry sector included by default by using the `ForestryEndo` settings from `scenario_config.csv`: `s32_initial_distribution = 1`, `s32_demand_establishment = 1`, `s32_hvarea = 2`, `s35_secdf_distribution = 2`, `s35_hvarea = 2`, `s73_timber_demand_switch = 1`
- **14_yields** revised timber yield calculations
- **32_forestry** revision and simplification of forestry implementation, renamed realization from `dynamic_feb21` to `dynamic_may24`.
- **35_natveg** `vm_land(j2,"forestry")` included in NPI/NDC constraint `q35_min_forest`
- **35_natveg** replaced the realisation `dynamic_feb21` with realisation `pot_forest_may24`. The new realisation provides additional information on the potential forest area, which is now used to constrain forest and forestry expansion and recovery. The remaining area for forest establishment is provided to the forestry module via the new interface parameter `pcm_max_forest_est`.
- **41_area_equipped_for_irrigation** updated (non-default) AEI data (from Mehta2022 to Mehta2024)
- **52_carbon** Separate carbon densities for forest and other land. Before there was only a single carbon density for natural vegetation land.
- **70_livestock** default.cfg and scenario_config.csv** changed fader setup and introduced new switches for specifying feed substitution with SCP scenarios
- **80_optimization** Simplifed cycling through CONOPT4, CONOPT4 with OPTFILE, CONOPT4 without preprocessing and CONOPT3.
- **default.cfg** changed default realization for 44_biodiversity to new realization `bii_target_apr24`
- **default.cfg** defaults for `cfg$gms$sm_fix_SSP2`, `cfg$gms$sm_fix_cc` and other switches changed from 2020 to 2025
- **default.cfg** Forestry sector included by default by using the `ForestryEndo` settings from `scenario_config.csv`: `s32_initial_distribution = 1`, `s32_demand_establishment = 1`, `s32_hvarea = 2`, `s35_secdf_distribution = 2`, `s35_hvarea = 2`, `s73_timber_demand_switch = 1`
- **default.cfg** update additional data to rev4.50
- **scripts** modified agmip_merge_report to use piamInterfaces
- **scripts** start/test_runs.R added 2 more test runs from FSEC

### added
- **default.cfg** added cropland growth constraint `cfg$gms$s30_annual_max_growth`
- **default.cfg** added technical cost for missing BII increase `cfg$gms$s44_cost_bii_missing`
- **default.cfg** added settings for new price-driven bioenergy realization `1st2ndgen_priced_feb24`: `cfg$gms$s60_2ndgen_bioenergy_dem_min_post_fix`, `cfg$gms$c60_bioenergy_subsidy_fix_SSP2`, `s60_bioenergy_gj_price_1st`,
`s60_bioenergy_price_2nd`, `c60_price_implementation`
- **core** added `coup2110`timesteps
- **15_food** added additional sigmoid food substition scenarios `sigmoid_75pc_25_50`, `sigmoid_50pc_25_50` and `sigmoid_25pc_25_50`
- **21_trade** Minimum trade margin for forestry products `s21_min_trade_margin_forestry`
- **30_crop** added regional cropland equation `q30_crop_reg` and presolve growth constraint
- **44_biodiversity** added new realization `bii_target_apr24`, taking into account `f44_rr_layer`
- **60_bioenergy** added new realization `1st2ndgen_priced_feb24` to enable price-driven 2nd gen bioenergy production
- **scripts** added automatic set writer for new bioenergy realization to `start_functions`
- **scripts** added start scripts for the GENIE project
- **scenario_config.csv** added preset for GENIE project
- **default.cfg** cfg$gms$s80_secondsolve option for second solve statement with 0=off as default
- **21_trade** Minimum trade margin for forestry products `s21_min_trade_margin_forestry`
- **73_timber** added interface `im_timber_prod_cost`
- **scripts** added "checkSummation" output script for consistency checking a report.mif
- **citation** added abstract
- **core** added `coup2110`timesteps
- **default.cfg** added cropland growth constraint `cfg$gms$s30_annual_max_growth`
- **default.cfg** added settings for new price-driven bioenergy realization `1st2ndgen_priced_feb24`: `cfg$gms$s60_2ndgen_bioenergy_dem_min_post_fix`, `cfg$gms$c60_bioenergy_subsidy_fix_SSP2`, `s60_bioenergy_gj_price_1st`,
- **default.cfg** added technical cost for missing BII increase `cfg$gms$s44_cost_bii_missing`
- **default.cfg** cfg$gms$s80_secondsolve option for second solve statement with 0=off as default
- **scenario_config.csv** added preset for GENIE project
- **scripts** added "checkSummation" output script for consistency checking a report.mif
- **scripts** added automatic set writer for new bioenergy realization to `start_functions`
- **scripts** added start scripts for the GENIE project
`s60_bioenergy_price_2nd`, `c60_price_implementation`

### removed
- **scripts/output/extra** removed scripts disaggregation_cropsplit and disaggregation_transitions
- **scripts** removed support for spam files in start_functions
- **14_yields** removed interface `pm_timber_yield_initial`
- **21_trade** removed interface `pm_selfsuff_ext`, removed `v21_manna_from_heaven`
- **32_forestry** removed interface `pm_representative_rotation`
- **73_timber** removed interfaces `pm_demand_forestry_future` and `sm_wood_density`
- **62_material/16_demand** Removed double structure for forestry products. `pm_demand_foresty` is now used in `62_material`
- **35_natveg** removed growing stock calculation and calibration, which is no longer needed.
- **62_material/16_demand** Removed double structure for forestry products. `pm_demand_foresty` is now used in `62_material`
- **73_timber** removed interfaces `pm_demand_forestry_future` and `sm_wood_density`
- **scripts** removed support for spam files in start_functions
- **scripts/output/extra** removed scripts disaggregation_cropsplit and disaggregation_transitions

### fixed
- **14_yields** fix division by zero in preloop of managementcalib_aug19
- **extra/disaggregation** fixed bug in disaggregation of land conservation related to switch from 59k to 67k that produced erroneous outputs
- **44_biodiversity** avoid division by zero
- **58_peatland** Added balance variable to avoid random infeasibilites
- **80_optimization** fixed a bug in nlp_apr17; cycling through CONOPT4, CONOPT4 without preprocessing and CONOPT3 was not working
- **extra/disaggregation** fixed bug in disaggregation of land conservation related to switch from 59k to 67k that produced erroneous outputs
- **scenario_config.csv** same revision for input files as in default.cfg
- **scenario_fsec.csv** scenario settings
- **scripts/start/test_runs.R** include all default output script, in particular disaggregation.R, which is needed for BII
- **start/projects/fsec.R** scenario settings
- **80_optimization** fixed a bug in nlp_apr17; cycling through CONOPT4, CONOPT4 without preprocessing and CONOPT3 was not working
- **58_peatland** Added balance variable to avoid random infeasibilites


## [4.7.3] - 2024-04-12

Expand Down Expand Up @@ -929,7 +948,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.7.3...develop
[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.8.0...develop
[4.8.0]: https://github.com/magpiemodel/magpie/compare/v4.7.3...v4.8.0
[4.7.3]: https://github.com/magpiemodel/magpie/compare/v4.7.2...v4.7.3
[4.7.2]: https://github.com/magpiemodel/magpie/compare/v4.7.1...v4.7.2
[4.7.1]: https://github.com/magpiemodel/magpie/compare/v4.7.0...v4.7.1
Expand Down
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ title: MAgPIE - An Open Source land-use modeling framework
abstract: The *Model of Agricultural Production and its Impact on the Environment* (MAgPIE)
is a modular open source framework for modeling global land-systems, which is
coupled to the grid-based dynamic vegetation model LPJmL, with a spatial resolution
of 0.5°x0.5°. It takes regional economic conditions such as demand for agricultural
of 0.5degx0.5deg. It takes regional economic conditions such as demand for agricultural
commodities, technological development and production costs as well as spatially
explicit data on potential crop yields, land and water constraints (from LPJmL) into
account. Based on these, the model derives specific land use patterns, yields and
Expand All @@ -151,8 +151,8 @@ abstract: The *Model of Agricultural Production and its Impact on the Environmen
exogenously given population in 10 food energy categories, based on regional diets.
Future trends in food demand are derived from a cross-country regression analysis,
based on future scenarios on GDP and population growth.
version: 4.7.3dev
date-released: 2024-04-12
version: 4.8.0dev
date-released: 2024-06-10
repository-code: https://github.com/magpiemodel/magpie
keywords:
- landuse
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ https://www.pik-potsdam.de/research/projects/activities/land-use-modelling/magpi
A framework description paper has been published in
Geoscientific Model Development (GMD): https://doi.org/10.5194/gmd-12-1299-2019

The model documentation for version 4.7.3 can be found at
https://rse.pik-potsdam.de/doc/magpie/4.7.3/
The model documentation for version 4.8.0 can be found at
https://rse.pik-potsdam.de/doc/magpie/4.8.0/

A most recent version of the documentation can also be extracted from the
model source code via the R package goxygen
Expand Down Expand Up @@ -226,7 +226,7 @@ [email protected]
Please contact [email protected]

## CITATION
See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.7.3/#how-to-cite) in the model documentation for information how to cite the model.
See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.8.0/#how-to-cite) in the model documentation for information how to cite the model.

## AUTHORS
See list of authors in CITATION.cff
Expand Down
34 changes: 20 additions & 14 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ cfg$model <- "main.gms" #def = "main.gms"
#### input settings ####

# which input data sets should be used?
cfg$input <- c(regional = "rev4.106_h12_magpie.tgz",
cellular = "rev4.106_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz",
validation = "rev4.106_h12_validation.tgz",
cfg$input <- c(regional = "rev4.108_h12_magpie.tgz",
cellular = "rev4.108_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz",
validation = "rev4.108_h12_validation.tgz",
additional = "additional_data_rev4.50.tgz",
calibration = "calibration_H12_26Mar24.tgz")

Expand Down Expand Up @@ -192,10 +192,10 @@ cfg$gms$c09_pal_scenario <- "SSP2" # def = SSP2
# * SDP: "SDP", "SDP_EI", "SDP_MC", "SDP_RC"

# Year until which all parameters are fixed to SSP2 values
cfg$gms$sm_fix_SSP2 <- 2020
cfg$gms$sm_fix_SSP2 <- 2025

# Year until which all parameters affected by climate change are fixed to historical values
cfg$gms$sm_fix_cc <- 2020
cfg$gms$sm_fix_cc <- 2025

# ***--------------------- 10_land ----------------------------------------
# * (landmatrix_dec18): includes a land transition matrix
Expand Down Expand Up @@ -604,8 +604,8 @@ cfg$gms$s21_trade_tariff <- 1 # def =1
# * whether to fade out trade tariffs (bilateral trade realization) # def = 0
cfg$gms$s21_trade_tariff_fadeout <- 0

# * start year of fadeout if s21_trade_tariff_fadeout = 1 # def = 2020
cfg$gms$s21_trade_tariff_startyear <- 2020
# * start year of fadeout if s21_trade_tariff_fadeout = 1 # def = 2025
cfg$gms$s21_trade_tariff_startyear <- 2025

# * end year of fadeout if s21_trade_tariff_fadeout = 1 # def = 2050
cfg$gms$s21_trade_tariff_targetyear <- 2050
Expand Down Expand Up @@ -675,9 +675,9 @@ cfg$gms$s22_restore_land <- 1 # def = 1
# * sigmoidal trajectory. NOTE: This switch is only relevant
# * if one of the 'future options' (e.g. BH) is chosen.
# * Start year:
cfg$gms$s22_conservation_start <- 2020 # def = 2020
cfg$gms$s22_conservation_start <- 2025 # def = 2025
# * Target year (year when full protection is reached):
cfg$gms$s22_conservation_target <- 2030 # def = 2030
cfg$gms$s22_conservation_target <- 2050 # def = 2050

# ***--------------------- 29_ageclass -----------------------------------
# * (feb21): Distribution of age-classes according to Poulter et al 2018
Expand Down Expand Up @@ -706,7 +706,7 @@ cfg$gms$c30_rotation_constraints <- "on" # def = "on"
cfg$gms$c30_rotation_scenario <- "default" # def = "default"
# * Year by which rotation scenario is fully implemented:
# * Start year:
cfg$gms$s30_rotation_scenario_start <- 2020 # def = 2020
cfg$gms$s30_rotation_scenario_start <- 2025 # def = 2025
# * Target year (year when full implementation is reached):
cfg$gms$s30_rotation_scenario_target <- 2050 # def = 2050

Expand All @@ -732,9 +732,9 @@ cfg$gms$s30_snv_shr <- 0 # def = 0
cfg$gms$s30_snv_shr_noselect <- 0 # def = 0
# * Year by which SNV policy ('s30_snv_shr') is fully implemented.
# * Start year (should be close to 2019):
cfg$gms$s30_snv_scenario_start <- 2020 # def = 2020
cfg$gms$s30_snv_scenario_start <- 2025 # def = 2025
# * Target year (year when full implementation is reached):
cfg$gms$s30_snv_scenario_target <- 2030 # def = 2030
cfg$gms$s30_snv_scenario_target <- 2050 # def = 2050
# * Switch and specification of countries for which SNV policy in
# * s30_snv_shr apply.
# * Options: list of iso-codes of countries where SNV policy should be applied
Expand Down Expand Up @@ -974,6 +974,12 @@ cfg$gms$s35_hvarea <- 2 # def = 2
# * ("016lin2030") Disturbance applied to 1p6 percent per year linear phase-in over 20yrs from 0 in 2030
cfg$gms$c35_shock_scenario = "none" # def = "none"

# * Scenario for potential forest area
# * options: cc (climate change)
# * nocc (no climate change)
# * nocc_hist (no climate change after year defined by sm_fix_cc)
cfg$gms$c35_pot_forest_scenario <- "cc" # def = "cc"

# ***--------------------- 36_employment -------------------------------
# * This module calculates agricultural employment.
# * (exo_may22): employment is calculated based on labor costs and not affecting the
Expand Down Expand Up @@ -1036,7 +1042,7 @@ cfg$gms$c38_fac_req <- "glo" # default "glo"

# * Year until which the capital share should be fixed to the historical values, not allowing for endogenous
# * substitution between labor and capital.
cfg$gms$s38_startyear_labor_substitution <- 2020 # default 2020
cfg$gms$s38_startyear_labor_substitution <- 2025 # default 2025

# * The following two settings are to create exogenous scenarios in which capital is substituted by labor to increase
# * employment:
Expand Down Expand Up @@ -1140,7 +1146,7 @@ cfg$gms$c42_env_flow_policy <- "off" # def = "off"
# * Defines when linear fading in of policy starts and when the target of
# * full protection based on 's42_env_flow_scenario' is reached
# * Start year:
cfg$gms$s42_efp_startyear <- 2020 # def = 2020
cfg$gms$s42_efp_startyear <- 2025 # def = 2025
# * Target year (year when full protection is reached):
cfg$gms$s42_efp_targetyear <- 2040 # def = 2040

Expand Down
Loading

0 comments on commit e8a8ddd

Please sign in to comment.