Package 'mrsoil'

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

Help Index


mrsoil: 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.

Author(s)

Maintainer: Kristine Karstens [email protected]

Authors:

See Also

Useful links:


calcCarbonInputMulitplier

Description

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

Usage

calcCarbonInputMultiplier(inputType = "kcr")

Arguments

inputType

switch between 'kcr' (default), or 'kli', 'generic'

Value

magpie object on choosen resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("CarbonInputMulitplier", aggregate = FALSE, input = generic)

## End(Not run)

calcCarbonLitter

Description

Calculates Carbon Input from litter

Usage

calcCarbonLitter(
  lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de",
  climatetype = "GSWP3-W5E5:historical",
  mode = "historicalSpinup",
  fixFpc = FALSE
)

Arguments

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

Value

List of magpie object with results on cellular level, weight on cellular level, unit and description.

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("CarbonLitter", aggregate = FALSE)

## End(Not run)

calcCarbonManure

Description

Calculates carbon input from manure for cropland.

Usage

calcCarbonManure()

Value

List of magpie object with results on country level, weight on country level, unit and description.

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("CarbonManure")

## End(Not run)

calcCarbonResidues

Description

Calculates carbon input from residues for cropland soils.

Usage

calcCarbonResidues()

Value

List of magpie object with results on cellular level, weight on cellular level, unit and description.

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("CarbonResidues")

## End(Not run)

calcDecayFuture

Description

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

Usage

calcDecayFuture(
  lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de",
  climatetype = "GSWP3-W5E5:historical"
)

Arguments

lpjmlNatveg

Switch between LPJmL natveg versionstop

climatetype

Switch between different climate scenarios

Value

magpie object in cellular or regional resolution for future climate scenarios

Author(s)

Kristine Karstens

See Also

calcDecayRaw

Examples

## Not run: 
calcOutput("DecayFuture", aggregate = FALSE)

## End(Not run)

calcDecayRaw

Description

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

Usage

calcDecayRaw(
  lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de",
  climatetype = "GSWP3-W5E5:historical",
  mode = "historicalSpinup"
)

Arguments

lpjmlNatveg

Switch between LPJmL natveg versionstop

climatetype

Switch between different climate scenarios

mode

"historicalSpinup" for historical period and "magpieInput" for future

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("Decay", aggregate = FALSE)

## End(Not run)

calcLanduse

Description

Calculates the cellular MAgPIE landuse area based on LUH2v2

Usage

calcLanduse(period = "states_1900to2010", output = "total")

Arguments

period

select historical period (handed over to readLUH2v2)

output

"total" or "change"

Value

List of magpie object with results on cellular level, weight, unit and description.

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("Landuse", aggregate = FALSE)

## End(Not run)

calcLitterSoilinput

Description

Calculates Carbon Input from litter to the soil pools of the three pool model (Tier 2 IPCC)

Usage

calcLitterSoilinput(
  lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de",
  climatetype = "GSWP3-W5E5:historical",
  fixFpc = FALSE
)

Arguments

lpjmlNatveg

Switch between LPJmL natveg versionstop

climatetype

Switch between different climate scenarios

fixFpc

if TRUE using fixed (old) fpc data

Value

List of magpie object with results on cellular level, weight on cellular level, unit and description.

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("calcLitterSoilinput", aggregate = FALSE)

## End(Not run)

calcParamManure

Description

Bring all parameter settings (lignin, nitrogen) for residues together

Usage

calcParamManure(input = "IPCC")

Arguments

input

"IPCC" for IPCC Guideline values

Value

List of magpie object with results on global level, unit and description.

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("ParamManure")

## End(Not run)

calcParamResidues

Description

Bring all parameter settings (lignin, nitrogen) for residues together

Usage

calcParamResidues(input = "IPCC+woody")

Arguments

input

"IPCC" for IPCC Guideline values "IPCC+woody" for IPCC Guideline values + Feedipedia for woody

Value

List of magpie object with results on global level, unit and description.

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("ParamResidues")

## End(Not run)

calcSandFrac

Description

This function calculates the fraction of 0 - 30 cm soil mass that is sand (0.050 - 2mm particles)

Usage

calcSandFrac()

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

See Also

readSoilGrids

Examples

## Not run: 
calcOutput("SandFrac", aggregate = FALSE)

## End(Not run)

calcSoilCarbon

Description

Calculates SOC states

Usage

calcSoilCarbon(
  output = "all",
  lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de",
  climatetype = "GSWP3-W5E5:historical"
)

Arguments

output

"all" (default), "actualstate", "carbontransfer", "interstate", "naturalstate"

lpjmlNatveg

Switch between LPJmL natveg versionstop

climatetype

Switch between different climate scenarios

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("SoilCarbon")

## End(Not run)

calcSoilCarbonSpinup

Description

Calculates SOC states

Usage

calcSoilCarbonSpinup(
  lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de",
  climatetype = "GSWP3-W5E5:historical"
)

Arguments

lpjmlNatveg

Switch between LPJmL natveg versionstop

climatetype

Switch between different climate scenarios

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("SoilCarbon")

## End(Not run)

calcSteadyState

Description

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

Usage

calcSteadyState(
  lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de",
  climatetype = "GSWP3-W5E5:historical"
)

Arguments

lpjmlNatveg

Switch between LPJmL natveg versionstop

climatetype

Switch between different climate scenarios

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("SteadyState", aggregate = FALSE)

## End(Not run)

calcTempEffectDecomposition

Description

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

Usage

calcTempEffectDecomposition(
  lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de",
  climatetype = "GSWP3-W5E5:historical"
)

Arguments

lpjmlNatveg

Switch between LPJmL natveg versionstop

climatetype

Switch between different climate scenarios

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("TempEffectDecomposition", aggregate = FALSE)

## End(Not run)

calcTillageArea

Description

This function calculates the tillage area shares for different tillage types

Usage

calcTillageArea(tillage = "default")

Arguments

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)

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("TillageArea", aggregate = FALSE)

## End(Not run)

calcTillageEffectDecomposition

Description

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

Usage

calcTillageEffectDecomposition(tillage = "default")

Arguments

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'

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
  calcOutput("TillageEffectDecomposition", aggregate = FALSE)

## End(Not run)

calcTransferActive2Slow

Description

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

Usage

calcTransferActive2Slow()

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("TransferActive2Slow", aggregate = FALSE)

## End(Not run)

calcWaterEffectDecomposition

Description

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

Usage

calcWaterEffectDecomposition(
  irrigation = "mixedirrig",
  lpjmlNatveg = "LPJmL4_for_MAgPIE_44ac93de",
  climatetype = "GSWP3-W5E5:historical"
)

Arguments

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

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens

Examples

## Not run: 
calcOutput("WaterEffectDecomposition", aggregate = FALSE)

## End(Not run)

correctPorwolliksGriddedTillage

Description

Read historical tillage data set based on (https://www.earth-syst-sci-data.net/11/823/2019/)

Usage

correctPorwolliksGriddedTillage(x)

Arguments

x

magpie object provided by the read function

Value

List of magpie objects with results on cellular level, weight, unit and description.

Author(s)

Kristine Karstens

See Also

readLPJmL_new, read.LPJ_input

Examples

## Not run: 
readSource("PorwolliksGriddedTillage", convert = "onlycorrect")

## End(Not run)

downloadIPCCSoil

Description

This function download the IPCC table data

Usage

downloadIPCCSoil()

Value

magpie object with global parameters

Author(s)

Kristine Karstens

See Also

readIPCCSoil

Examples

## Not run:  downloadSource("IPCCSoil")

readBrovkin

Description

Read parameter files from Brovkin Paper (doi:10.5194/bg-9-565-2012)

Usage

readBrovkin()

Value

List of magpie objects with results on global level

Author(s)

Kristine Karstens

Examples

## Not run: 
readSource("Brovkin", convert = FALSE)

## End(Not run)

readIPCCSoil

Description

Read IPCC Guideline tables

Usage

readIPCCSoil(subtype = "steady_state")

Arguments

subtype

Switch between different input

Value

List of magpie objects with results on cellular level, weight, unit and description.

Author(s)

Kristine Karstens

See Also

downloadIPCCSoil,

Examples

## Not run: 
readSource("IPCCSoil")

## End(Not run)

readLPJmL_par

Description

Read parameter files from LPJmL model

Usage

readLPJmL_par(subtype = "pft_lpjml4")

Arguments

subtype

Switch between different parameter files

Value

List of magpie objects with results on global level

Author(s)

Kristine Karstens

Examples

## Not run: 
readSource("LPJmL_par", subtype = "pft_lpjml4")

## End(Not run)

readPorwolliksGriddedTillage

Description

Read historical tillage data set based on (https://www.earth-syst-sci-data.net/11/823/2019/)

Usage

readPorwolliksGriddedTillage()

Value

List of magpie objects with results on cellular level, weight, unit and description.

Author(s)

Kristine Karstens

See Also

readLPJmL_new, read.LPJ_input

Examples

## Not run: 
readSource("PorwolliksGriddedTillage")

## End(Not run)

toolCarbonInputMulitplier

Description

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

Usage

toolCarbonInputMultiplier(inputProp, soilParam, f4act2slo, f2struc2act)

Arguments

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)

Value

magpie object in input resolution

Author(s)

Kristine Karstens


toolLanduseChange

Description

Calculates the cellular MAgPIE landuse change area based on given landuse data and scenario

Usage

toolLanduseChange(landuse)

Arguments

landuse

landuse data

Value

List of magpie object with results on cellular level

Author(s)

Kristine Karstens


toolSoilCarbonCycling

Description

This function cycles the carbon on an annual basis between the different soil pools

Usage

toolSoilCarbonCycling(soilCarbonInit, soilCarbonSteadyState, decay, landuse)

Arguments

soilCarbonInit

soil carbon initialization

soilCarbonSteadyState

steadystates

decay

decay rates

landuse

landuse

Value

magpie object with global parameters

Author(s)

Kristine Karstens