croparea: croparea

View source: R/croparea.R

cropareaR Documentation

croparea

Description

reads croparea out of a MAgPIE gdx file. Croparea excludes fallow land.

Usage

croparea(
  gdx,
  file = NULL,
  level = "reg",
  products = "kcr",
  product_aggr = TRUE,
  water_aggr = TRUE,
  dir = ".",
  spamfiledirectory = ""
)

Arguments

gdx

GDX file

file

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

level

Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in gdxAggregate

products

Selection of products (either by naming products, e.g. "tece", or naming a set,e.g."kcr")

product_aggr

aggregate over products or not (boolean)

water_aggr

aggregate irrigated and non-irriagted production or not (boolean).

dir

for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation

spamfiledirectory

deprecated. please use dir instead

Value

production as MAgPIE object (unit depends on attributes)

Author(s)

Jan Philipp Dietrich, Florian Humpenoeder

See Also

reportCroparea

Examples

## Not run: 
x <- croparea(gdx)

## End(Not run)


pik-piam/magpie4 documentation built on Sept. 14, 2024, 10:08 p.m.