production: production

View source: R/production.R

productionR Documentation

production

Description

reads production out of a MAgPIE gdx file

Usage

production(
  gdx,
  file = NULL,
  level = "reg",
  products = "kall",
  product_aggr = FALSE,
  attributes = "dm",
  water_aggr = TRUE,
  dir = ".",
  cumulative = FALSE,
  baseyear = 1995
)

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)

attributes

dry matter: Mt ("dm"), gross energy: PJ ("ge"), reactive nitrogen: Mt ("nr"), phosphor: Mt ("p"), potash: Mt ("k"), wet matter: Mt ("wm"). Can also be a vector.

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

cumulative

Logical; Determines if production is reported annually (FALSE, default) or cumulative (TRUE)

baseyear

Baseyear used for cumulative production (default = 1995)

Value

production as MAgPIE object (unit depends on attributes and cumulative)

Author(s)

Benjamin Leon Bodirsky

See Also

reportProduction, demand

Examples

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

## End(Not run)


pik-piam/magpie4 documentation built on May 2, 2024, 5:29 p.m.