forked from magpiemodel/magpie
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request magpiemodel#506 from k4rst3ns/f_ipcc2019
Add new SOM realization (updated factors)
- Loading branch information
Showing
19 changed files
with
513 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) ##################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.