Skip to content

Commit

Permalink
Merge pull request magpiemodel#506 from k4rst3ns/f_ipcc2019
Browse files Browse the repository at this point in the history
Add new SOM realization (updated factors)
  • Loading branch information
k4rst3ns authored Jan 17, 2023
2 parents e0aad77 + b4f690e commit b60fdff
Show file tree
Hide file tree
Showing 19 changed files with 513 additions and 27 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### changed
- **config** update input data to rev4.79
- **config** and **38_factor_costs** changed name of `s38_fix_capital_need` to `s38_startyear_labor_substitution`
- **config** added `s38_target_labor_share`, `s38_targetyear_labor_share` and `s38_target_fulfillment` to define labor share target scnarios
- **38_factor_costs** changed name of set `req` to `factors` (also used in 11_costs, 57_maccs, 70_livestock)
Expand All @@ -18,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### added
- **scripts** added start script which starts an empty model just regenerating a previous run
- **31_past** added additional limitation (single climate scenario input) for **grasslands_apr22**
- **59_som** added new **cellpool_jan23** realization with updated 2019 IPCC guidelines values

### removed
-
Expand Down
8 changes: 5 additions & 3 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.77_h12_magpie.tgz",
cellular = "rev4.77_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz",
validation = "rev4.77_h12_validation.tgz",
cfg$input <- c(regional = "rev4.79_h12_magpie.tgz",
cellular = "rev4.79_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz",
validation = "rev4.79_h12_validation.tgz",
additional = "additional_data_rev4.36.tgz",
calibration = "calibration_H12_09Jan23.tgz")

Expand Down Expand Up @@ -1502,6 +1502,8 @@ cfg$gms$s58_fix_peatland <- 2015 # def = 2015
# ***------------------------- 59_som -------------------------------------
# * (static_jan19): static soil carbon loss for cropland
# * (cellpool_aug16): dynamic soil organic matter pool on cellular level
# * (cellpool_jan23): dynamic soil organic matter pool on cellular level
# * with updated, regionalized stock change factors (IPCC guidelines 2019)
cfg$gms$som <- "static_jan19" # def = static_jan19

# * static realization switch
Expand Down
2 changes: 1 addition & 1 deletion config/scenario_config.csv
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ gms$s73_timber_demand_switch;;;;;;;;;;;;;;;;;;;;;1;1;1;1;1;;;;;1;1;0;;;;;;;;;;;
gms$s35_forest_damage;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4;4;4;4;4;;;;;;
gms$c32_shock_scenario;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;none;002lin2030;004lin2030;008lin2030;016lin2030;;;;;;
gms$c35_shock_scenario;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;none;002lin2030;004lin2030;008lin2030;016lin2030;;;;;;
input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.77_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.77_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.77_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.77_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.77_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.77_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz
input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.79_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.79_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.79_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.79_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.79_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.79_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz
gms$c52_land_carbon_sink_rcp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;RCP19;RCP26;RCP45;RCP60;RCPBU;RCPBU
gms$c57_macc_version;;;;;;;;;;;;;;;;;;;;;;;;;;PBL_2022;PBL_2022;PBL_2022;PBL_2022;;;;;;;;;;;;;;
gms$c57_macc_scenario;;;;;;;;;;;;;;;;;;;;;;;;;;Default;Optimistic;Default;Optimistic;;;;;;;;;;;;;;
Expand Down
6 changes: 3 additions & 3 deletions config/scenario_fsec.csv
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ gms$s62_max_dem_bioplastic;0;;;;400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$c70_fac_req_regr;reg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$c70_feed_scen;;;;;;;;;;;;;;;;;ssp1;;;;;;;;;;;;;;;;;;;;;;;
gms$c73_build_demand;;;;;;;;;;;;;;;;;;;;;;;50pc;;;;;;;;;;;;;;;;;
input['cellular'];rev4.78FSEC_e2bdb6cd_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.78FSEC_e2bdb6cd_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.78FSEC_e2bdb6cd_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.78FSEC_e2bdb6cd_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.78FSEC_e2bdb6cd_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.78FSEC_e2bdb6cd_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.78FSEC_e2bdb6cd_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.78FSEC_e2bdb6cd_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz
input['regional'];rev4.78FSEC_e2bdb6cd_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['validation'];rev4.78FSEC_e2bdb6cd_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['cellular'];rev4.79FSEC_e2bdb6cd_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.79FSEC_e2bdb6cd_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.79FSEC_e2bdb6cd_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.79FSEC_e2bdb6cd_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.79FSEC_e2bdb6cd_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.79FSEC_e2bdb6cd_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.79FSEC_e2bdb6cd_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.79FSEC_e2bdb6cd_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz
input['regional'];rev4.79FSEC_e2bdb6cd_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['validation'];rev4.79FSEC_e2bdb6cd_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['additional'];additional_data_rev4.36.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['calibration'];calibration_FSEC_28Nov22.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
magicc_emis_scen;bjoernAR6_C_SSP2-NDC.mif;;;bjoernAR6_C_SSP2-PkBudg900.mif;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;bjoernAR6_C_SSP1-NDC.mif;;;;
6 changes: 6 additions & 0 deletions literature.bib
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,12 @@ @techreport{ipcc_2006_2006
year = {2006}
}

@misc{calvo_buendia_ipcc_2019,
title = {{{IPCC}} 2019, 2019 {{Refinement}} to the 2006 {{IPCC Guidelines}} for {{National Greenhouse Gas Inventories}},},
publisher = {Published: IPCC, Switzerland},
year = {2019},
editor = {E. {Calvo Buendia} and K. Tanabe and A. Kranjc and J. Baasansuren and M. Fukuda and S. Ngarize and A.Osako and Y. Pyrozhenko and P. Shermanau and S. Federici (eds)},
}

@article{lal_world_2005,
title = {World crop residues production and implications of its use as a biofuel},
Expand Down
36 changes: 18 additions & 18 deletions main.gms
Original file line number Diff line number Diff line change
Expand Up @@ -146,25 +146,25 @@ $title magpie

*##################### R SECTION START (VERSION INFO) ##########################
*
* Used data set: rev4.77_h12_magpie.tgz
* md5sum: NA
* Repository: https://rse.pik-potsdam.de/data/magpie/public
* Used data set: rev4.79_h12_magpie.tgz
* md5sum: 4f3f5fd72716fe371d646c69c30e6fd3
* Repository: /p/projects/rd3mod/inputdata/output
*
* Used data set: rev4.77_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz
* md5sum: NA
* Repository: https://rse.pik-potsdam.de/data/magpie/public
* Used data set: rev4.79_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz
* md5sum: a18af444eb4a3d24956f66e31e8634d8
* Repository: /p/projects/rd3mod/inputdata/output
*
* Used data set: rev4.77_h12_validation.tgz
* md5sum: NA
* Repository: https://rse.pik-potsdam.de/data/magpie/public
* Used data set: rev4.79_h12_validation.tgz
* md5sum: 0a617c2999127a50146ac106cd6ee4bf
* Repository: /p/projects/rd3mod/inputdata/output
*
* Used data set: additional_data_rev4.33.tgz
* md5sum: NA
* Repository: https://rse.pik-potsdam.de/data/magpie/public
* Used data set: additional_data_rev4.36.tgz
* md5sum: e24c46872f77dc15ad8603bdac1e6065
* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public
*
* Used data set: calibration_H12_per_ton_fao_may22_glo_23Nov22.tgz
* md5sum: NA
* Repository: https://rse.pik-potsdam.de/data/magpie/public
* Used data set: calibration_H12_09Jan23.tgz
* md5sum: 0fd18901ec047862918bf598ac126411
* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public
*
* Low resolution: c200
* High resolution: 0.5
Expand All @@ -177,11 +177,11 @@ $title magpie
*
* Regionscode: 62eff8f7
*
* Regions data revision: 4.77
* Regions data revision: 4.79
*
* lpj2magpie settings:
* * LPJmL data: MRI-ESM2-0:ssp370
* * Revision: 4.77
* * Revision: 4.79
*
* aggregation settings:
* * Input resolution: 0.5
Expand All @@ -193,7 +193,7 @@ $title magpie
* * Call: withCallingHandlers(expr, message = messageHandler, warning = warningHandler, error = errorHandler)
*
*
* Last modification (input data): Thu Dec 08 10:40:17 2022
* Last modification (input data): Tue Jan 17 11:25:32 2023
*
*###################### R SECTION END (VERSION INFO) ###########################

Expand Down
4 changes: 3 additions & 1 deletion modules/31_past/grasslands_apr22/realization.gms
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
*' calculated in [50_nr_soil_budget] and control the balance between intensive and
*' extensive grass biomass production.

*' @limitations We currently do not accout for specific differences within intensive
*' @limitations At the moment this realization only runs with a single climate scenario
*' (SPP1-RCP2p6 from MRI_ESM-0), which is used in all (except constant climate) settings.
*' We currently do not accout for specific differences within intensive
*' pasture management systems and related degradation of grasslands for both
*' rangelands or managed pastures. Grass production costs and conversion costs between
*' grassland types are set 1 USD05MER per unit due to lack of data.
Expand Down
2 changes: 1 addition & 1 deletion modules/38_factor_costs/sticky_labor/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ s38_depreciation_rate depreciation rate (share of costs) / 0.05 /
s38_immobile immobile capital (share) / 1 /
s38_ces_elast_subst Elasticity of substitution in CES function (1) / 0.3 /
s38_startyear_labor_substitution Year until which labor and capital requirements are fixed to historic values (year) / 2020 /
s38_target_labor_share Target labor share out of labor plus capital needed (1) / 0.8 /
s38_target_labor_share Target labor share out of labor plus capital needed (1) / 0 /
s38_targetyear_labor_share Year for which the target labor share should be set (year) / 2050 /
s38_target_fulfillment Share by which a region moves from its baseline labor share towards the target value (1) / 0.5 /
;
Expand Down
54 changes: 54 additions & 0 deletions modules/59_som/cellpool_jan23/declarations.gms
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK)
*** | authors, and contributors see CITATION.cff file. This file is part
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of
*** | AGPL-3.0, you are granted additional permissions described in the
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

parameters
i59_lossrate(t) Rate of loss or recovery of SOM pool per timestep (1)
p59_carbon_density(t_all,j,land) Carbon density of a hectare of land (tC per ha)
i59_tillage_share(i,tillage59) Share of land under tillage class (1)
i59_input_share(i,inputs59) Share of land under input class (1)
i59_cratio(j,kcr,w) Ratio of carbon density of land relative to natural vegetaion (1)
i59_cratio_fallow(j) Ratio of carbon density of fallow land relative to natural vegetation (1)
p59_som_pool(j,land) Actual C pool (mio. tC)
i59_subsoilc_density(t_all,j) Subsoil carbon density of a hectare of land (tC per ha)
p59_land_before(j,land) Land area in previous time step (mio. ha)
;

equations
q59_som_target_cropland(j) Estimates the long-term target state of cropland (mio. tC)
q59_som_target_noncropland(j,noncropland59) Estimates the long-term target state of noncropland (mio. tC)
q59_som_pool(j,land) Actual C pool (mio. tC)
q59_nr_som(j) Soil organic matter loss (Mt N per yr)
q59_nr_som_fertilizer(j) Bound of nitrogen fertilizer of soil organic matter loss (Mt N per yr)
q59_nr_som_fertilizer2(j) Fraction of soil organic matter loss take is taken up by plants (Mt N per yr)
q59_carbon_soil(j,land,stockType) Soil carbon content calculation (mio. tC)
;

positive variables
v59_som_target(j,land) Long-term target state of C pool (mio. tC)
v59_som_pool(j,land) Soil organic matter pool (mio. tC)
;

variables
vm_nr_som(j) Release of soil organic matter (Mt N per yr)
vm_nr_som_fertilizer(j) Uptake of soil organic matter from plants (Mt N per yr)
;

*#################### R SECTION START (OUTPUT DECLARATIONS) ####################
parameters
ov59_som_target(t,j,land,type) Long-term target state of C pool (mio. tC)
ov59_som_pool(t,j,land,type) Soil organic matter pool (mio. tC)
ov_nr_som(t,j,type) Release of soil organic matter (Mt N per yr)
ov_nr_som_fertilizer(t,j,type) Uptake of soil organic matter from plants (Mt N per yr)
oq59_som_target_cropland(t,j,type) Estimates the long-term target state of cropland (mio. tC)
oq59_som_target_noncropland(t,j,noncropland59,type) Estimates the long-term target state of noncropland (mio. tC)
oq59_som_pool(t,j,land,type) Actual C pool (mio. tC)
oq59_nr_som(t,j,type) Soil organic matter loss (Mt N per yr)
oq59_nr_som_fertilizer(t,j,type) Bound of nitrogen fertilizer of soil organic matter loss (Mt N per yr)
oq59_nr_som_fertilizer2(t,j,type) Fraction of soil organic matter loss take is taken up by plants (Mt N per yr)
oq59_carbon_soil(t,j,land,stockType,type) Soil carbon content calculation (mio. tC)
;
*##################### R SECTION END (OUTPUT DECLARATIONS) #####################
83 changes: 83 additions & 0 deletions modules/59_som/cellpool_jan23/equations.gms
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK)
*** | authors, and contributors see CITATION.cff file. This file is part
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of
*** | AGPL-3.0, you are granted additional permissions described in the
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]


*' @equations
*' For every cell a new equilibrium value for the soil organic carbon pool
*' on cropland as the sum over all crop types and irrigation regimes is calculated

q59_som_target_cropland(j2) ..
v59_som_target(j2,"crop")
=e= (sum((kcr,w), vm_area(j2,kcr,w) * i59_cratio(j2,kcr,w))
+ vm_fallow(j2) * i59_cratio_fallow(j2)) *
sum(ct,f59_topsoilc_density(ct,j2))
;
*' as well as for all non cropland given by

q59_som_target_noncropland(j2,noncropland59) ..
v59_som_target(j2,noncropland59)
=e= vm_land(j2,noncropland59) * sum(ct,f59_topsoilc_density(ct,j2))
;

*' Depending on the setting of `c59_som_scenario `climate impacts (`cc`)
*' are taken into account or not (`nocc` and `nocc_hist`).
*' For a static climate `f59_topsoilc_density` is set to the value of 1995
*' within the input of the module realization.

*' To get the current size of the soil organic carbon pool, the carbon
*' pool of the previous timestep is developing into the direction of the
*' above calculated target values taken the timestep depending lossrate
*' into account by

q59_som_pool(j2,land) ..
v59_som_pool(j2,land)
=e= sum(ct,i59_lossrate(ct)) * v59_som_target(j2,land)
+ (1 - sum(ct,i59_lossrate(ct))) *
sum((ct,land_from), p59_carbon_density(ct,j2,land_from) *
vm_lu_transitions(j2,land_from,land))
;

*' Note that to account correctly for land-use transitions, carbon densities
*' multiplied by the land-use transition matrix of the current timestep
*' is used.

*' The soil carbon content is calculated as sum of actual topsoil pool
*' and the reference soil carbon pool of the subsoil

q59_carbon_soil(j2,land,stockType) ..
vm_carbon_stock(j2, land,"soilc",stockType)
=e= v59_som_pool(j2, land) + vm_land(j2, land) *
sum(ct,i59_subsoilc_density(ct,j2));

*' The annual nitrogen release (or sink) for cropland soils is than
*' calculated by the loss of soil organic carbon given by

q59_nr_som(j2) ..
vm_nr_som(j2)
=e= sum(ct,i59_lossrate(ct))/m_timestep_length*1/15
* (sum((ct,land_from), p59_carbon_density(ct,j2,land_from) *
vm_lu_transitions(j2,land_from,"crop"))
- v59_som_target(j2,"crop"))
;
*' with the carbon to nitrogen ratio of soils assumed to be 15:1.

*' The amount of nitrogen that becomes available to cropland farming is
*' limited by loss of soil organic matter by

q59_nr_som_fertilizer(j2) ..
vm_nr_som_fertilizer(j2)
=l=
vm_nr_som(j2);

*' as well as by the amount that crops can take up

q59_nr_som_fertilizer2(j2) ..
vm_nr_som_fertilizer(j2)
=l=
vm_landexpansion(j2,"crop") * s59_nitrogen_uptake;

*' Here we assume a maximum of 200 kg on the expanded area.
Loading

0 comments on commit b60fdff

Please sign in to comment.