Title: | MadRat Soil Organic Carbon Budget Library |
---|---|
Description: | This packages provides functions for soil organic carbon budget for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories. |
Authors: | Kristine Karstens [aut, cre], Jan Philipp Dietrich [aut] |
Maintainer: | Kristine Karstens <[email protected]> |
License: | LGPL-3 | file LICENSE |
Version: | 2.3.5 |
Built: | 2024-11-22 05:39:50 UTC |
Source: | https://github.com/pik-piam/mrsoil |
This packages provides functions for soil organic carbon budget for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories.
Maintainer: Kristine Karstens [email protected]
Authors:
Jan Philipp Dietrich [email protected]
Useful links:
Report bugs at https://github.com/pik-piam/mrsoil/issues
This function compiles carbon inputs multipliers for steady state calculations for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories
calcCarbonInputMultiplier(inputType = "kcr")
calcCarbonInputMultiplier(inputType = "kcr")
inputType |
switch between 'kcr' (default), or 'kli', 'generic' |
magpie object on choosen resolution
Kristine Karstens
## Not run: calcOutput("CarbonInputMulitplier", aggregate = FALSE, input = generic) ## End(Not run)
## Not run: calcOutput("CarbonInputMulitplier", aggregate = FALSE, input = generic) ## End(Not run)
Calculates Carbon Input from litter
calcCarbonLitter( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical", mode = "historicalSpinup", fixFpc = FALSE )
calcCarbonLitter( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical", mode = "historicalSpinup", fixFpc = FALSE )
lpjmlNatveg |
Switch between LPJmL natveg versionstop |
climatetype |
Switch between different climate scenarios |
mode |
"historicalSpinup" for historical period and "magpieInput" for future |
fixFpc |
if TRUE using fixed (old) fpc data |
List of magpie object with results on cellular level, weight on cellular level, unit and description.
Kristine Karstens
## Not run: calcOutput("CarbonLitter", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("CarbonLitter", aggregate = FALSE) ## End(Not run)
Calculates carbon input from manure for cropland.
calcCarbonManure()
calcCarbonManure()
List of magpie object with results on country level, weight on country level, unit and description.
Kristine Karstens
## Not run: calcOutput("CarbonManure") ## End(Not run)
## Not run: calcOutput("CarbonManure") ## End(Not run)
Calculates carbon input from residues for cropland soils.
calcCarbonResidues()
calcCarbonResidues()
List of magpie object with results on cellular level, weight on cellular level, unit and description.
Kristine Karstens
## Not run: calcOutput("CarbonResidues") ## End(Not run)
## Not run: calcOutput("CarbonResidues") ## End(Not run)
This function wraps together the decay rate for all SOC sub-pool per year for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories for a given future climate scenario NOTE: This function only provides hamronized future climate scenario data used as input to MAgPIE. For historical data use calcDecayRaw
calcDecayFuture( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
calcDecayFuture( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
lpjmlNatveg |
Switch between LPJmL natveg versionstop |
climatetype |
Switch between different climate scenarios |
magpie object in cellular or regional resolution for future climate scenarios
Kristine Karstens
## Not run: calcOutput("DecayFuture", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("DecayFuture", aggregate = FALSE) ## End(Not run)
This function wraps together the decay rate for all SOC sub-pool per year for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories
calcDecayRaw( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical", mode = "historicalSpinup" )
calcDecayRaw( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical", mode = "historicalSpinup" )
lpjmlNatveg |
Switch between LPJmL natveg versionstop |
climatetype |
Switch between different climate scenarios |
mode |
"historicalSpinup" for historical period and "magpieInput" for future |
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("Decay", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("Decay", aggregate = FALSE) ## End(Not run)
Calculates the cellular MAgPIE landuse area based on LUH2v2
calcLanduse(period = "states_1900to2010", output = "total")
calcLanduse(period = "states_1900to2010", output = "total")
period |
select historical period (handed over to readLUH2v2) |
output |
"total" or "change" |
List of magpie object with results on cellular level, weight, unit and description.
Kristine Karstens
## Not run: calcOutput("Landuse", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("Landuse", aggregate = FALSE) ## End(Not run)
Calculates Carbon Input from litter to the soil pools of the three pool model (Tier 2 IPCC)
calcLitterSoilinput( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical", fixFpc = FALSE )
calcLitterSoilinput( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical", fixFpc = FALSE )
lpjmlNatveg |
Switch between LPJmL natveg versionstop |
climatetype |
Switch between different climate scenarios |
fixFpc |
if TRUE using fixed (old) fpc data |
List of magpie object with results on cellular level, weight on cellular level, unit and description.
Kristine Karstens
## Not run: calcOutput("calcLitterSoilinput", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("calcLitterSoilinput", aggregate = FALSE) ## End(Not run)
Bring all parameter settings (lignin, nitrogen) for residues together
calcParamManure(input = "IPCC")
calcParamManure(input = "IPCC")
input |
"IPCC" for IPCC Guideline values |
List of magpie object with results on global level, unit and description.
Kristine Karstens
## Not run: calcOutput("ParamManure") ## End(Not run)
## Not run: calcOutput("ParamManure") ## End(Not run)
Bring all parameter settings (lignin, nitrogen) for residues together
calcParamResidues(input = "IPCC+woody")
calcParamResidues(input = "IPCC+woody")
input |
"IPCC" for IPCC Guideline values "IPCC+woody" for IPCC Guideline values + Feedipedia for woody |
List of magpie object with results on global level, unit and description.
Kristine Karstens
## Not run: calcOutput("ParamResidues") ## End(Not run)
## Not run: calcOutput("ParamResidues") ## End(Not run)
This function calculates the fraction of 0 - 30 cm soil mass that is sand (0.050 - 2mm particles)
calcSandFrac()
calcSandFrac()
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("SandFrac", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("SandFrac", aggregate = FALSE) ## End(Not run)
Calculates SOC states
calcSoilCarbon( output = "all", lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
calcSoilCarbon( output = "all", lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
output |
"all" (default), "actualstate", "carbontransfer", "interstate", "naturalstate" |
lpjmlNatveg |
Switch between LPJmL natveg versionstop |
climatetype |
Switch between different climate scenarios |
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("SoilCarbon") ## End(Not run)
## Not run: calcOutput("SoilCarbon") ## End(Not run)
Calculates SOC states
calcSoilCarbonSpinup( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
calcSoilCarbonSpinup( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
lpjmlNatveg |
Switch between LPJmL natveg versionstop |
climatetype |
Switch between different climate scenarios |
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("SoilCarbon") ## End(Not run)
## Not run: calcOutput("SoilCarbon") ## End(Not run)
This function wraps together the steady state for all sub-pool SOC stock for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories
calcSteadyState( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
calcSteadyState( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
lpjmlNatveg |
Switch between LPJmL natveg versionstop |
climatetype |
Switch between different climate scenarios |
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("SteadyState", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("SteadyState", aggregate = FALSE) ## End(Not run)
This function calculates the temperature effect on decomposition for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories
calcTempEffectDecomposition( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
calcTempEffectDecomposition( lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
lpjmlNatveg |
Switch between LPJmL natveg versionstop |
climatetype |
Switch between different climate scenarios |
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("TempEffectDecomposition", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("TempEffectDecomposition", aggregate = FALSE) ## End(Not run)
This function calculates the tillage area shares for different tillage types
calcTillageArea(tillage = "default")
calcTillageArea(tillage = "default")
tillage |
'histtill' or 'mixedtill'; 'mixedtill' assumes full tillage for annual crops, and reduced tillage for perennials. 'histtill' is based on the same assunmptions as 'mixedtill', but additionally accounts for historic data on no tillage areas based on Porwolliks datasets for annual no tillage areas (other option 'default' for using the current default) |
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("TillageArea", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("TillageArea", aggregate = FALSE) ## End(Not run)
This function calculates the tillage effect on decomposition for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories
calcTillageEffectDecomposition(tillage = "default")
calcTillageEffectDecomposition(tillage = "default")
tillage |
tillage type to de considered. 'histtill' is historic tillage area shares based on no tillage areas from Porwollik together with rule based assumption; 'mixedtill' includes pure rule based assumptions. Other options: 'fulltill', 'notill', 'reducedtill', 'default' |
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("TillageEffectDecomposition", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("TillageEffectDecomposition", aggregate = FALSE) ## End(Not run)
This function calculates the fraction of active SOC sub-pool decay products transferred to the slow SOC sub-pool for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories
calcTransferActive2Slow()
calcTransferActive2Slow()
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("TransferActive2Slow", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("TransferActive2Slow", aggregate = FALSE) ## End(Not run)
This function calculates the water effect on decomposition for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories for rainfed and irrigated systems
calcWaterEffectDecomposition( irrigation = "mixedirrig", lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
calcWaterEffectDecomposition( irrigation = "mixedirrig", lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de", climatetype = "GSWP3-W5E5:historical" )
irrigation |
irrigation type to de considered. Default (mixedirrig) is historic irrigation area shares to calculate area weighted mean over rainfed and irrigated factors. Other options: rainfed, irrigated |
lpjmlNatveg |
Switch between LPJmL natveg versionstop |
climatetype |
Switch between different climate scenarios |
magpie object in cellular resolution
Kristine Karstens
## Not run: calcOutput("WaterEffectDecomposition", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("WaterEffectDecomposition", aggregate = FALSE) ## End(Not run)
Read historical tillage data set based on (https://www.earth-syst-sci-data.net/11/823/2019/)
correctPorwolliksGriddedTillage(x)
correctPorwolliksGriddedTillage(x)
x |
magpie object provided by the read function |
List of magpie objects with results on cellular level, weight, unit and description.
Kristine Karstens
## Not run: readSource("PorwolliksGriddedTillage", convert = "onlycorrect") ## End(Not run)
## Not run: readSource("PorwolliksGriddedTillage", convert = "onlycorrect") ## End(Not run)
This function download the IPCC table data
downloadIPCCSoil()
downloadIPCCSoil()
magpie object with global parameters
Kristine Karstens
## Not run: downloadSource("IPCCSoil")
## Not run: downloadSource("IPCCSoil")
Read parameter files from Brovkin Paper (doi:10.5194/bg-9-565-2012)
readBrovkin()
readBrovkin()
List of magpie objects with results on global level
Kristine Karstens
## Not run: readSource("Brovkin", convert = FALSE) ## End(Not run)
## Not run: readSource("Brovkin", convert = FALSE) ## End(Not run)
Read IPCC Guideline tables
readIPCCSoil(subtype = "steady_state")
readIPCCSoil(subtype = "steady_state")
subtype |
Switch between different input |
List of magpie objects with results on cellular level, weight, unit and description.
Kristine Karstens
## Not run: readSource("IPCCSoil") ## End(Not run)
## Not run: readSource("IPCCSoil") ## End(Not run)
Read parameter files from LPJmL model
readLPJmL_par(subtype = "pft_lpjml4")
readLPJmL_par(subtype = "pft_lpjml4")
subtype |
Switch between different parameter files |
List of magpie objects with results on global level
Kristine Karstens
## Not run: readSource("LPJmL_par", subtype = "pft_lpjml4") ## End(Not run)
## Not run: readSource("LPJmL_par", subtype = "pft_lpjml4") ## End(Not run)
Read historical tillage data set based on (https://www.earth-syst-sci-data.net/11/823/2019/)
readPorwolliksGriddedTillage()
readPorwolliksGriddedTillage()
List of magpie objects with results on cellular level, weight, unit and description.
Kristine Karstens
## Not run: readSource("PorwolliksGriddedTillage") ## End(Not run)
## Not run: readSource("PorwolliksGriddedTillage") ## End(Not run)
This function compiles carbon inputs multipliers for steady state calculations for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 IPP Guidelines for National Greenhouse Gas Inventories
toolCarbonInputMultiplier(inputProp, soilParam, f4act2slo, f2struc2act)
toolCarbonInputMultiplier(inputProp, soilParam, f4act2slo, f2struc2act)
inputProp |
input properties: lignin to c (LC) and nitrogen to c (NC) ratio on cellular or global resolution, with or without time resolution |
soilParam |
soil model parameters (via readSource("IPCCSoil")) |
f4act2slo |
stabilization efficiencies for active pool decay products entering the passive pool (this factor is sand content depending and therefore spatial explicit) |
f2struc2act |
stabilization efficiencies for structural decay products entering the active pool (this factor is tillage type depending and can but not must be spatial explicit) |
magpie object in input resolution
Kristine Karstens
Calculates the cellular MAgPIE landuse change area based on given landuse data and scenario
toolLanduseChange(landuse)
toolLanduseChange(landuse)
landuse |
landuse data |
List of magpie object with results on cellular level
Kristine Karstens
This function cycles the carbon on an annual basis between the different soil pools
toolSoilCarbonCycling(soilCarbonInit, soilCarbonSteadyState, decay, landuse)
toolSoilCarbonCycling(soilCarbonInit, soilCarbonSteadyState, decay, landuse)
soilCarbonInit |
soil carbon initialization |
soilCarbonSteadyState |
steadystates |
decay |
decay rates |
landuse |
landuse |
magpie object with global parameters
Kristine Karstens