getReportAgMIP: getReportAgMIP

View source: R/getReportAgMIP.R

getReportAgMIPR Documentation

getReportAgMIP

Description

Puts together a report for the Agricultural Model Intercom- parison and Improvement Project (AgMIP) based on a MAgPIE gdx file

Usage

getReportAgMIP(
  gdx,
  file = NULL,
  scenario = NULL,
  filter = c(1, 2, 7),
  detail = TRUE,
  dir = ".",
  ...
)

Arguments

gdx

GDX file

file

a file name the output should be written to using write.report. If NULL the report is returned instead as a MAgPIE object.

scenario

Name of the scenario used for the list-structure of a reporting object (x$scenario$MAgPIE). If NULL the report is returned instead as a MAgPIE object.

filter

Modelstat filter. Here you have to set the modelstat values for which results should be used. All values for time steps in which the modelstat is different or for which one of the previous modelstats were different are set to NA.

detail

Crop specific (TRUE) or aggregated outputs (FALSE)

dir

for gridded intermediate outputs: magpie output directory which contains a mapping file (rds or spam)

...

additional arguments for write.report. Will only be taken into account if argument "file" is not NULL.

Details

Reports are organize with '|' as level delimiter and summation symbols for grouping subcategories into entities e.g. for stackplots. Notice the following hints for the summation symbol placement:

  • Every name should just contain one summation symbol (mostly '+').

  • The position of the symbol (counted in '|' from left side) will determine the level.

  • Every subitem containing the same summation symbol in the same level with the same supercategory name will be summed.

  • Items without any summation symbol will ge ignored.

  • Items with different summation symbols will be summed up separately.

  • In most of the cases a summation symbol will be just placed before the last level (counted in '|' from left side).

  • It is helpful to think about which group of items should be stacked in a stackplot.

An example how a summation symbol placement could look like:

  Toplevel
  Toplevel|+|Item 1
  Toplevel|+|Item 2
  Toplevel|Item 2|+|Subitem 1
  Toplevel|Item 2|+|Subitem 1
  Toplevel|++|Item A
  Toplevel|++|Item B
  Toplevel|Item ?

Value

A MAgPIE object containing the report in the case that "file" is NULL.

Author(s)

Florian Humpenoeder, Isabelle Weindl, Felicitas Beier

Examples

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

## End(Not run)


pik-piam/magpie4 documentation built on April 22, 2024, 3:34 p.m.