water_usage: water_usage

View source: R/water_usage.R

water_usageR Documentation

water_usage

Description

reads area usage from a MAgPIE gdx file

Usage

water_usage(
  gdx,
  file = NULL,
  level = "reg",
  users = NULL,
  sum = FALSE,
  digits = 4,
  dir = "."
)

Arguments

gdx

GDX file

file

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

level

spatial level of aggregation: "grid" (grid-cell) "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in gdxAggregate

users

NULL or "sectors" or "kcr" or "kli". If NULL, all sectors including crop-wise water use and livestock will be obtained. If sectors, will only report for high-level sectors - agriculture, industry, electricity, domestic, ecosystem. Sum is applicable only in the case of sectors

sum

determines whether output should be sector specific (FALSE) or aggregated over all sectors (TRUE)

digits

integer. For rounding of the return values

dir

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

Value

A MAgPIE object containing the water usage (km^3/yr)

Author(s)

Markus Bonsch, Vartika Singh, Felicitas Beier

Examples

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

## End(Not run)


pik-piam/magpie4 documentation built on April 17, 2024, 9:22 a.m.