carbonstock: carbonstock

View source: R/carbonstock.R

carbonstockR Documentation

carbonstock

Description

reads carbon stocks out of a MAgPIE gdx file

Usage

carbonstock(
  gdx,
  file = NULL,
  level = "cell",
  sum_cpool = TRUE,
  sum_land = TRUE,
  subcategories = NULL,
  stockType = "actual"
)

Arguments

gdx

GDX file

file

a file name the output should be written to using write.magpie

level

Level of regional aggregation; "cell", "reg" (regional), "glo" (global), "regglo" (regional and global) or any secdforest aggregation level defined in superAggregate

sum_cpool

sum over carbon pool dimension (default = TRUE)

sum_land

sum over land type dimension (default = TRUE)

subcategories

NULL or vector of strings. If NULL, no subcategories are returned. Meaningful options are "crop, "forestry" and "other"

stockType

carbon stock type (default = "actual"). Options: "actual", "previousLandPattern" and "previousCarbonDensity".

Details

carbon pools consist of vegetation carbon (vegc), litter carbon (litc) and soil carbon (soilc)

Value

carbon stocks in MtC

Author(s)

Florian Humpenoeder

Examples


  ## Not run: 
    x <- carbonstock(gdx)
  
## End(Not run)


pik-piam/magpie4 documentation built on Dec. 20, 2024, 1:59 p.m.