Title: | MAgPIE outputs R package for MAgPIE version 4.x |
---|---|
Description: | Common output routines for extracting results from the MAgPIE framework (versions 4.x). |
Authors: | Benjamin Leon Bodirsky [aut, cre], Florian Humpenoeder [aut], Jan Philipp Dietrich [aut], Miodrag Stevanovic [aut], Isabelle Weindl [aut], Kristine Karstens [aut], Xiaoxi Wang [aut], Abhijeet Mishra [aut], Felicitas Beier [aut], Jannes Breier [aut], Amsalu Woldie Yalew [aut], David Chen [aut], Anne Biewald [aut], Stephen Wirth [aut], Patrick von Jeetze [aut], Debbora Leip [aut], Michael Crawford [aut], Marcos Alves [aut], Markus Bonsch [ctb], Singh Vartika [ctb] |
Maintainer: | Benjamin Leon Bodirsky <[email protected]> |
License: | LGPL-3 | file LICENSE |
Version: | 2.15.6 |
Built: | 2024-11-15 11:19:56 UTC |
Source: | https://github.com/pik-piam/magpie4 |
Common output routines for extracting results from the MAgPIE framework (versions 4.x).
Maintainer: Jan Philipp Dietrich <[email protected]>
Useful links:
Report bugs at https://github.com/pik-piam/magpie4/issues
Enriches land use data on cluster resolution geometry information as required for conversion by magclass::as.SpatVector
addGeometry(x, clustermap)
addGeometry(x, clustermap)
x |
Landuse data on cluster/cell resolution as a magclass object |
clustermap |
A dataframe mapping with columns cluster, cell, and country |
A magclass object enriched with geometry information
Jan Philipp Dietrich, Pascal Sauer
## Not run: landUse <- magpie4::land("fulldata.gdx", level = "cell") clustermap <- readRDS(Sys.glob("clustermap_*.rds")) landUseEnriched <- magpie4::addGeometry(landUse, clustermap) attr(landUseEnriched, "geometry") attr(landUseEnriched, "crs") ## End(Not run)
## Not run: landUse <- magpie4::land("fulldata.gdx", level = "cell") clustermap <- readRDS(Sys.glob("clustermap_*.rds")) landUseEnriched <- magpie4::addGeometry(landUse, clustermap) attr(landUseEnriched, "geometry") attr(landUseEnriched, "crs") ## End(Not run)
returns employment in crop+livestock production from MAgPIE results
agEmployment( gdx, type = "absolute", detail = TRUE, level = "reg", file = NULL, dir = "." )
agEmployment( gdx, type = "absolute", detail = TRUE, level = "reg", file = NULL, dir = "." )
gdx |
GDX file |
type |
"absolute" for total number of people employed, "share" for share out of working age population |
detail |
if TRUE, employment is disaggregated to crop products, livestock products and (if available) mitigation measures, if FALSE only aggregated employment is reported |
level |
spatial aggregation to report employment ("iso", "reg", "glo" or "regglo", if type is "absolute" also "grid") |
file |
a file name the output should be written to using write.magpie |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
employment in agriculture as absolute value or as percentage of working age population
Debbora Leip
## Not run: x <- agEmployment(gdx) ## End(Not run)
## Not run: x <- agEmployment(gdx) ## End(Not run)
Reads data to calculate the agricultural GDP
AgGDP(gdx, file = NULL, level = "reg")
AgGDP(gdx, file = NULL, level = "reg")
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 superAggregate |
A MAgPIE object containing values related with overall value of production [million US$17]
Edna Molina Bacca
## Not run: x <- AgGDP(gdx) ## End(Not run)
## Not run: x <- AgGDP(gdx) ## End(Not run)
calculates Agricultural Research Intensity (Investment in AgR&D/Total GDP) from a MAgPIE gdx file
AgriResearchIntensity(gdx, file = NULL, level = "reg")
AgriResearchIntensity(gdx, file = NULL, level = "reg")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
aggregation level, reg, glo or regglo, cell or grid |
David M Chen
## Not run: x <- AgriResearchIntensity(gdx) ## End(Not run)
## Not run: x <- AgriResearchIntensity(gdx) ## End(Not run)
Calculates anthropometic indicators from the food demand model
anthropometrics( gdx, indicator = "bodyheight", age = "adults", sex = FALSE, bmi_groups = FALSE, level = "iso", dir = ".", spamfiledirectory = "", final = TRUE, file = NULL, calibrated = TRUE )
anthropometrics( gdx, indicator = "bodyheight", age = "adults", sex = FALSE, bmi_groups = FALSE, level = "iso", dir = ".", spamfiledirectory = "", final = TRUE, file = NULL, calibrated = TRUE )
gdx |
GDX file |
indicator |
bodyheight, bodyweight, bodyweight_healthy, BMI(Body Mass Index) or PAL (physical activity level) |
age |
if TRUE, demand is scaled down to age-groups and sex using food requirements |
sex |
if FALSE, female and male are aggregated, if sex, results are divided into males and females |
bmi_groups |
if TRUE, data is provided by BMI group |
level |
Level of regional aggregation; "iso" ISO country codes, "reg" (regional), "glo" (global) |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
final |
final results or preliminary results (the latter are the ones magpie uses for optimization before last iteration with demand model) |
file |
a file name the output should be written to using write.magpie |
calibrated |
if TRUE, uses the calibrated intake estimates for bodyweight estimation |
Demand definitions are equivalent to FAO Food supply categories
bodyweight (kg), bodyheight (cm), BMI or PAL as magpie objects
Benjamin Leon Bodirsky
## Not run: x <- anthropometrics(gdx) ## End(Not run)
## Not run: x <- anthropometrics(gdx) ## End(Not run)
calculates the area weighted biodiversity intactness index (BII) out of a MAgPIE gdx file
BII( gdx, file = NULL, level = "glo", mode = "auto", landClass = "sum", spatialWeight = NULL, adjusted = FALSE, bii_coeff = NULL, side_layers = NULL, dir = "." )
BII( gdx, file = NULL, level = "glo", mode = "auto", landClass = "sum", spatialWeight = NULL, adjusted = FALSE, bii_coeff = NULL, side_layers = NULL, dir = "." )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
level of regional aggregation; "cell" (magpie cluster level), "reg" (regional), "glo" (global), "regglo" (regional and global), "iso" (country level), "grid" (0.5 degree grid cell level). |
mode |
"auto" (default), "from_grid", "MAgPIE" or "postprocessing".
|
landClass |
"all" returns average BII values for all land classes of ov_bv, "sum" returns the weighted BII over all land classes of ov44_bv_weighted. |
spatialWeight |
Spatial weight for aggregating BII values. Only relevant if mode is "from_grid", adjusted is TRUE, or level is either "grid" or "iso". |
adjusted |
if "TRUE", function returns adjusted BII values (results have been adjusted for primary and secondary other land). |
bii_coeff |
file containing BII coefficients. Only needed for mode = "postprocessing". NULL tries to automatically detected the file. |
side_layers |
file containing LUH2 side layers. NULL tries to automatically detected the file. |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
Calculates global, regional and cluster-level biodiversity intactness index (BII)
Biodiversity intactness index (unitless)
Patrick v. Jeetze, Florian Humpenoeder, Felicitas Beier
## Not run: x <- BII(gdx) ## End(Not run)
## Not run: x <- BII(gdx) ## End(Not run)
returns demand for bioplastic or demand for substrate for bioplastic production
bioplasticDemand( gdx, type = "bioplastic", detail = FALSE, level = "regglo", file = NULL )
bioplasticDemand( gdx, type = "bioplastic", detail = FALSE, level = "regglo", file = NULL )
gdx |
GDX file |
type |
"bioplastic" for bioplastic demand, "substrate" for biomass demand as substrate for bioplastic production |
detail |
only relevant for type = "substrate". If TRUE, substrate demand is disaggregated by crop type, if FALSE only the aggregated demand is reported. |
level |
spatial aggregation to report bioplastic/substrate demand (only "reg" or "regglo") |
file |
a file name the output should be written to using write.magpie |
Debbora Leip
## Not run: x <- bioplasticDemand(gdx) ## End(Not run)
## Not run: x <- bioplasticDemand(gdx) ## End(Not run)
Calculates the prevalence of underweight, normalweight, overweight (excluding obesity) and obesity. For more detailed body mass classifications see functions population or anthropometrics.
bodyweight( gdx, level = "reg", age = FALSE, sex = FALSE, share = FALSE, dir = ".", spamfiledirectory = "", population = NULL )
bodyweight( gdx, level = "reg", age = FALSE, sex = FALSE, share = FALSE, dir = ".", spamfiledirectory = "", population = NULL )
gdx |
GDX file |
level |
Level of regional aggregation; "iso" ISO country codes, "reg" (regional), "glo" (global) |
age |
if TRUE, demand is scaled down to age-groups and sex using food requirements |
sex |
if FALSE, female and male are aggregated, if sex, results are divided into males and females |
share |
if TRUE, data is provided by BMI group |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
population |
population information from GDX. Can be provided to speed up calculation process. Will be read from GDX, if not provided. |
Demand definitions are equivalent to FAO Food supply categories
MAgPIE object with mio people or share of people in each weight category
Benjamin Leon Bodirsky
## Not run: x <- bodyweight(gdx) ## End(Not run)
## Not run: x <- bodyweight(gdx) ## End(Not run)
reads carbon stored in harvested timber out of a MAgPIE gdx file
carbonHWP( gdx, file = NULL, level = "cell", unit = "element", half_life = 35, cumulative = FALSE, baseyear = 1995 )
carbonHWP( gdx, file = NULL, level = "cell", unit = "element", half_life = 35, cumulative = FALSE, baseyear = 1995 )
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 |
unit |
element" or "gas"; "element": co2_c in Mt C/yr, n2o_n in Mt N/yr, ch4 in Mt CH4/yr; "gas": co2_c Mt CO2/yr, n2o_n in Mt NO2/yr, ch4 in Mt CH4/yr |
half_life |
Half life in years for decay in wood products loosing half theor carbon content. (35 yrs is deafault) |
cumulative |
Logical; Determines if cHWP emissions are reported annually (FALSE) or cumulative (TRUE). The starting point for cumulative emissions is y1995. |
baseyear |
Baseyear used for cumulative emissions (default = 1995) |
Annual (and cumulative) Carbon stored in harvested wood products as well as slow emissions from half life deacy.
carbon stocks in MtC from harvested timber
Abhijeet Mishra, Florian Humpenoeder
## Not run: x <- carbonHWP(gdx) ## End(Not run)
## Not run: x <- carbonHWP(gdx) ## End(Not run)
reads carbon stored in harvested timber out of a MAgPIE gdx file
carbonLTS( gdx, file = NULL, level = "cell", unit = "element", cumulative = FALSE, baseyear = 1995 )
carbonLTS( gdx, file = NULL, level = "cell", unit = "element", cumulative = FALSE, baseyear = 1995 )
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 |
unit |
element" or "gas"; "element": co2_c in Mt C/yr, n2o_n in Mt N/yr, ch4 in Mt CH4/yr; "gas": co2_c Mt CO2/yr, n2o_n in Mt NO2/yr, ch4 in Mt CH4/yr |
cumulative |
Logical; Determines if cHWP emissions are reported annually (FALSE) or cumulative (TRUE). The starting point for cumulative emissions is y1995. |
baseyear |
Baseyear used for cumulative emissions (default = 1995) |
Annual (and cumulative) Carbon stored in harvested wood products as well as slow emissions from half life deacy.
carbon stocks in MtC from harvested timber
Abhijeet Mishra, Florian Humpenoeder
## Not run: x <- carbonLTS(gdx) ## End(Not run)
## Not run: x <- carbonLTS(gdx) ## End(Not run)
reads carbon stocks out of a MAgPIE gdx file
carbonstock( gdx, file = NULL, level = "cell", sum_cpool = TRUE, sum_land = TRUE, subcategories = NULL, stockType = "actual" )
carbonstock( gdx, file = NULL, level = "cell", sum_cpool = TRUE, sum_land = TRUE, subcategories = NULL, stockType = "actual" )
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". |
carbon pools consist of vegetation carbon (vegc), litter carbon (litc) and soil carbon (soilc)
carbon stocks in MtC
Florian Humpenoeder
## Not run: x <- carbonstock(gdx) ## End(Not run)
## Not run: x <- carbonstock(gdx) ## End(Not run)
cellular fit/error/bias calculations at regional and global level
cellularFit( gdx, file = NULL, level = "cell", statistic = "MAE", variable = "land", dataset = "LUH2", water_aggr = FALSE )
cellularFit( gdx, file = NULL, level = "cell", statistic = "MAE", variable = "land", dataset = "LUH2", water_aggr = FALSE )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
level at which the regional and global bias should be calculated. Options "cell" or "grid" |
statistic |
R2, MAE, MPE (mean percentage error - bias), MAPE (mean absolute percentage error) |
variable |
variable to be evaulated: land (land types) or crop (crop types) |
dataset |
dataset to compare with. LUH2 only option for variable land. LUH2 and MAPSPAM for the crop variable. |
water_aggr |
if irrigation types for crops should be agregated or not |
returns selected statistic at regglo level for the historical part of the time horizon
Edna J. Molina Bacca, Patrick v. Jeetze
## Not run: x <- cellularFit(gdx) ## End(Not run)
## Not run: x <- cellularFit(gdx) ## End(Not run)
Function to check if the library functions work with the newest magpie version
checkLibrary(gdx, level = NULL)
checkLibrary(gdx, level = NULL)
gdx |
GDX file |
level |
Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
This function simply tries to run all functions in the magpie library on the provided gdx file.
A list with three entries:
notest
Testing these functions was impossible because there wer missing arguments.
error
These functions could not be executed properly.
fine
Everything was fine with these functions.
Markus Bonsch
## Not run: x <- modelstat(gdx) ## End(Not run)
## Not run: x <- modelstat(gdx) ## End(Not run)
Enriches land use data on cluster resolution with explicit spatial information by creating a terra polygon for each cluster according to the given clustermap.
clusterOutputToTerraVector(x, clustermap)
clusterOutputToTerraVector(x, clustermap)
x |
Landuse data on cluster/cell resolution as a magclass object |
clustermap |
A dataframe mapping with columns cluster, cell, and country |
A SpatVector with the following columns: c("clusterId", "country", "region", "year", "landtype", "value")
Pascal Führlich, Patrick v. Jeetze
## Not run: landUse <- magpie4::land("fulldata.gdx", level = "cell") clustermap <- readRDS(Sys.glob("clustermap_*.rds")) clusterPolygons <- magpie4::clusterOutputToTerraVector(landUse, clustermap) terra::writeVector(clusterPolygons, "cluster_resolution.shp") ## End(Not run)
## Not run: landUse <- magpie4::land("fulldata.gdx", level = "cell") clustermap <- readRDS(Sys.glob("clustermap_*.rds")) clusterPolygons <- magpie4::clusterOutputToTerraVector(landUse, clustermap) terra::writeVector(clusterPolygons, "cluster_resolution.shp") ## End(Not run)
calculates consumption value of different types based on a MAgPIE gdx file.
consumptionValue( gdx, file = NULL, level = "reg", products = "kall", product_aggr = TRUE, type = NULL, type_aggr = TRUE )
consumptionValue( gdx, file = NULL, level = "reg", products = "kall", product_aggr = TRUE, type = NULL, type_aggr = TRUE )
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 superAggregate |
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, default TRUE) |
type |
Consumption type(s): "food", "feed", "processed", "other_util", "bioenergy", "seed", "waste", "dom_balanceflow; NULL returns all types |
type_aggr |
aggregate over demand types or not (boolean, default TRUE) |
A MAgPIE object containing consumption value in million $US.
Miodrag Stevanovic
## Not run: x <- consumptionValue(gdx) ## End(Not run)
## Not run: x <- consumptionValue(gdx) ## End(Not run)
Reads data to calculate capital stocks
CostCapital(gdx, type = "stocks", file = NULL, level = "cell")
CostCapital(gdx, type = "stocks", file = NULL, level = "cell")
gdx |
GDX file |
type |
either capital stocks ("stocks") or overall capital investment "investment" |
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 superAggregate |
A MAgPIE object containing values related with overall value of production [million US$17]
Edna Molina Bacca
## Not run: x <- CostCapital(gdx) ## End(Not run)
## Not run: x <- CostCapital(gdx) ## End(Not run)
Reads data to calculate Input factors with different approaches
costInputFactorsCrop(gdx, type = "annuity", file = NULL, level = "reg")
costInputFactorsCrop(gdx, type = "annuity", file = NULL, level = "reg")
gdx |
GDX file |
type |
Type of capital investments accounting. It can either be total investments ("investment"), or considering the annuity ("annuity") of the current time step. NULL in case the runs were not done with the sticky realization. |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation |
A MAgPIE object containing values related with overall value of production [million US$17]
Edna Molina Bacca
## Not run: x <- costInputFactorsCrop(gdx) ## End(Not run)
## Not run: x <- costInputFactorsCrop(gdx) ## End(Not run)
Gross value of productions
CostOverall(gdx, file = NULL, level = "reg")
CostOverall(gdx, file = NULL, level = "reg")
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 superAggregate |
A MAgPIE object containing values related with overall value of production [million US$17]
Edna Molina Bacca
## Not run: x <- CostOverall(gdx) ## End(Not run)
## Not run: x <- CostOverall(gdx) ## End(Not run)
reads costs entering the objective function from a MAgPIE gdx file
costs(gdx, file = NULL, level = "reg", type = "annuity", sum = TRUE)
costs(gdx, file = NULL, level = "reg", type = "annuity", sum = TRUE)
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 superAggregate |
type |
either "annuity" (as it enters the objetive function) or "investment" (investment) |
sum |
total costs (TRUE) or detailed costs (FALSE) |
A MAgPIE object containing the goal function costs including investments [million US$17]
Jan Philipp Dietrich, Markus Bonsch, Misko Stevanovic, Florian Humpenoeder, Edna J. Molina Bacca, Michael Crawford
## Not run: x <- costs(gdx) ## End(Not run)
## Not run: x <- costs(gdx) ## End(Not run)
reads AEI costs entering the objective function from a MAgPIE gdx file
CostsAEI(gdx, file = NULL, level = "regglo")
CostsAEI(gdx, file = NULL, level = "regglo")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
MAgPIE object containing costs for AEI [million US$17]
Felicitas Beier
## Not run: x <- CostsAEI(gdx) ## End(Not run)
## Not run: x <- CostsAEI(gdx) ## End(Not run)
reads costs entering the objective function from a MAgPIE gdx file
CostsFertilizer(gdx, file = NULL, level = "regglo", disagg = TRUE)
CostsFertilizer(gdx, file = NULL, level = "regglo", disagg = TRUE)
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
disagg |
whether costs should be disaggregated into the different crop types |
MAgPIE object containing fertilizer costs [million US$17]
Debbora Leip
## Not run: x <- CostsFertilizer(gdx) ## End(Not run)
## Not run: x <- CostsFertilizer(gdx) ## End(Not run)
reads costs entering the objective function from a MAgPIE gdx file
costsMACCS(gdx, file = NULL, level = "regglo")
costsMACCS(gdx, file = NULL, level = "regglo")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
MAgPIE object containing mitigation costs [million US$17]
Debbora Leip
## Not run: x <- costsMACCS(gdx) ## End(Not run)
## Not run: x <- costsMACCS(gdx) ## End(Not run)
reads presovle costs (i.e. without bioenergy demand) entering the objective function from a MAgPIE gdx file
costsPresolve(gdx, file = NULL, level = "reg")
costsPresolve(gdx, file = NULL, level = "reg")
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 superAggregate |
Presolve is without bioenergy demand. Hence costs from a MAgPIE run with bioenergy demand minus costs from presolve reflect costs that can be attributed to bioenergy production
A MAgPIE object containing the goal function costs in presolve mode [million US$17]
Florian Humpenoeder
## Not run: x <- costsPresolve(gdx) ## End(Not run)
## Not run: x <- costsPresolve(gdx) ## End(Not run)
Reads data to calculate production costs for crops, costs related with investments are reported as annual average for both types (annuity, investment).
costsProductionCrops( gdx, file = NULL, level = "regglo", type = "investment", dir = "." )
costsProductionCrops( gdx, file = NULL, level = "regglo", type = "investment", dir = "." )
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 |
type |
Type of reporting, either "annuity" or total "investments" |
dir |
directory with mapping for disaggregation to higher resolutions |
A MAgPIE object containing values related with costs for crops production per ton produced [million US$17/tDM]
Edna Molina Bacca
## Not run: x <- costsProductionCrops(gdx) ## End(Not run)
## Not run: x <- costsProductionCrops(gdx) ## End(Not run)
Reads data to calculate wholesale costs
costsWholesale(gdx, file = NULL, level = "regglo")
costsWholesale(gdx, file = NULL, level = "regglo")
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 superAggregate |
A MAgPIE object containing values related with costs wholesale trade [million US$17/tDM]
David M Chen
## Not run: x <- costsWholesale(gdx) ## End(Not run)
## Not run: x <- costsWholesale(gdx) ## End(Not run)
calculates agricultural costs without taxes, incentives and technical penalty costs (i.e. GHG taxes and BII incentives)
CostsWithoutIncentives(gdx, file = NULL, level = "regglo")
CostsWithoutIncentives(gdx, file = NULL, level = "regglo")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
aggregation level, reg, glo or regglo |
A MAgPIE object containing the costs without taxes, incentives and technical penalty costs [million US$17]
David M Chen
## Not run: x <- CostsWithoutIncentives(gdx) ## End(Not run)
## Not run: x <- CostsWithoutIncentives(gdx) ## End(Not run)
Reads data on TC costs
CostTC(gdx, file = NULL, level = "reg")
CostTC(gdx, file = NULL, level = "reg")
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 superAggregate |
A MAgPIE object containing values related with overall value of production [million US$17]
David Chen
## Not run: x <- CostTC(gdx) ## End(Not run)
## Not run: x <- CostTC(gdx) ## End(Not run)
reads costs entering the objective function from a MAgPIE gdx file
CostTransport(gdx, file = NULL, level = "cell", sum = FALSE)
CostTransport(gdx, file = NULL, level = "cell", sum = FALSE)
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 superAggregate |
sum |
total costs (TRUE) or detailed costs (FALSE) |
A MAgPIE object containing the transport costs [million US$17]
David Chen
## Not run: x <- CostTransport(gdx) ## End(Not run)
## Not run: x <- CostTransport(gdx) ## End(Not run)
reads croparea out of a MAgPIE gdx file. Croparea excludes fallow land.
croparea( gdx, file = NULL, level = "reg", products = "kcr", product_aggr = TRUE, water_aggr = TRUE, dir = ".", spamfiledirectory = "" )
croparea( gdx, file = NULL, level = "reg", products = "kcr", product_aggr = TRUE, water_aggr = TRUE, dir = ".", spamfiledirectory = "" )
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 |
production as MAgPIE object (unit depends on attributes)
Jan Philipp Dietrich, Florian Humpenoeder
## Not run: x <- croparea(gdx) ## End(Not run)
## Not run: x <- croparea(gdx) ## End(Not run)
calculates an index that measures the croparea diversity
CropareaDiversityIndex( gdx, index = "shannon", level = "reg", measurelevel = "cell", groupdiv = "agg1", dir = "." )
CropareaDiversityIndex( gdx, index = "shannon", level = "reg", measurelevel = "cell", groupdiv = "agg1", dir = "." )
gdx |
GDX file |
index |
can be "shannon", "gini" or "invsimpson" for different types of diversitiy indices |
level |
Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
measurelevel |
level at which diversity is measured. "cell" means diversity |
groupdiv |
should crop groups be split up into several individual items or not? Choose either FALSE or different (dis)aggregation methods "agg1", "agg2" |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation is measured at cellular level, even if lateron average diversity is aggregated to regional level. |
MAgPIE object (unit depends on attributes)
Benjamin Leon Bodirsky
## Not run: x <- CropareaDiversityIndex(gdx) ## End(Not run)
## Not run: x <- CropareaDiversityIndex(gdx) ## End(Not run)
calculates tree cover on cropland (Mha) from a MAgPIE gdx file
croplandTreeCover(gdx, level = "reg", dir = ".", sum_ac = TRUE, debug = FALSE)
croplandTreeCover(gdx, level = "reg", dir = ".", sum_ac = TRUE, debug = FALSE)
gdx |
GDX file |
level |
aggregation level, reg, glo or regglo, cell or grid |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) |
sum_ac |
sum over age classes TRUE / FALSE |
debug |
debug mode TRUE makes some consistency checks between estimates for different resolutions |
Florian Humpenoeder
## Not run: x <- fallow(gdx) ## End(Not run)
## Not run: x <- fallow(gdx) ## End(Not run)
Function that quantifies the influences of the underlying drivers to a dependent output variable. It attributes the changes of the output variable (A) to changes of several drivers (B, B/C, C/A). The output must be the product of the drivers.
deco(data, names_factor = NULL, plot = FALSE)
deco(data, names_factor = NULL, plot = FALSE)
data |
Decomposition Data as a magpie object. The first column of the third dimension has to be the output (A), while the subsequent columns are the coefficients of the drivers (B,C,...). Example: Area = Population x Supply/Population x Area/Supply. 3rd-dimension column order then has to be: Area, Population, Supply. |
names_factor |
Names of the output (A) and the Decomposition-Factors (B,B/C,C/A), if names_factor=NULL the names for the third column will be generated like the factors for decomposition (above example: Area, Population, Supply/Population, Area/Supply) |
plot |
TRUE or FALSE |
Use function deco_plot in library luplot to make a plot out of this. It is only usable for the decomposition of 5 or less drivers. For documentation, see paper Huber, Veronika, Ina Neher, Benjamin L. Bodirsky, Kathrin Hoefner, and Hans Joachim Schellnhuber. 2014. "Will the World Run out of Land? A Kaya-Type Decomposition to Study Past Trends of Cropland Expansion." Environmental Research Letters 9 (2): 024011. https://doi.org/10.1088/1748-9326/9/2/024011. Or see master Thesis of Ina Neher (2013)
Decomposes the impact of certain drivers to an output (A) value.
Ina Neher, Benjamin Leon Bodirsky
Data<-array(c(1,1.1,1.15,1,1.05,1.1,1,1.05,1.15),c(3,3)) dimnames(Data)<-list(paste("y",2000:2002,sep=""),c("Area","Population","Supply")) Data <- as.magpie(Data) deco(Data)
Data<-array(c(1,1.1,1.15,1,1.05,1.1,1,1.05,1.15),c(3,3)) dimnames(Data)<-list(paste("y",2000:2002,sep=""),c("Area","Population","Supply")) Data <- as.magpie(Data) deco(Data)
Calculates MAgPIE demand out of a gdx file
demand( gdx, file = NULL, level = "reg", products = "kall", product_aggr = FALSE, attributes = "dm", type = NULL, type_aggr = FALSE )
demand( gdx, file = NULL, level = "reg", products = "kall", product_aggr = FALSE, attributes = "dm", type = NULL, type_aggr = FALSE )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
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, default FALSE) |
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. |
type |
Demand type(s): "food", "feed", "processed", "other_util", "bioenergy", "seed", "waste", "dom_balanceflow; NULL returns all types |
type_aggr |
aggregate over demand types or not (boolean, default FALSE) |
Demand definitions are equivalent to FAO CBS categories
demand as MAgPIE object (Unit depends on attributes)
Benjamin Leon Bodirsky, Abhijeet Mishra, Miodrag Stevanovic
## Not run: x <- demand(level="regglo", products="kcr") ## End(Not run)
## Not run: x <- demand(level="regglo", products="kcr") ## End(Not run)
reads bioenergy demand from a MAgPIE gdx file
demandBioenergy(gdx, file = NULL, level = "reg", sum = FALSE, round = NULL)
demandBioenergy(gdx, file = NULL, level = "reg", sum = FALSE, round = NULL)
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 superAggregate |
sum |
1st and 2nd generation bioenergy demand (FALSE) or total bioenergy demand (TRUE) |
round |
NULL or number of digits |
A MAgPIE object containing bioenergy demand in EJ/yr
Jan Philipp Dietrich, Florian Humpenoeder
## Not run: x <- demandBioenergy(gdx) ## End(Not run)
## Not run: x <- demandBioenergy(gdx) ## End(Not run)
reads discount rates from a MAgPIE gdx file
discountRates(gdx, file = NULL, level = "reg")
discountRates(gdx, file = NULL, level = "reg")
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 superAggregate |
A MAgPIE object containing discount rates used in the model
Xiaoxi Wang
## Not run: x <- discountRates(gdx) ## End(Not run)
## Not run: x <- discountRates(gdx) ## End(Not run)
reads detailed CO2 emissions out of a MAgPIE gdx file
emisCO2( gdx, file = NULL, level = "cell", unit = "gas", sum_cpool = TRUE, sum_land = TRUE, cumulative = FALSE, baseyear = 1995, lowpass = 3 )
emisCO2( gdx, file = NULL, level = "cell", unit = "gas", sum_cpool = TRUE, sum_land = TRUE, cumulative = FALSE, baseyear = 1995, lowpass = 3 )
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 superAggregate |
unit |
"element" or "gas"; "element": co2_c in Mt C/yr "gas": co2_c Mt CO2/yr |
sum_cpool |
aggregate carbon pools (TRUE), below ground (soilc) and above ground (vegc and litc) will be reported, if FALSE |
sum_land |
TRUE (default) or FALSE. Sum over land types (TRUE) or report land-type specific emissions (FALSE). |
cumulative |
Logical; Determines if emissions are reported annually (FALSE) or cumulative (TRUE). The starting point for cumulative emissions is y1995. |
baseyear |
Baseyear used for cumulative emissions (default = 1995) |
lowpass |
number of lowpass filter iterations (default = 3) |
CO2 emissions as MAgPIE object (unit depends on unit
)
Florian Humpenoeder, Michael Crawford
## Not run: x <- emisCO2(gdx) ## End(Not run)
## Not run: x <- emisCO2(gdx) ## End(Not run)
reads GHG emissions out of a MAgPIE gdx file
Emissions( gdx, file = NULL, level = "reg", type = "co2_c", unit = "element", subcategories = TRUE, cumulative = FALSE, lowpass = NULL, inorg_fert_split = TRUE )
Emissions( gdx, file = NULL, level = "reg", type = "co2_c", unit = "element", subcategories = TRUE, cumulative = FALSE, lowpass = NULL, inorg_fert_split = TRUE )
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 superAggregate |
type |
emission type(s): "co2_c", "n2o_n" or "ch4" |
unit |
"element", "gas", "GWP100AR5", "GWP100AR6", "GWP*AR5", or "GWP*AR6" "element": co2_c in Mt C/yr, n2o_n in Mt N/yr, ch4 in Mt CH4/yr "gas": co2_c in Mt CO2/yr, n2o_n in Mt NO2/yr, ch4 in Mt CH4/yr "GWP": co2_c in Mt CO2/yr, n2o_n in Mt CO2eq/yr, ch4 in Mt CO2eq/yr |
subcategories |
FALSE (default) or TRUE |
cumulative |
Logical; Determines if emissions are reported annually (FALSE) or cumulative (TRUE). The starting point for cumulative emissions is y1995. |
lowpass |
number of lowpass filter iterations |
inorg_fert_split |
if TRUE then inorganic fertilizer emissions are further disaggregated into pasture- and cropland-related emissions. Both the aggregated ("inorg_fert") and disaggregated values ("inorg_fert_crop", "inorg_fert_past)" are reported |
emissions as MAgPIE object (unit depends on unit
)
Florian Humpenoeder, Benjamin Leon Bodirsky
## Not run: x <- Emissions(gdx) ## End(Not run)
## Not run: x <- Emissions(gdx) ## End(Not run)
reads GHG emissions before technical abatement out of a MAgPIE gdx file. Technical abatement includes all abatement done in the MACC curves, but exclude endogenous mitigation. These emissions are NOT the standard reporting emissions, but used for special purposes like remind-magpie coupling.
EmissionsBeforeTechnicalMitigation( gdx, file = NULL, level = "reg", type = "co2_c", unit = "element", subcategories = FALSE )
EmissionsBeforeTechnicalMitigation( gdx, file = NULL, level = "reg", type = "co2_c", unit = "element", subcategories = FALSE )
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 superAggregate |
type |
emission type(s): "co2_c", "n2o_n" or "ch4" and in the case of unit="gas" "co2" and "n2o" |
unit |
"element", "gas" or "co2eq"; "element": co2_c in Mt C/yr, n2o_n in Mt N/yr, ch4 in Mt CH4/yr; "gas": co2_c Mt CO2/yr, n2o_n in Mt NO2/yr, ch4 in Mt CH4/yr; "co2eq": co2_c in Mt CO2/yr, n2o_n in Mt CO2eq/yr, ch4 in Mt CO2eq/yr |
subcategories |
FALSE (default) or TRUE |
emissions as MAgPIE object (unit depends on unit
)
Florian Humpenoeder; Benjamin Leon Bodirsky
## Not run: x <- EmissionsBeforeTechnicalMitigation(gdx) ## End(Not run)
## Not run: x <- EmissionsBeforeTechnicalMitigation(gdx) ## End(Not run)
calculates food expenditure index (baseyear = 100) corrected for ghg emission costs based on a MAgPIE gdx file
expenditureIndexFood( gdx, file = NULL, level = "reg", products = "kfo", basketyear = "y2010", baseyear = "y2010", round = TRUE, ghgtax = TRUE )
expenditureIndexFood( gdx, file = NULL, level = "reg", products = "kfo", basketyear = "y2010", baseyear = "y2010", round = TRUE, ghgtax = TRUE )
gdx |
GDX file |
file |
File 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 mapping |
products |
Selection of products (either by naming products, e.g. "tece", or naming a set, e.g."kcr") |
basketyear |
Year of reference food basket (should be in the past for comparison of different runs to have identical and comparable food basket) |
baseyear |
Baseyear of the price index |
round |
Rounded result (TRUE or FALSE) |
ghgtax |
Correction of food price expenditure for ghg emission costs (TRUE or FALSE) |
A MAgPIE object containing food price expenditure index
Felicitas Beier
## Not run: x <- expenditureIndexFood(gdx) ## End(Not run)
## Not run: x <- expenditureIndexFood(gdx) ## End(Not run)
reads factor costs for crops, livestock, residues or pasture entering the objective function from a MAgPIE gdx file. Depending on the product and the MAgPIE version (and factor cost realization), factor costs are either already split into labor and capital, will be split in this function, or are kept as the aggregate
factorCosts(gdx, products = "kli", file = NULL, level = "regglo")
factorCosts(gdx, products = "kli", file = NULL, level = "regglo")
gdx |
GDX file |
products |
products for which factor costs should be reported ("kcr", "kli", "kres", "fish", or "pasture") |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
MAgPIE object containing factor costs [million US$17]
Debbora Leip
## Not run: x <- factorCosts(gdx) ## End(Not run)
## Not run: x <- factorCosts(gdx) ## End(Not run)
calculates fallow land (Mha) from a MAgPIE gdx file
fallow(gdx, level = "reg", dir = ".", debug = FALSE)
fallow(gdx, level = "reg", dir = ".", debug = FALSE)
gdx |
GDX file |
level |
aggregation level, reg, glo or regglo, cell or grid |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) |
debug |
debug mode TRUE makes some consistency checks between estimates for different resolutions |
Benjamin Leon Bodirsky
## Not run: x <- fallow(gdx) ## End(Not run)
## Not run: x <- fallow(gdx) ## End(Not run)
calculates feed demand by animal type out of a gdx file
feed( gdx, file = NULL, level = "reg", detail = TRUE, nutrient = "dm", balanceflow = TRUE )
feed( gdx, file = NULL, level = "reg", detail = TRUE, nutrient = "dm", balanceflow = TRUE )
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 superAggregate |
detail |
if FALSE, only total feed demand per animal type is calculated without details on the type of feed |
nutrient |
The nutrient in which the results shall be calculated |
balanceflow |
If true, feed includes the calibration balanceflow |
feed demand by animal type as MAgPIE object (unit depends on selected nutrient attributes)
Isabelle Weindl
## Not run: x <- feed(gdx) ## End(Not run)
## Not run: x <- feed(gdx) ## End(Not run)
Calculates food prices that enter demand module
FoodDemandModuleConsumerPrices(gdx, level = "iso")
FoodDemandModuleConsumerPrices(gdx, level = "iso")
gdx |
GDX file |
level |
reg or iso |
magpie object
Benjamin Leon Bodirsky
## Not run: x <- FoodDemandModuleConsumerPrices(gdx) ## End(Not run)
## Not run: x <- FoodDemandModuleConsumerPrices(gdx) ## End(Not run)
Calculates the food expenditure in USD per year
FoodExpenditure( gdx, level = "reg", after_shock = TRUE, products = "kfo", product_aggr = TRUE, per_capita = TRUE )
FoodExpenditure( gdx, level = "reg", after_shock = TRUE, products = "kfo", product_aggr = TRUE, per_capita = TRUE )
gdx |
GDX file |
level |
spatial aggregation. can be "iso","reg","regglo","glo" |
after_shock |
FALSE is using the exogenous real income and the prices before a shock, TRUE is using the endogeenous real income that takes into account food price change on real income, "after_price_before_demand" takes into account price changes on real income, but assumes no demand adjustment |
products |
selected products or sets of products |
product_aggr |
if true, aggregation over products |
per_capita |
per capita or total population |
magpie object with per capita consumption
Benjamin Leon Bodirsky
## Not run: x <- FoodExpenditure(gdx) ## End(Not run)
## Not run: x <- FoodExpenditure(gdx) ## End(Not run)
MAgPIE food model statistics with information about convergence and number of iterations
foodmodelstat(gdx, file = NULL)
foodmodelstat(gdx, file = NULL)
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
A MAgPIE object containing number of iterations and convergence information for each time step
Jan Philipp Dietrich
## Not run: x <- foodmodelstat(gdx) ## End(Not run)
## Not run: x <- foodmodelstat(gdx) ## End(Not run)
calculates timber yield out of a MAgPIE gdx file
ForestYield(gdx, file = NULL, level = "cell")
ForestYield(gdx, file = NULL, level = "cell")
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 |
Forest yield for timber production
Forest yield for timber production in tDM per ha per year
Abhijeet Mishra, Florian Humpenoeder
## Not run: x <- ForestYield(gdx) ## End(Not run)
## Not run: x <- ForestYield(gdx) ## End(Not run)
aggregates and disaggregates on spatial scales using mappings from the gdx files. Very specific to MAgPIE.
gdxAggregate(gdx, x, weight = NULL, to, absolute = TRUE, dir = ".", ...)
gdxAggregate(gdx, x, weight = NULL, to, absolute = TRUE, dir = ".", ...)
gdx |
gdx file |
x |
object to be aggrgeagted or disaggregated |
weight |
weight can be either an object or a functionname in "", where the function provides the weight |
to |
options: grid, cell, iso, reg, glo, regglo |
absolute |
is it a absolute or a relative value (absolute: tons, relative: tons per hectare) |
dir |
for gridded outputs: magpie output directory which containts clustermap*.rds files for disaggregation. |
... |
further parameters handed on to weight function. |
List of magpie objects with results on country level, weight on country level, unit and description.
Benjamin Leon Bodirsky, Edna J. Molina Bacca, Florian Humpenoeder
## Not run: gdp_pc <- income(gdx, level = "reg") is.function(population) gdp_pc_iso <- gdxAggregate(gdx = gdx, x = gdp_pc, weight = "population", to = "iso", absolute = FALSE) gdp_pc_glo <- gdxAggregate(gdx = gdx, x = gdp_pc, weight = "population", to = "glo", absolute = FALSE) gdp <- income(gdx, level = "reg", per_capita = FALSE) gdp_iso <- gdxAggregate(gdx = gdx, x = gdp, weight = "population", to = "iso", absolute = TRUE) gdp_glo <- gdxAggregate(gdx = gdx, x = gdp, weight = "population", to = "glo", absolute = TRUE) ## End(Not run)
## Not run: gdp_pc <- income(gdx, level = "reg") is.function(population) gdp_pc_iso <- gdxAggregate(gdx = gdx, x = gdp_pc, weight = "population", to = "iso", absolute = FALSE) gdp_pc_glo <- gdxAggregate(gdx = gdx, x = gdp_pc, weight = "population", to = "glo", absolute = FALSE) gdp <- income(gdx, level = "reg", per_capita = FALSE) gdp_iso <- gdxAggregate(gdx = gdx, x = gdp, weight = "population", to = "iso", absolute = TRUE) gdp_glo <- gdxAggregate(gdx = gdx, x = gdp, weight = "population", to = "glo", absolute = TRUE) ## End(Not run)
support function to properly merge deprecated spamfiledirectory and dir input
getDirectory(dir, spamfiledirectory)
getDirectory(dir, spamfiledirectory)
dir |
new directory input |
spamfiledirectory |
old directory input |
a directory
Puts together a report based on a MAgPIE gdx file
getReport( gdx, file = NULL, scenario = NULL, filter = c(1, 2, 7), detail = TRUE, dir = ".", ... )
getReport( gdx, file = NULL, scenario = NULL, filter = c(1, 2, 7), detail = TRUE, dir = ".", ... )
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) |
... |
additional arguments for write.report. Will only be taken into account if argument "file" is not NULL. |
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 ?
A MAgPIE object containing the report in the case that "file" is NULL.
Florian Humpenoeder
## Not run: x <- getReport(gdx) ## End(Not run)
## Not run: x <- getReport(gdx) ## End(Not run)
Puts together a report for the Agricultural Model Intercom- parison and Improvement Project (AgMIP) based on a MAgPIE gdx file
getReportAgMIP( gdx, file = NULL, scenario = NULL, filter = c(1, 2, 7), detail = TRUE, dir = ".", ... )
getReportAgMIP( gdx, file = NULL, scenario = NULL, filter = c(1, 2, 7), detail = TRUE, dir = ".", ... )
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) |
... |
additional arguments for write.report. Will only be taken into account if argument "file" is not NULL. |
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 ?
A MAgPIE object containing the report in the case that "file" is NULL.
Florian Humpenoeder, Isabelle Weindl, Felicitas Beier
## Not run: x <- getReportAgMIP(gdx) ## End(Not run)
## Not run: x <- getReportAgMIP(gdx) ## End(Not run)
Puts together a report based on a MAgPIE gdx file
getReportDemandStandalone( gdx, file = NULL, scenario = NULL, detail = FALSE, ... )
getReportDemandStandalone( gdx, file = NULL, scenario = NULL, detail = FALSE, ... )
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. |
detail |
Crop specific (TRUE) or aggregated outputs (FALSE) |
... |
additional arguments for write.report. Will only be taken into account if argument "file" is not NULL. |
A MAgPIE object containing the report in the case that "file" is NULL.
Florian Humpenoeder
## Not run: x <- getReportDemandStandalone(gdx) ## End(Not run)
## Not run: x <- getReportDemandStandalone(gdx) ## End(Not run)
reports dietary indicators on the country level. These are formatted as data.frames describing: 1. population, anthropometrics, and intake 2. caloric intake by food category (without food waste)
getReportDietaryIndicators(gdx, scenario)
getReportDietaryIndicators(gdx, scenario)
gdx |
filepath of the GDX file |
scenario |
character string describing the scenario configuration |
list of data.frames for the dietary indicators
Michael Crawford, Felicitas Beier, Benjamin Bodirsky
## Not run: getReportDietaryIndicators(gdx, scenario) ## End(Not run)
## Not run: getReportDietaryIndicators(gdx, scenario) ## End(Not run)
Collects outputs from MAgPIE runs for FABLE Scenathon.
getReportFableScenathon(gdx, file = NULL, iso = NULL)
getReportFableScenathon(gdx, file = NULL, iso = NULL)
gdx |
a 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. For the easier reporting in Scenathon tabs, a .csv file extension is recommenended. |
iso |
country/region selection. Default 'NULL', i.e. all 'regglo' reporting |
Miodrag Stevanovic
## Not run: x <- getReportFableScenathon(gdx, file = "magpie2scenathon.csv", iso = "IND") ## End(Not run)
## Not run: x <- getReportFableScenathon(gdx, file = "magpie2scenathon.csv", iso = "IND") ## End(Not run)
Collects reports for Alessandro Passaro's analysis
getReportFSECAlessandroPassaro( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
getReportFSECAlessandroPassaro( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
magpieOutputDir |
a magpie output directory which contains all the files associate with the given scenario |
reportOutputDir |
a folder name for the output to be written to. If NULL the report is not saved to disk, and only returned to the calling function. |
scenario |
the name of the scenario used. If NULL the report is not saved to disk, and only returned to the calling function. |
A list of reports
Michael Crawford
## Not run: x <- getReportFSECAlessandroPassaro(magpieOutputDir) ## End(Not run)
## Not run: x <- getReportFSECAlessandroPassaro(magpieOutputDir) ## End(Not run)
Reports cost indicators for the FSEC project
getReportFSECCosts(gdx, reportOutputDir = NULL, scenario = NULL)
getReportFSECCosts(gdx, reportOutputDir = NULL, scenario = NULL)
gdx |
a GDX file |
reportOutputDir |
a folder name for the output to be written to. If NULL the report is not saved to disk, and only returned to the calling function. |
scenario |
the name of the scenario used. If NULL the report is not saved to disk, and only returned to the calling function. |
A .csv containing the summed output of reportCostsAccounting on the region level
Michael Crawford
## Not run: x <- getReportFSECCosts(gdx) ## End(Not run)
## Not run: x <- getReportFSECCosts(gdx) ## End(Not run)
Reports grid cell level crop diversity for the FSEC project
getReportFSECCropDiversityGrid( gdx, reportOutputDir = NULL, magpieOutputDir, scenario = NULL )
getReportFSECCropDiversityGrid( gdx, reportOutputDir = NULL, magpieOutputDir, scenario = NULL )
gdx |
a GDX file |
reportOutputDir |
a folder name for the output to be written to. If NULL the report is not saved to disk, and only returned to the calling function. |
magpieOutputDir |
a magpie output directory which contains a mapping file (clustermap*.rds) for the disaggregation of grid output |
scenario |
the name of the scenario used. If NULL the report is not saved to disk, and only returned to the calling function. |
A list of MAgPIE objects containing the reports
Patrick v. Jeetze
## Not run: x <- getReportFSECCropDiversityGrid(gdx, magpieOutputDir) ## End(Not run)
## Not run: x <- getReportFSECCropDiversityGrid(gdx, magpieOutputDir) ## End(Not run)
Reports nutrient surplus indicators for the FSEC project
getReportFSECPollution( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
getReportFSECPollution( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
magpieOutputDir |
a magpie output directory which contains a mapping file (clustermap*.rds) for the disaggregation of grid output |
reportOutputDir |
a folder name for the output to be written to. If NULL the report is not saved to disk, and only returned to the calling function. |
scenario |
the name of the scenario used. If NULL the report is not saved to disk, and only returned to the calling function. |
A list of MAgPIE objects containing the reports
Michael Crawford
## Not run: x <- getReportFSECPollution(gdx, magpieOutputDir) ## End(Not run)
## Not run: x <- getReportFSECPollution(gdx, magpieOutputDir) ## End(Not run)
Collects reports for Simon Dietz' social welfare function analysis
getReportFSECSimonDietz( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
getReportFSECSimonDietz( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
magpieOutputDir |
a magpie output directory which contains all the files associate with the given scenario |
reportOutputDir |
a folder name for the output to be written to. If NULL the report is not saved to disk, and only returned to the calling function. |
scenario |
the name of the scenario used. If NULL the report is not saved to disk, and only returned to the calling function. |
A list of reports
Michael Crawford
## Not run: x <- getReportFSECSimonDietz(magpieOutputDir) ## End(Not run)
## Not run: x <- getReportFSECSimonDietz(magpieOutputDir) ## End(Not run)
Collects reports for Steven Lord's cost of action / cost of inaction analysis.
getReportFSECStevenLord(magpieOutputDir, reportOutputDir, scenario)
getReportFSECStevenLord(magpieOutputDir, reportOutputDir, scenario)
magpieOutputDir |
a magpie output directory which contains a mapping file (clustermap*.rds) for the disaggregation of grid output |
reportOutputDir |
a folder name for the output to be written to. If NULL the report is not saved to disk, and only returned to the calling function. |
scenario |
the name of the scenario used. If NULL the report is not saved to disk, and only returned to the calling function. |
Michael Crawford
## Not run: x <- getReportFSECStevenLord(magpieOutputDir) ## End(Not run)
## Not run: x <- getReportFSECStevenLord(magpieOutputDir) ## End(Not run)
Reports all grid-level emissions available for a magpie scenario
getReportGridEmissions( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
getReportGridEmissions( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
magpieOutputDir |
a magpie output directory which contains a mapping file (clustermap*.rds) for the disaggregation of grid output |
reportOutputDir |
a folder name for the output to be written to. If NULL the report is not saved to disk, and only returned to the calling function. |
scenario |
the name of the scenario used. If NULL the report is not saved to disk, and only returned to the calling function. |
A list of MAgPIE objects containing the reports
Michael Crawford
## Not run: x <- getReportGridEmissions(gdx, magpieOutputDir) ## End(Not run)
## Not run: x <- getReportGridEmissions(gdx, magpieOutputDir) ## End(Not run)
Generates and saves a list of reports relevant to the INMS context
getReportGridINMS( gdx, reportOutputDir = NULL, magpieOutputDir, scenario = NULL, filter = c(2, 7), version = "v13" )
getReportGridINMS( gdx, reportOutputDir = NULL, magpieOutputDir, scenario = NULL, filter = c(2, 7), version = "v13" )
gdx |
GDX file |
reportOutputDir |
Directory in which the reports are to be saved. If NULL, a list of reports (MAgPIE objects) is returned instead |
magpieOutputDir |
Directory containing the MAgPIE run which is to be processed |
scenario |
Name of the scenario used for the list-structure of a reporting object (x$scenario$MAgPIE). If NULL a list of reports ( MAgPIE objects) is returned instead. |
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. |
version |
Version number for this analysis |
A list of reports (MAgPIE objects)
Benjamin Leon Bodirsky, Florian Humpenoeder, Michael Crawford
## Not run: x <- getReportGridINMS(gdx) ## End(Not run)
## Not run: x <- getReportGridINMS(gdx) ## End(Not run)
Reports nutrient surplus indicators as well as exceedance of the critical nitrogen surplus at the grid level
getReportGridNitrogenPollution( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
getReportGridNitrogenPollution( magpieOutputDir, reportOutputDir = NULL, scenario = NULL )
magpieOutputDir |
a magpie output directory which contains a mapping file (clustermap*.rds) for the disaggregation of grid output |
reportOutputDir |
a folder name for the output to be written to. If NULL the report is not saved to disk, and only returned to the calling function. |
scenario |
the name of the scenario used. If NULL the report is not saved to disk, and only returned to the calling function. |
A list of MAgPIE objects containing the reports
Michael Crawford
## Not run: x <- getReportGridNitrogenPollution(gdx, magpieOutputDir) ## End(Not run)
## Not run: x <- getReportGridNitrogenPollution(gdx, magpieOutputDir) ## End(Not run)
Puts together a report for the INMS project based on a MAgPIE gdx file
getReportINMS( gdx, file = NULL, scenario = NULL, filter = c(2, 7), detail = TRUE, dir = ".", ... )
getReportINMS( gdx, file = NULL, scenario = NULL, filter = c(2, 7), detail = TRUE, dir = ".", ... )
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 |
directory with spamfiles |
... |
additional arguments for write.report. Will only be taken into account if argument "file" is not NULL. |
A MAgPIE object containing the report in the case that "file" is NULL.
Benjamin Bodirsky, Florian Humpenoeder
## Not run: x <- getReport(gdx) ## End(Not run)
## Not run: x <- getReport(gdx) ## End(Not run)
Puts together a report based on a MAgPIE gdx file
getReportIso( gdx, file = NULL, scenario = NULL, filter = c(1, 2, 7), detail = FALSE, dir = ".", ... )
getReportIso( gdx, file = NULL, scenario = NULL, filter = c(1, 2, 7), detail = FALSE, dir = ".", ... )
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 |
magpie output directory which contains a mapping file (rds) for disaggregation |
... |
additional arguments for write.report. Will only be taken into account if argument "file" is not NULL. |
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 ?
A MAgPIE object containing the report in the case that "file" is NULL.
Florian Humpenoeder
## Not run: x <- getReport(gdx) ## End(Not run)
## Not run: x <- getReport(gdx) ## End(Not run)
Puts together a report for the IIASA GAINS model based on a MAgPIE gdx file
getReportMAgPIE2GAINS( gdx, folder = NULL, scenario = NULL, filter = c(2, 7), dir = ".", ... )
getReportMAgPIE2GAINS( gdx, folder = NULL, scenario = NULL, filter = c(2, 7), dir = ".", ... )
gdx |
GDX file |
folder |
a folder 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. |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
... |
additional arguments for write.report. Will only be taken into account if argument "file" is not NULL. |
A MAgPIE object containing the report in the case that "file" is NULL.
Benjamin Leon Bodirsky, Florian Humpenoeder
Puts together a report for LPJmL or other biophysical models based on a MAgPIE gdx file
getReportMAgPIE2LPJmL( gdx, folder = NULL, scenario = NULL, filter = c(2, 7), dir = ".", spamfiledirectory = "", ... )
getReportMAgPIE2LPJmL( gdx, folder = NULL, scenario = NULL, filter = c(2, 7), dir = ".", spamfiledirectory = "", ... )
gdx |
GDX file |
folder |
a folder 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. |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
... |
additional arguments for write.report. Will only be taken into account if argument "file" is not NULL. |
A MAgPIE object containing the report in the case that "file" is NULL.
Benjamin Leon Bodirsky, Florian Humpenoeder
## Not run: x <- getReportMAgPIE2LPJmL(gdx) ## End(Not run)
## Not run: x <- getReportMAgPIE2LPJmL(gdx) ## End(Not run)
Based on a MAgPIE gdx file, a report is generated containing only the variables relevant for the coupling with REMIND. Basically a copy of getReport, but calling less 'reportXY()' functions.
getReportMAgPIE2REMIND(gdx, file = NULL, scenario = NULL)
getReportMAgPIE2REMIND(gdx, file = NULL, scenario = NULL)
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. |
Reports are organized 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 be silently 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 ?
A MAgPIE object containing the report.
Florian Humpenoeder, David Klein
## Not run: x <- getReportMAgPIE2REMIND(gdx) ## End(Not run)
## Not run: x <- getReportMAgPIE2REMIND(gdx) ## End(Not run)
Puts together all reporting variables for planetary boundary indicators of MAgPIE
getReportPBindicators( gdx, file = NULL, scenario = NULL, filter = c(1, 2, 7), dir = ".", ... )
getReportPBindicators( gdx, file = NULL, scenario = NULL, filter = c(1, 2, 7), dir = ".", ... )
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. |
dir |
for gridded intermediate outputs: magpie output directory which contains a mapping file (rds) |
... |
additional arguments for write.report. Will only be taken into account if argument "file" is not NULL. |
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 ?
A MAgPIE object containing the report in the case that "file" is NULL.
Felicitas Beier
## Not run: x <- getReport(gdx) ## End(Not run)
## Not run: x <- getReport(gdx) ## End(Not run)
Calculates grassland yields based on a MAgPIE gdx file
grassyld(gdx)
grassyld(gdx)
gdx |
GDX file |
A MAgPIE object containing grassland yields values
Marcos Alves
## Not run: x <- grassyld(gdx) ## End(Not run)
## Not run: x <- grassyld(gdx) ## End(Not run)
reads woody growing stock out of a MAgPIE gdx file
GrowingStock(gdx, file = NULL, level = "regglo", indicator = "relative")
GrowingStock(gdx, file = NULL, level = "regglo", indicator = "relative")
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 |
indicator |
If the reported numbers are relative (mio m3/ha) or absolute (mio. m3). Default is relative. |
Growing stock for producing woody materials consist of growing stock from plantations (forestry), secondary and primary forest as well as other land (natveg)
Growing stock in m3 per ha
Abhijeet Mishra
## Not run: x <- GrowingStock(gdx) ## End(Not run)
## Not run: x <- GrowingStock(gdx) ## End(Not run)
Reads wood harvest area separated by source (primforest, secdforest, forestry, other) and age classes from a gdx. The data is on cluster level and the unit is Mha per year.
harvested_area_timber( gdx, file = NULL, level = "cell", aggregateAgeClasses = TRUE )
harvested_area_timber( gdx, file = NULL, level = "cell", aggregateAgeClasses = TRUE )
gdx |
A fulldata.gdx of a magpie run, usually with endogenous forestry enabled |
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 |
aggregateAgeClasses |
If TRUE, age classes are aggregated |
Area harvested for wood in Mha per year as a magpie object
Abhijeet Mishra, Pascal Sauer
returns hourly labor costs in agriculture from MAgPIE results
hourlyLaborCosts(gdx, level = "reg", file = NULL)
hourlyLaborCosts(gdx, level = "reg", file = NULL)
gdx |
GDX file |
level |
spatial aggregation to report employment ("iso", "reg", "glo", or "regglo") |
file |
a file name the output should be written to using write.magpie |
hourly labor costs in agriculture
Debbora Leip
## Not run: x <- hourlyLaborCosts(gdx) ## End(Not run)
## Not run: x <- hourlyLaborCosts(gdx) ## End(Not run)
Calculates the share of people living in hunger.
Hunger( gdx, level = "reg", after_shock = TRUE, calibrated = FALSE, share = TRUE )
Hunger( gdx, level = "reg", after_shock = TRUE, calibrated = FALSE, share = TRUE )
gdx |
GDX file |
level |
spatial aggregation. can be "iso","reg","regglo","glo" |
after_shock |
FALSE is using the exogenous real income and the prices before a shock, TRUE is using the endogeenous real income that takes into account food price change on real income |
calibrated |
if calibrated is TRUE, kcal values are calibrated to better match historical years |
share |
share of population that is undernourished |
magpie object with hunger (mio people) or hunger share
Benjamin Leon Bodirsky
## Not run: x <- Hunger(gdx) ## End(Not run)
## Not run: x <- Hunger(gdx) ## End(Not run)
Calculates income based on a MAgPIE gdx file
income( gdx, file = NULL, level = "reg", per_capita = TRUE, type = "ppp", after_shock = FALSE )
income( gdx, file = NULL, level = "reg", per_capita = TRUE, type = "ppp", after_shock = FALSE )
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 superAggregate |
per_capita |
income per capita or aggregated for the total population |
type |
ppp for purchase power parity, mer for market exchange rate |
after_shock |
FALSE is using the exogenous real income, TRUE is using the endogeenous real income that takes into account food price change on real income |
annual income as MAgPIE object (unit depends on per_capita: US$2017 MER/cap/yr (TRUE), US$2017 MER/yr (FALSE))
Florian Humpenoeder, Benjamin Bodirsky, Felicitas Beier
## Not run: x <- income(gdx) ## End(Not run)
## Not run: x <- income(gdx) ## End(Not run)
Calculates the per-capita kcal intake from the food demand model
Intake( gdx, file = NULL, level = "reg", calibrated = TRUE, pregnancy = FALSE, per_capita = TRUE, age = FALSE, sex = FALSE, bmi_groups = FALSE, dir = ".", spamfiledirectory = "" )
Intake( gdx, file = NULL, level = "reg", calibrated = TRUE, pregnancy = FALSE, per_capita = TRUE, age = FALSE, sex = FALSE, bmi_groups = FALSE, dir = ".", spamfiledirectory = "" )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation; "iso" ISO country codes, "reg" (regional), "glo" (global) |
calibrated |
if FALSE, the true regression outputs are used, if TRUE the values calibrated to the start years are used |
pregnancy |
if TRUE, adding the intake requirements for lactation and pregnancy |
per_capita |
per capita or aggregated for the population |
age |
if FALSE age and sex is aggregated |
sex |
if TRUE, data is provided by sex |
bmi_groups |
if TRUE data is proided by BMI group |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
Demand definitions are equivalent to FAO Food supply categories
calories as MAgPIE object (unit depends on per_capita: kcal/cap/day (TRUE), kcal/day (FALSE))
Benjamin Leon Bodirsky
## Not run: x <- Intake(gdx) ## End(Not run)
## Not run: x <- Intake(gdx) ## End(Not run)
Calculates detailed or aggregated per-capita kcal intake including exogenous scenarios
IntakeDetailed( gdx, file = NULL, level = "reg", product_aggr = FALSE, dir = ".", spamfiledirectory = "" )
IntakeDetailed( gdx, file = NULL, level = "reg", product_aggr = FALSE, dir = ".", spamfiledirectory = "" )
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 superAggregate |
product_aggr |
aggregate over products or not (boolean) |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
Calculation of kcal food intake is possible for both exogenous diet scenarios and endogenous estimation from food demand model
Calories as MAgPIE object (unit: kcal/cap/day)
Isabelle Weindl
## Not run: x <- IntakeDetailed(gdx) ## End(Not run)
## Not run: x <- IntakeDetailed(gdx) ## End(Not run)
Calculates food-specific per-capita protein intake from magpie results in grams.
IntakeDetailedProtein( gdx, file = NULL, level = "reg", product_aggr = FALSE, dir = "." )
IntakeDetailedProtein( gdx, file = NULL, level = "reg", product_aggr = FALSE, dir = "." )
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 superAggregate |
product_aggr |
aggregate over products or not (boolean) |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
Protein intake as MAgPIE object (unit: grams/cap/day)
Vartika Singh, Isabelle Weindl
## Not run: x <- IntakeDetailedProtein(gdx) ## End(Not run)
## Not run: x <- IntakeDetailedProtein(gdx) ## End(Not run)
Calculates the per-capita kcal consumption from the food demand model
Kcal( gdx, file = NULL, level = "reg", products = "kfo", product_aggr = TRUE, after_shock = TRUE, calibrated = TRUE, magpie_input = FALSE, attributes = "kcal", per_capita = TRUE, dir = ".", spamfiledirectory = "" )
Kcal( gdx, file = NULL, level = "reg", products = "kfo", product_aggr = TRUE, after_shock = TRUE, calibrated = TRUE, magpie_input = FALSE, attributes = "kcal", per_capita = TRUE, dir = ".", spamfiledirectory = "" )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation; "iso" ISO country codes, "reg" (regional), "glo" (global) |
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) |
after_shock |
FALSE is using the exogenous real income and the prices before a shock, TRUE is using the endogenous real income that takes into account food price change on real income |
calibrated |
if FALSE, the true regression outputs are used, if TRUE the values calibrated to the start years are used |
magpie_input |
TRUE or FALSE. This setting is only activate if arguments "calibrated" and "after_shock" are set to TRUE and else ignored. If set as TRUE, the per-capita kcal consumption values finally entering MAgPIE as input are used, which drive the behaviour of the MAgPIE model, excluding countries not listed in FAO. If set as FALSE, the per-capita kcal consumption values as calculated in the food demand model are used, including countries not listed in FAO. |
attributes |
unit: kilocalories per day ("kcal"), g protein per day ("protein"). Mt reactive nitrogen ("nr"). |
per_capita |
per capita or aggregated for the population |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
Demand definitions are equivalent to FAO Food supply categories
calories as MAgPIE object (unit depends on per_capita: kcal/cap/day (TRUE), kcal/day (FALSE))
Benjamin Leon Bodirsky, Isabelle Weindl
## Not run: x <- Kcal(gdx) ## End(Not run)
## Not run: x <- Kcal(gdx) ## End(Not run)
reads labor costs for crop and livestock production from gdx file
laborCosts(gdx, products = "kcr", file = NULL, level = "grid", dir = ".")
laborCosts(gdx, products = "kcr", file = NULL, level = "grid", dir = ".")
gdx |
GDX file |
products |
products for which labor costs should be reported ("kcr" or "kli", for other products use factorCosts()) |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("grid" or "iso", for regional/global use factorCosts()) |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
MAgPIE object containing labor costs [million US$17]
Debbora Leip
## Not run: x <- laborCosts(gdx) ## End(Not run)
## Not run: x <- laborCosts(gdx) ## End(Not run)
calculates labor productivity in crop sector (kg DM per hour) from a MAgPIE gdx file
laborProductivity(gdx, level = "reg", productAggr = TRUE)
laborProductivity(gdx, level = "reg", productAggr = TRUE)
gdx |
GDX file |
level |
spatial aggregation to report productivity ("cell","reg", "regglo", "glo") |
productAggr |
Aggregate over products or not (boolean) |
labor productivity in crop sector (kg DM per hour)
Xiaoxi Wang, Ruiying Du, Debbora Leip
## Not run: x <- laborProductivity(gdx) ## End(Not run)
## Not run: x <- laborProductivity(gdx) ## End(Not run)
reads land out of a MAgPIE gdx file
land( gdx, file = NULL, level = "reg", types = NULL, subcategories = NULL, sum = FALSE, dir = ".", spamfiledirectory = "" )
land( gdx, file = NULL, level = "reg", types = NULL, subcategories = NULL, sum = FALSE, dir = ".", spamfiledirectory = "" )
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 |
types |
NULL or a vector of strings. If NULL, all land types are used. Options are "crop", "past", "forestry", "primforest","secdforest, "urban", "other", "primother" and "secdother" |
subcategories |
NULL or vector of strings. If NULL, no subcategories are returned. Meaningful options are "crop, "forestry" and "other" |
sum |
determines whether output should be land-type-specific (FALSE) or aggregated over all types (TRUE). |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
land as MAgPIE object (Mha)
Jan Philipp Dietrich, Florian Humpenoeder, Benjamin Leon Bodirsky, Patrick v. Jeetze
## Not run: x <- land(gdx) ## End(Not run)
## Not run: x <- land(gdx) ## End(Not run)
Calculates MAgPIE MAgPIE land shadow prices based on a gdx file
land_price( gdx, file = NULL, level = "reg", ignore_lowbound = FALSE, absolute = TRUE, digits = 4 )
land_price( gdx, file = NULL, level = "reg", ignore_lowbound = FALSE, absolute = TRUE, digits = 4 )
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 superAggregate |
ignore_lowbound |
Some shadow prices are positive (see Details), corresponding to a lower bound for that pool. |
absolute |
Should the absolute value of all the marginals be taken into calculations? |
digits |
rounding accuracy for the output |
The land price is obtained through marginals of the "oq_cropland" constraint. The majority of these marginals are negative values, and a negligible number of them are positive. This is the consequence of the constraint binding either on upper or lower level. The parameter ignore_lowbound
removes all the positive marginals from land price calculation (negligible), and parameter absolute
transforms them into negative values (to be all together reported as positive values at the final calculation).
A MAgPIE object containing the land shadow prices (US$2017/ha).
Markus Bonsch, Misko Stevanovic
## Not run: x <- land_price(level="regglo", products="kcr") ## End(Not run)
## Not run: x <- land_price(level="regglo", products="kcr") ## End(Not run)
Indirect human-induced emissions in the land use system
landCarbonSink( gdx, file = NULL, level = "reg", cumulative = FALSE, baseyear = 1995, source = "Grassi" )
landCarbonSink( gdx, file = NULL, level = "reg", cumulative = FALSE, baseyear = 1995, source = "Grassi" )
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). |
cumulative |
Logical; Determines if emissions are reported annually (FALSE) or cumulative (TRUE). The starting point for cumulative emissions is y1995. |
baseyear |
Baseyear used for cumulative emissions (default = 1995) |
source |
Currently only "Grassi", which uses pre-calculated adjustment factors from Grassi et al 2021 (DOI 10.1038/s41558-021-01033-6). Can be extended in the future to also include "PIK", based on data from LPJmL. |
Calculates global and regional Land Carbon Sink Adjustment Factors
Land Carbon Sink Adjustment Factors (Mt CO2 per year or cumulative)
Florian Humpenoeder
## Not run: x <- landCarbonSink(gdx) ## End(Not run)
## Not run: x <- landCarbonSink(gdx) ## End(Not run)
reads land conservation information out of a MAgPIE gdx file.
Land restoration 'restore'
is reported in Mha/yr by default but can be
also reported both over the time step length and cumulatively.
landConservation( gdx, file = NULL, level = "cell", cumuRestor = FALSE, baseyear = 1995, annualRestor = FALSE, sum = FALSE, dir = "." )
landConservation( gdx, file = NULL, level = "cell", cumuRestor = FALSE, baseyear = 1995, annualRestor = FALSE, sum = FALSE, dir = "." )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation; "cell", "grid", "iso, "reg" (regional), "glo" (global), "regglo" (regional and global) or any secdforest aggregation level defined in superAggregate |
cumuRestor |
Logical; Whether function should report cumulative land restoration. |
baseyear |
Base year used for cumulative land restoration reporting (default = 1995) |
annualRestor |
Logical; Whether function should report annual land restoration. |
sum |
sum over land pools (default = FALSE) |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
protected areas in primforest, secdforest and other land
protected area in Mha
Florian Humpenoeder, Patrick v. Jeetze
## Not run: x <- landConservation(gdx) ## End(Not run)
## Not run: x <- landConservation(gdx) ## End(Not run)
reads and compiles forestry land subcategories from a MAgPIE gdx file
landForestry(gdx, file = NULL, level = "reg")
landForestry(gdx, file = NULL, level = "reg")
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 superAggregate |
land as MAgPIE object (Mha)
Florian Humpenoeder
## Not run: x <- land(gdx) ## End(Not run)
## Not run: x <- land(gdx) ## End(Not run)
Returns the value of a parameter in the last iteration
lastIter(gdx, param, secondlast = FALSE)
lastIter(gdx, param, secondlast = FALSE)
gdx |
GDX file |
param |
Parameter to be returned |
secondlast |
if TRUE, reads the secondlast iteration. For MAgPIE results, usually there is no last iteration as the food demand model reaches convergence before MAgPIE starts. |
magpie object
Benjamin Leon Bodirsky
## Not run: x <- lastIter(gdx) ## End(Not run)
## Not run: x <- lastIter(gdx) ## End(Not run)
Calculates the share of different livestock commodities in total livestock product consumption on the basis of chosen attribute
LivestockDemStructure( gdx, file = NULL, level = "reg", after_shock = TRUE, calibrated = TRUE, attributes = "kcal", fish = FALSE )
LivestockDemStructure( gdx, file = NULL, level = "reg", after_shock = TRUE, calibrated = TRUE, attributes = "kcal", fish = FALSE )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation; "iso" ISO country codes, "reg" (regional), "glo" (global) |
after_shock |
FALSE is using the exogenous real income and the prices before a shock, TRUE is using the endogeenous real income that takes into account food price change on real income |
calibrated |
if FALSE, the true regression outputs are used, if TRUE the values calibrated to the start years are used |
attributes |
unit: kilocalories per day ("kcal"), g protein per day ("protein"). Mt reactive nitrogen ("nr"). |
fish |
if true, livestock share includes fish, otherwhise not |
magpie object with the livestock demand structure in a region or country. Unit is dimensionsless, but value depends on chosen attribute
Isabelle Weindl
## Not run: x <- LivestockDemStructure(gdx) ## End(Not run)
## Not run: x <- LivestockDemStructure(gdx) ## End(Not run)
Calculates the parameter m_yeardiff, which is a macro within MAgPIE.
m_yeardiff(gdx)
m_yeardiff(gdx)
gdx |
GDX file |
a magpie object with the length of each timestep
Benjamin Leon Bodirsky
## Not run: x <- m_yeardiff(gdx) ## End(Not run)
## Not run: x <- m_yeardiff(gdx) ## End(Not run)
calcluates malmquist index based on a MAgPIE gdx file
malmquist(gdx, file = NULL)
malmquist(gdx, file = NULL)
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
A MAgPIE object containing the malmquist index
Xiaoxi Wang
## Not run: x <- malmquist(gdx) ## End(Not run)
## Not run: x <- malmquist(gdx) ## End(Not run)
downscales Manure Excretion
ManureExcretion( gdx, level = "reg", products = "kli", awms = c("grazing", "stubble_grazing", "fuel", "confinement"), agg = TRUE, dir = "." )
ManureExcretion( gdx, level = "reg", products = "kli", awms = c("grazing", "stubble_grazing", "fuel", "confinement"), agg = TRUE, dir = "." )
gdx |
GDX file |
level |
aggregation level: glo, reg, cell, grid, iso |
products |
livestock products |
awms |
large animal waste management categories: "grazing","stubble_grazing","fuel","confinement"), |
agg |
aggregation over "awms" or over "products". |
dir |
directory with spamfiles |
MAgPIE object
Benjamin Leon Bodirsky
## Not run: x <- ManureExcretion(gdx) ## End(Not run)
## Not run: x <- ManureExcretion(gdx) ## End(Not run)
set metadata comments to magpie4 objects
metadata_comments(x, unit, description, comment, note)
metadata_comments(x, unit, description, comment, note)
x |
magpie object (magpie4) |
unit |
provide unit |
description |
provide short description |
comment |
optional comment |
note |
optional note |
vector of comments following order of input (unit, description, comment, note - further: origin, creation data)
Benjamin Bodirsky, Jannes Breier
## Not run: x <- metadata_comments(x,unit,description,comment,note) ## End(Not run)
## Not run: x <- metadata_comments(x,unit,description,comment,note) ## End(Not run)
MAgPIE model stat of all optimizations - main optimization and (if used) presolve optimization.
modelstat(gdx, file = NULL)
modelstat(gdx, file = NULL)
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
A MAgPIE object containing the modelstat
Jan Philipp Dietrich
## Not run: x <- modelstat(gdx) ## End(Not run)
## Not run: x <- modelstat(gdx) ## End(Not run)
Calculates net forest change based on a MAgPIE gdx file
NetForestChange(gdx, file = NULL, level = "cell", lowpass = 3)
NetForestChange(gdx, file = NULL, level = "cell", lowpass = 3)
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 superAggregate |
lowpass |
number of lowpass filter iterations (default = 3) |
Net Forest Change as MAgPIE object (Mha per year)
Florian Humpenoeder
## Not run: x <- NetForestChange(gdx) ## End(Not run)
## Not run: x <- NetForestChange(gdx) ## End(Not run)
calculates projections of Nitrogen Budgets for Croplands (Tg Nr per) from a MAgPIE gdx file
NitrogenBudget( gdx, include_emissions = FALSE, level = "reg", dir = ".", debug = FALSE, cropTypes = FALSE )
NitrogenBudget( gdx, include_emissions = FALSE, level = "reg", dir = ".", debug = FALSE, cropTypes = FALSE )
gdx |
GDX file |
include_emissions |
TRUE also divides the N surplus into different emissions |
level |
aggregation level, reg, glo or regglo, cell, iso or grid |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
debug |
debug mode TRUE makes some consistency checks between estimates for different resolutions. |
cropTypes |
FALSE for aggregate results; TRUE for crop-specific results |
Benjamin Leon Bodirsky, Michael Crawford, Edna J. Molina Bacca, Florian Humpenoeder
## Not run: x <- NitrogenBudget(gdx) ## End(Not run)
## Not run: x <- NitrogenBudget(gdx) ## End(Not run)
calculates projections of Nitrogen Budgets for non-agricutlural land from a MAgPIE gdx file
NitrogenBudgetNonagland(gdx, level = "reg", dir = ".")
NitrogenBudgetNonagland(gdx, level = "reg", dir = ".")
gdx |
GDX file |
level |
aggregation level, reg, glo or regglo |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
Benjamin Leon Bodirsky, Edna J. Molina Bacca
## Not run: x <- NitrogenBudgetNonagland(gdx) ## End(Not run)
## Not run: x <- NitrogenBudgetNonagland(gdx) ## End(Not run)
calculates projections of Nitrogen Budgets for Croplands from a MAgPIE gdx file
NitrogenBudgetPasture(gdx, include_emissions = FALSE, level = "reg", dir = ".")
NitrogenBudgetPasture(gdx, include_emissions = FALSE, level = "reg", dir = ".")
gdx |
GDX file |
include_emissions |
TRUE also divides the N surplus into different emissions |
level |
aggregation level, reg, glo or regglo, cell, grid, iso |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
Benjamin Leon Bodirsky, Edna J. Molina Bacca
## Not run: x <- NitrogenBudgetPasture(gdx) ## End(Not run)
## Not run: x <- NitrogenBudgetPasture(gdx) ## End(Not run)
calculates projections of Nitrogen Budgets withdrawals for Croplands from a MAgPIE gdx file
NitrogenBudgetWithdrawals( gdx, kcr = "sum", net = TRUE, level = "reg", dir = "." )
NitrogenBudgetWithdrawals( gdx, kcr = "sum", net = TRUE, level = "reg", dir = "." )
gdx |
GDX file |
kcr |
"sum" provides the totals over all crops, "kcr" provides outputs by kcr |
net |
TRUE only provides total net-withdrawals, otherwise all categories are returned (fixation and seed are returned positive, not negative) |
level |
aggregation level, reg, glo or regglo, cell, grid or iso |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
Benjamin Leon Bodirsky, Michael Crawford
## Not run: x <- NitrogenBudgetWithdrawals(gdx) ## End(Not run)
## Not run: x <- NitrogenBudgetWithdrawals(gdx) ## End(Not run)
Disaggregation of other land into initial, restored and recovered land based on a MAgPIE gdx file
OtherLand(gdx, level = "reg")
OtherLand(gdx, level = "reg")
gdx |
GDX file |
level |
Level of regional aggregation; "cell", "reg" (regional), "glo" (global), "regglo" (regional and global) or any aggregation level defined in superAggregate. In addition "climate" for the 3 climate regions tropical, temperate and boreal is available. |
initial, restored and recovered land
Other land area in Mha
Florian Humpenoeder
## Not run: x <- PeatlandArea(gdx) ## End(Not run)
## Not run: x <- PeatlandArea(gdx) ## End(Not run)
Function to safely returns parameters. Function returns either the output or writes it to a file. Please use this function when you write own GDX output functions.
out(x,file)
out(x,file)
x |
an object that can be converted to a MAgPIE object |
file |
file name of a file it should be written to. NULL, if x should be returned instead to be written to a file. |
NULL or x as MAgPIE object
Jan Philipp Dietrich
Function to check a MAgPIE gdx file for known problems (e.g. non-zero dummy variables). The function will throw warnings for problem found in the outputs.
outputCheck(gdx)
outputCheck(gdx)
gdx |
GDX file |
Jan Philipp Dietrich
## Not run: outputCheck(gdx) ## End(Not run)
## Not run: outputCheck(gdx) ## End(Not run)
returns output per worker in crop+livestock production
outputPerWorker(gdx, level = "reg", file = NULL)
outputPerWorker(gdx, level = "reg", file = NULL)
gdx |
GDX file |
level |
spatial aggregation to report employment ("reg", "glo", or "regglo") |
file |
a file name the output should be written to using write.magpie |
output per worker as magpie object
Debbora Leip
## Not run: x <- outputPerWorker(gdx) ## End(Not run)
## Not run: x <- outputPerWorker(gdx) ## End(Not run)
reads peatland area out of a MAgPIE gdx file
PeatlandArea(gdx, file = NULL, level = "cell", sum = TRUE)
PeatlandArea(gdx, file = NULL, level = "cell", sum = TRUE)
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 aggregation level defined in superAggregate. In addition "climate" for the 3 climate regions tropical, temperate and boreal is available. |
sum |
sum over land types TRUE (default) or FALSE |
Intact, degraded and rewettet peatland area
Peatland area in Mha
Florian Humpenoeder
## Not run: x <- PeatlandArea(gdx) ## End(Not run)
## Not run: x <- PeatlandArea(gdx) ## End(Not run)
reads peatland GHG emissions out of a MAgPIE gdx file
PeatlandEmissions( gdx, file = NULL, level = "cell", unit = "gas", cumulative = FALSE, baseyear = 1995, lowpass = 0, sum = TRUE, intact = FALSE )
PeatlandEmissions( gdx, file = NULL, level = "cell", unit = "gas", cumulative = FALSE, baseyear = 1995, lowpass = 0, sum = TRUE, intact = FALSE )
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 aggregation level defined in superAggregate. In addition "climate" for the 3 climate regions tropical, temperate and boreal is available. |
unit |
global warming potential (gwp) or gas (gas) |
cumulative |
FALSE (default) or TRUE |
baseyear |
Baseyear used for cumulative emissions (default = 1995) |
lowpass |
number of lowpass filter iterations (default = 0) |
sum |
sum over land types TRUE (default) or FALSE |
intact |
report GHG emissions from intact peatlands FALSE (default) or TRUE |
Peatland GHG emissions: CO2, DOC, CH4 and N2O
Peatland GHG emissions in Mt CO2eq (if unit="gwp") or Mt of the respective gas (if unit="gas")
Florian Humpenoeder
## Not run: x <- PeatlandArea(gdx) ## End(Not run)
## Not run: x <- PeatlandArea(gdx) ## End(Not run)
reads carbon stocks in harvested timber out of a MAgPIE gdx file
PlantationEstablishment(gdx, file = NULL, level = "cell")
PlantationEstablishment(gdx, file = NULL, level = "cell")
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 |
Area newly established in current time step for future timber production
Area newly for timber production
Abhijeet Mishra
## Not run: x <- PlantationEstablishment(gdx) ## End(Not run)
## Not run: x <- PlantationEstablishment(gdx) ## End(Not run)
reads population out of a MAgPIE gdx file
population( gdx, file = NULL, level = "reg", age = FALSE, sex = FALSE, bmi_groups = FALSE, dir = ".", spamfiledirectory = "" )
population( gdx, file = NULL, level = "reg", age = FALSE, sex = FALSE, bmi_groups = FALSE, dir = ".", spamfiledirectory = "" )
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 superAggregate |
age |
if TRUE, population is split up by age groups |
sex |
if TRUE, population is split up by sex |
bmi_groups |
if TRUE, the population will be split up in body-mass-index groups. |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
population as MAgPIE object (million people)
Florian Humpenoeder, Benjamin Bodirsky, Isabelle Weindl
## Not run: x <- population(gdx) ## End(Not run)
## Not run: x <- population(gdx) ## End(Not run)
Calculates the physical elasticity for food demand
PriceElasticities( gdx, file = NULL, level = "reg", calibrated = TRUE, products = "kfo" )
PriceElasticities( gdx, file = NULL, level = "reg", calibrated = TRUE, products = "kfo" )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation; "iso" ISO country codes, "reg" (regional), "glo" (global) |
calibrated |
if FALSE, the true regression outputs are used, if TRUE the values calibrated to the start years are used |
products |
set of the products for which the elasticity should be estimated. Please note that this stills remains an elasticity relative to total food expenditure. So its the change in consumption of one good when the prices of all products change according to the scenario. |
magpie object with the livestock share in a region or country. Unit is dimensionsless, but value depends on chosen attribute
Benjamin Bodirsky
## Not run: x <- PriceElasticities(gdx) ## End(Not run)
## Not run: x <- PriceElasticities(gdx) ## End(Not run)
reads GHG emission prices out of a MAgPIE gdx file
PriceGHG(gdx, file = NULL, level = "reg", aggr = "max")
PriceGHG(gdx, file = NULL, level = "reg", aggr = "max")
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 superAggregate |
aggr |
aggregation used for global value; "max" (maxium value accross regions) or "weight" (weighted by population) |
GHG emission prices as MAgPIE object (US$2017/tCO2, US$2017/tN2O, US$2017/tCH4)
Florian Humpenoeder, Amsalu W. Yalew
## Not run: x <- PriceGHG(gdx) ## End(Not run)
## Not run: x <- PriceGHG(gdx) ## End(Not run)
calcluates price indicies based on a MAgPIE gdx file
priceIndex( gdx, file = NULL, level = "reg", products = "kall", index = "lasp", chain = FALSE, baseyear = "y2005", round = TRUE, type = "consumer", product_aggr = TRUE )
priceIndex( gdx, file = NULL, level = "reg", products = "kall", index = "lasp", chain = FALSE, baseyear = "y2005", round = TRUE, type = "consumer", product_aggr = TRUE )
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 superAggregate |
products |
Selection of products (either by naming products, e.g. "tece", or naming a set,e.g."kcr") |
index |
"lasp" (Laspeyres-Index: baseyear weighting), "paas" (Paasche-Index: current weighting), "fish" (Fisher-Index: geometric mean of "lasp" and "paas") |
chain |
Chain Index: if true, the base period for each time period is the immediately preceding time period. Can be combined with all of the above indices |
baseyear |
baseyear of the price index |
round |
shall the results be rounded? |
type |
For whom are the prices important? "producer" are the prices that farmer face, as they also produce intermediate products (seed, feed). "consumer" are the prices for the end consumer faces (supermarket, bioenergy plant). Currently, the only difference is the basket composition (ideally, also prices should differ between regions) |
product_aggr |
aggregate over products or not (boolean) |
A MAgPIE object containing price indices for consumers or producers (depending on type)
Jan Philipp Dietrich, Florian Humpenoeder, Benjamin Bodirsky
## Not run: x <- priceIndex(gdx) ## End(Not run)
## Not run: x <- priceIndex(gdx) ## End(Not run)
calcluates price indicies based on a MAgPIE gdx file
priceIndexFood( gdx, file = NULL, level = "reg", index = "lasp", chain = FALSE, baseyear = "y2005", round = TRUE, product_aggr = TRUE )
priceIndexFood( gdx, file = NULL, level = "reg", index = "lasp", chain = FALSE, baseyear = "y2005", round = TRUE, product_aggr = TRUE )
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 superAggregate |
index |
"lasp" (Laspeyres-Index: baseyear weighting), "paas" (Paasche-Index: current weighting), "fish" (Fisher-Index: geometric mean of "lasp" and "paas") |
chain |
Chain Index: if true, the base period for each time period is the immediately preceding time period. Can be combined with all of the above indices |
baseyear |
baseyear of the price index. type model to take baseyear 2010 with literature prices |
round |
shall the results be rounded? |
product_aggr |
aggregate over products or not (boolean) |
A MAgPIE object containing price indices for consumers or producers (depending on type)
Jan Philipp Dietrich, Florian Humpenoeder, Benjamin Bodirsky
## Not run: x <- priceIndexFood(gdx) ## End(Not run)
## Not run: x <- priceIndexFood(gdx) ## End(Not run)
calcluates prices based on a MAgPIE gdx file
prices( gdx, file = NULL, level = "reg", products = "kall", product_aggr = FALSE, attributes = "dm", type = "consumer", glo_weight = "production" )
prices( gdx, file = NULL, level = "reg", products = "kall", product_aggr = FALSE, attributes = "dm", type = "consumer", glo_weight = "production" )
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 superAggregate |
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 |
USD05MER per ton X (dm,nr,p,k,wm) except gross energy (ge) where it is USD05MER per GJ |
type |
"consumer" or "producer" prices. Producers' prices are calculated on the regional level as a sum of regional trade equation marginal values and respective global trade equation marginal values.For the non traded commodities, both global and regional producers prices are set to zero instead of NaN. |
glo_weight |
Decides the calculation of global prices. Weighting schemes are applied for
estimation of global producer price. If |
A MAgPIE object containing the consumer's or producers' prices (unit depends on attributes)
Misko Stevanovic, Florian Humpenoeder, Jan Philipp Dietrich, Xiaoxi Wang, Edna J. Molina Bacca
## Not run: x <- prices(gdx) ## End(Not run)
## Not run: x <- prices(gdx) ## End(Not run)
Calculates share of primary and secondary non-forest vegetation for different aggregation levels based on gridded magpie output and initial shares of primary and secondary non-forest vegetation.
PrimSecdOtherLand( x, ini_file, ini_year = "y1995", file = NULL, level = "grid", unit = "Mha" )
PrimSecdOtherLand( x, ini_file, ini_year = "y1995", file = NULL, level = "grid", unit = "Mha" )
x |
Time series of land pools (model output) containing only one aggregated class for other land. Can be a file or magclass object. |
ini_file |
Initialisation file for primary and secondary other land (e.g. based on 1995 MAgPIE land-use initialisation values). Must have the same spatial resolution as |
ini_year |
Reference year for estimating primary and secondary other land shares, must be included in |
file |
a file name the output should be written to using |
level |
Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate. The unit of output for the cases above is Mha. If level "grid" is specified the unit of output can be chosen between "share" and "Mha". |
unit |
"Mha" or "share". Defines the unit of the gridded output, see also |
x
including land area for primary and secondary non-forested vegetation in MAgPIE (other land) as MAgPIE object; either as unit of area (Mha) or as fraction of total land per grid cell (share).
Patrick v. Jeetze, Kristine Karstens
## Not run: x <- "./cell.land_0.5.nc" land <- PrimSecdOtherLand(x) # direct use of disaggregation output land <- PrimSecdOtherLand(land_hr) ## End(Not run)
## Not run: x <- "./cell.land_0.5.nc" land <- PrimSecdOtherLand(x) # direct use of disaggregation output land <- PrimSecdOtherLand(land_hr) ## End(Not run)
Calculates MAgPIE disaggregated processing out of a gdx file
processing( gdx, level = "reg", product_aggr = FALSE, attributes = "dm", type = NULL, indicator = "secondary_from_primary" )
processing( gdx, level = "reg", product_aggr = FALSE, attributes = "dm", type = NULL, indicator = "secondary_from_primary" )
gdx |
GDX file |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
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. |
type |
Demand type(s): "Food", "Feed", "Processing", "Material", "Bioenergy", "Seed", "Supply chain loss", "Domestic Balanceflow"; NULL returns all types |
indicator |
process or secondary product output |
Demand definitions are equivalent to FAO CBS categories
processing as MAgPIE object (Unit depends on attributes)
David Chen, Benjamin Leon Bodirsky
## Not run: x <- processing(gdx = gdx, level="regglo", products="kcr", indicator="primary_to_process") ## End(Not run)
## Not run: x <- processing(gdx = gdx, level="regglo", products="kcr", indicator="primary_to_process") ## End(Not run)
reads production out of a MAgPIE gdx file
production( gdx, file = NULL, level = "reg", products = "kall", product_aggr = FALSE, attributes = "dm", water_aggr = TRUE, dir = ".", cumulative = FALSE, baseyear = 1995 )
production( gdx, file = NULL, level = "reg", products = "kall", product_aggr = FALSE, attributes = "dm", water_aggr = TRUE, dir = ".", cumulative = FALSE, baseyear = 1995 )
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) |
production as MAgPIE object (unit depends on attributes and cumulative)
Benjamin Leon Bodirsky
## Not run: x <- production(gdx) ## End(Not run)
## Not run: x <- production(gdx) ## End(Not run)
calcluates aggregate producer profit based on a MAgPIE gdx file.
productionProfit(gdx, file = NULL, level = "reg", dir = ".")
productionProfit(gdx, file = NULL, level = "reg", dir = ".")
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 superAggregate |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
A MAgPIE object containing producers profit in million $US.
Miodrag Stevanovic
## Not run: x <- productionProfit(gdx) ## End(Not run)
## Not run: x <- productionProfit(gdx) ## End(Not run)
calcluates production revenue based on a MAgPIE gdx file.
productionRevenue( gdx, file = NULL, level = "reg", products = "kall", product_aggr = TRUE )
productionRevenue( gdx, file = NULL, level = "reg", products = "kall", product_aggr = TRUE )
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 superAggregate |
products |
Selection of products (either by naming products, e.g. "tece", or naming a set,e.g."kcr") |
product_aggr |
ggregate over products or not (boolean, default TRUE) |
A MAgPIE object containing prodcution revenues.
Miodrag Stevanovic
## Not run: x <- productionRevenue(gdx) ## End(Not run)
## Not run: x <- productionRevenue(gdx) ## End(Not run)
calculates labor costs per ag. worker in relation to GDP pc
relativeHourlyLaborCosts(gdx, level = "reg", file = NULL)
relativeHourlyLaborCosts(gdx, level = "reg", file = NULL)
gdx |
GDX file |
level |
spatial aggregation to report ("iso", "reg", "glo", or "regglo") |
file |
a file name the output should be written to using write.magpie |
labor costs per ag. worker in relation to GDP pc
Debbora Leip
## Not run: x <- relativeHourlyLaborCosts(gdx) ## End(Not run)
## Not run: x <- relativeHourlyLaborCosts(gdx) ## End(Not run)
reports area actually irrigated
reportAAI(gdx)
reportAAI(gdx)
gdx |
GDX file |
Area actually irrigated as MAgPIE object. Unit: see names
Stephen Wirth, Anne Biewald
## Not run: x <- reportAEI(gdx) ## End(Not run)
## Not run: x <- reportAEI(gdx) ## End(Not run)
reports Area equipped for Irrigation
reportAEI(gdx)
reportAEI(gdx)
gdx |
GDX file |
Area equipped for Irrigation as MAgPIE object. Unit: see names
Stephen Wirth
## Not run: x <- reportAEI(gdx) ## End(Not run)
## Not run: x <- reportAEI(gdx) ## End(Not run)
reports employment in crop+livestock production from MAgPIE results
reportAgEmployment( gdx, type = "absolute", detail = FALSE, level = "regglo", dir = "." )
reportAgEmployment( gdx, type = "absolute", detail = FALSE, level = "regglo", dir = "." )
gdx |
GDX file |
type |
"absolute" for total number of people employed, "share" for share out of working age population |
detail |
if TRUE, employment is disaggregated to crop and livestock production, if FALSE only aggregated employment is reported |
level |
spatial aggregation: "reg", "glo", "regglo", "iso" |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
agricultural employment as MAgPIE object
Debbora Leip
## Not run: x <- reportAgEmployment(gdx) ## End(Not run)
## Not run: x <- reportAgEmployment(gdx) ## End(Not run)
reports MAgPIE Agricultural GDP Mio. USD05 MER
reportAgGDP(gdx)
reportAgGDP(gdx)
gdx |
GDX file |
Magpie object
Edna J. Molina Bacca
## Not run: x <- reportAgGDP(gdx) ## End(Not run)
## Not run: x <- reportAgGDP(gdx) ## End(Not run)
reports Agricultural Research Intensity as
reportAgriResearchIntensity(gdx)
reportAgriResearchIntensity(gdx)
gdx |
GDX file |
magpie object
David Chen
## Not run: x <- reportAgriResearchIntensity(gdx) ## End(Not run)
## Not run: x <- reportAgriResearchIntensity(gdx) ## End(Not run)
reports Underweight, Normalweight, Overweight and Obesity as well as body height for males and females
reportAnthropometrics(gdx, level = "regglo")
reportAnthropometrics(gdx, level = "regglo")
gdx |
GDX file |
level |
spatial aggregation: "reg", "glo", "regglo", "iso" |
Magpie object
Benjamin Leon Bodirsky
## Not run: x <- reportBodyweight(gdx) ## End(Not run)
## Not run: x <- reportBodyweight(gdx) ## End(Not run)
reports biodiversity intactness index
reportBII(gdx, dir = ".")
reportBII(gdx, dir = ".")
gdx |
GDX file |
dir |
magpie output directory that contains gridded BII data |
Biodiversity intactness index as MAgPIE object
Patrick v. Jeetze, Florian Humpenoeder
## Not run: x <- reportBII(gdx) ## End(Not run)
## Not run: x <- reportBII(gdx) ## End(Not run)
reports demand for bioplastic and demand for substrate for bioplastic production from MAgPIE results
reportBioplasticDemand(gdx, detail = TRUE, level = "regglo")
reportBioplasticDemand(gdx, detail = TRUE, level = "regglo")
gdx |
GDX file |
detail |
only relevant for substrate demand. If TRUE, substrate demand is disaggregated by crop type, if FALSE only the aggregated demand is reported. |
level |
spatial aggregation to report bioplastic/substrate demand (only "reg" or "regglo") |
bioplastic and bioplastic substrate demand as MAgPIE object
Debbora Leip
## Not run: x <- reportBioplasticDemand(gdx) ## End(Not run)
## Not run: x <- reportBioplasticDemand(gdx) ## End(Not run)
Reports the carbon stocks for future MAgPIE projections
reportCarbonstock(gdx)
reportCarbonstock(gdx)
gdx |
GDX file |
Kristine Karstens
## Not run: x <- reportSOM(gdx) ## End(Not run)
## Not run: x <- reportSOM(gdx) ## End(Not run)
reports MAgPIE consumption value
reportConsumVal(gdx)
reportConsumVal(gdx)
gdx |
GDX file |
Magpie object associated with the consumption value
Edna J. Molina Bacca
## Not run: x <- reportConsumVal(gdx) ## End(Not run)
## Not run: x <- reportConsumVal(gdx) ## End(Not run)
reports MAgPIE capital investments
reportCostCapitalInvestment(gdx)
reportCostCapitalInvestment(gdx)
gdx |
GDX file |
Magpie object associated with overall costs and value of production
Edna J. Molina Bacca
## Not run: x <- reportCostCapitalInvestment(gdx) ## End(Not run)
## Not run: x <- reportCostCapitalInvestment(gdx) ## End(Not run)
reports MAgPIE capital stocks
reportCostCapitalStocks(gdx)
reportCostCapitalStocks(gdx)
gdx |
GDX file |
Magpie object associated with overall costs and value of production
Edna J. Molina Bacca
## Not run: x <- reportCostCapitalStocks(gdx) ## End(Not run)
## Not run: x <- reportCostCapitalStocks(gdx) ## End(Not run)
reports MAgPIE costs
reportCostInputsCrop(gdx)
reportCostInputsCrop(gdx)
gdx |
GDX file |
Magpie object associated with overall costs and value of production
Edna J. Molina Bacca
## Not run: x <- reportCostInputsCrop(gdx) ## End(Not run)
## Not run: x <- reportCostInputsCrop(gdx) ## End(Not run)
reports MAgPIE costs
reportCostOverall(gdx)
reportCostOverall(gdx)
gdx |
GDX file |
Magpie object associated with overall costs and value of production
Edna J. Molina Bacca
## Not run: x <- reportCostOverall(gdx) ## End(Not run)
## Not run: x <- reportCostOverall(gdx) ## End(Not run)
reports MAgPIE costs
reportCosts(gdx)
reportCosts(gdx)
gdx |
GDX file |
consumption value as MAgPIE object Unit: see names
Florian Humpenoeder
## Not run: x <- reportCosts(gdx) ## End(Not run)
## Not run: x <- reportCosts(gdx) ## End(Not run)
reports MAgPIE costs including total investments
reportCostsAccounting(gdx)
reportCostsAccounting(gdx)
gdx |
GDX file |
Costs accounting including total investments
Edna J. Molina Bacca
## Not run: x <- reportCostsAccounting(gdx) ## End(Not run)
## Not run: x <- reportCostsAccounting(gdx) ## End(Not run)
reports MAgPIE AEI costs
reportCostsAEI(gdx)
reportCostsAEI(gdx)
gdx |
GDX file |
magpie object containing AEI costs
Felicitas Beier
## Not run: x <- reportCostsAEI(gdx) ## End(Not run)
## Not run: x <- reportCostsAEI(gdx) ## End(Not run)
reports MAgPIE nitrogen fertilizer costs disaggregated to crop categories
reportCostsFertilizer(gdx)
reportCostsFertilizer(gdx)
gdx |
GDX file |
magpie object with fertilizer costs
Debbora Leip
## Not run: x <- reportCostsFertilizer(gdx) ## End(Not run)
## Not run: x <- reportCostsFertilizer(gdx) ## End(Not run)
reports MAgPIE factor costs (split into labor and capital for sticky realization)
reportCostsInputFactors(gdx)
reportCostsInputFactors(gdx)
gdx |
GDX file |
magpie object with factor costs
Debbora Leip
## Not run: x <- reportCostsInputFactors(gdx) ## End(Not run)
## Not run: x <- reportCostsInputFactors(gdx) ## End(Not run)
reports MAgPIE mitigation costs disaggregated into labor and capital
reportCostsMACCS(gdx)
reportCostsMACCS(gdx)
gdx |
GDX file |
magpie object with mitigation costs
Debbora Leip
## Not run: x <- reportCostsMACCS(gdx) ## End(Not run)
## Not run: x <- reportCostsMACCS(gdx) ## End(Not run)
reports MAgPIE costs
reportCostsPresolve(gdx)
reportCostsPresolve(gdx)
gdx |
GDX file |
consumption value as MAgPIE object Unit: see names
Florian Humpenoeder
## Not run: x <- reportCostsPresolve(gdx) ## End(Not run)
## Not run: x <- reportCostsPresolve(gdx) ## End(Not run)
reports costs about production crops
reportCostsProductionCrops(gdx, type = "investment")
reportCostsProductionCrops(gdx, type = "investment")
gdx |
GDX file |
type |
Type of reporting, either "annuity" or total "investments" |
costs related to crops production, (million US$17/yr/tDM)
Edna J. Molina Bacca
## Not run: x <- reportCostsProductionCrops(gdx) ## End(Not run)
## Not run: x <- reportCostsProductionCrops(gdx) ## End(Not run)
Reads data to calculate wholesale costs
reportCostsWholesale(gdx, level = "regglo")
reportCostsWholesale(gdx, level = "regglo")
gdx |
GDX file |
level |
Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
A MAgPIE object containing values related with costs wholesale trade [million US$17/tDM]
David M Chen
## Not run: x <- reportCostsWholesale(gdx) ## End(Not run)
## Not run: x <- reportCostsWholesale(gdx) ## End(Not run)
reports Costs Without Incentives
reportCostsWithoutIncentives(gdx, level = "regglo")
reportCostsWithoutIncentives(gdx, level = "regglo")
gdx |
GDX file |
level |
spatial aggregation: "reg", "glo", "regglo" |
magpie object
David Chen
## Not run: x <- reportCostsWithoutIncentives(gdx) ## End(Not run)
## Not run: x <- reportCostsWithoutIncentives(gdx) ## End(Not run)
reports MAgPIE TC costs
reportCostTC(gdx)
reportCostTC(gdx)
gdx |
GDX file |
magpie object with TC costs
David Chen
## Not run: x <- reportCostTC(gdx) ## End(Not run)
## Not run: x <- reportCostTC(gdx) ## End(Not run)
reports MAgPIE costs
reportCostTransport(gdx)
reportCostTransport(gdx)
gdx |
GDX file |
consumption value as MAgPIE object Unit: see names
David Chen
## Not run: x <- reportCostTransport(gdx) ## End(Not run)
## Not run: x <- reportCostTransport(gdx) ## End(Not run)
reports croparea
reportCroparea(gdx, detail = FALSE)
reportCroparea(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if detail=FALSE, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
Croparea as MAgPIE object (million Ha/yr)
Florian Humpenoeder
## Not run: x <- reportCroparea(gdx) ## End(Not run)
## Not run: x <- reportCroparea(gdx) ## End(Not run)
reports croparea
reportCropareaGrid(gdx, dir = ".", spamfiledirectory = "")
reportCropareaGrid(gdx, dir = ".", spamfiledirectory = "")
gdx |
GDX file |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
Croparea as MAgPIE object (million ha/yr)
Benjamin Bodirsky
## Not run: x <- reportCropareaGrid(gdx) ## End(Not run)
## Not run: x <- reportCropareaGrid(gdx) ## End(Not run)
reports crop diversity
reportCropDiversity(gdx, grid = FALSE, dir = ".")
reportCropDiversity(gdx, grid = FALSE, dir = ".")
gdx |
GDX file |
grid |
Set to TRUE, if outputs should be reported on 0.5 degree grid level |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
Crop diversity as MAgPIE object
Patrick v. Jeetze
## Not run: x <- reportCropDiversity(gdx) ## End(Not run)
## Not run: x <- reportCropDiversity(gdx) ## End(Not run)
reports Demand for Food, Feed, Processing, Material, Bioenergy, Seed and Supply Chain Loss
reportDemand(gdx, detail = FALSE, agmip = FALSE)
reportDemand(gdx, detail = FALSE, agmip = FALSE)
gdx |
GDX file |
detail |
if detail=F, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
agmip |
if agmip=T, additional sector aggregates required for agmip are reported (e.g. "AGR") |
demand as MAgPIE object (Mt DM)
Benjamin Leon Bodirsky, Isabelle Weindl
## Not run: x <- reportDemand() ## End(Not run)
## Not run: x <- reportDemand() ## End(Not run)
reports Bioenergy Demand in EJ/yr
reportDemandBioenergy(gdx, detail = FALSE)
reportDemandBioenergy(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if detail=F, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
Bioenergy demand as MAgPIE object (EJ/yr)
Florian Humpenoeder, Kristine Karstens
## Not run: x <- reportDemandBioenergy() ## End(Not run)
## Not run: x <- reportDemandBioenergy() ## End(Not run)
Similar to reportDemand, but for nitrogen. reports Demand for Food, Feed, Processing, Material, Bioenergy, Seed and Supply Chain Loss
reportDemandNr(gdx, detail = FALSE)
reportDemandNr(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if detail=F, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
demand as MAgPIE object (Mt DM)
Benjamin Leon Bodirsky
## Not run: x <- reportDemand() ## End(Not run)
## Not run: x <- reportDemand() ## End(Not run)
reports GHG emissions
reportEmissions(gdx, storageWood = TRUE)
reportEmissions(gdx, storageWood = TRUE)
gdx |
GDX file |
storageWood |
Accounting for long term carbon storage in wood products. Default is TRUE. |
GHG emissions as MAgPIE object (Unit: Mt CO2/yr, Mt N2O/yr, and Mt CH4/yr, for cumulative emissions Gt CO2)
low pass filter = 3
Name | Unit | Meta |
Emissions|CO2|+|Land | Mt CO2/yr | direct and indirect human-induced CO2 emissions from land use |
Emissions|CO2|Land|+|Indirect | Mt CO2/yr | indirect human-induced CO2 emissions from land use (land carbon sink); based on estimates from Grassi et al 2021 |
Emissions|CO2|Land|+|Land-use Change | Mt CO2/yr | direct human-induced CO2 emissions from land use change, harvest and regrowth |
Emissions|CO2|Land|Land-use Change|+|Regrowth | Mt CO2/yr | negative CO2 emissions from regrowth |
raw data; no low pass filter applied
Name | Unit | Meta |
Emissions|CO2|+|Land RAW | Mt CO2/yr | direct and indirect human-induced CO2 emissions from land use |
Emissions|CO2|Land|+|Indirect RAW | Mt CO2/yr | indirect human-induced CO2 emissions from land use (land carbon sink); based on estimates from Grassi et al 2021 |
Emissions|CO2|Land|+|Land-use Change RAW | Mt CO2/yr | direct human-induced CO2 emissions from land use change, harvest and regrowth |
Florian Humpenoeder, Benjamin Leon Bodirsky, Michael Crawford
## Not run: x <- reportEmissions(gdx) ## End(Not run)
## Not run: x <- reportEmissions(gdx) ## End(Not run)
reports GHG emissions before technical mitigation. Technical abatement includes all abatement done in the MACC curves, but exclude endogenous mitigation. These emissions are NOT the standard reporting emissions, but used for special purposes like remind-magpie coupling.
reportEmissionsBeforeTechnicalMitigation(gdx)
reportEmissionsBeforeTechnicalMitigation(gdx)
gdx |
GDX file |
MAgPIE object (Unit: Mt CO2/yr, Mt N2O/yr and Mt CH4/yr)
Florian Humpenoeder, Benjamin Leon Bodirsky
## Not run: x <- reportEmissionsBeforeTechnicalMitigation(gdx) ## End(Not run)
## Not run: x <- reportEmissionsBeforeTechnicalMitigation(gdx) ## End(Not run)
reports food expenditure index and food expenditure index corrected for emission costs
reportExpenditureFoodIndex(gdx, baseyear = "y2010", basketyear = "y2010")
reportExpenditureFoodIndex(gdx, baseyear = "y2010", basketyear = "y2010")
gdx |
GDX file |
baseyear |
Baseyear of the price index |
basketyear |
Year of reference food basket (should be in the past for comparison of different runs to have identical and comparable food basket) |
Food expenditure index as MAgPIE object
Felicitas Beier
## Not run: x <- reportPriceFoodIndex(gdx) ## End(Not run)
## Not run: x <- reportPriceFoodIndex(gdx) ## End(Not run)
reportes feed demand by animal type
reportFeed(gdx, detail = T)
reportFeed(gdx, detail = T)
gdx |
GDX file |
detail |
if detail=F, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
feed demand as MAgPIE object (Mt DM)
Isabelle Weindl
## Not run: x <- reportFeed() ## End(Not run)
## Not run: x <- reportFeed() ## End(Not run)
reportes feed demand by animal type
reportFeedConversion(gdx, livestockSystem = TRUE, balanceflow = FALSE)
reportFeedConversion(gdx, livestockSystem = TRUE, balanceflow = FALSE)
gdx |
GDX file |
livestockSystem |
if TRUE, ruminant products and poultry products are aggregated |
balanceflow |
If true, feed includes the calibration balanceflow |
feed demand as MAgPIE object (Mt DM)
Benjamin Bodirsky
## Not run: x <- reportFeed() ## End(Not run)
## Not run: x <- reportFeed() ## End(Not run)
Reports inorganic nitrogen application on crops
reportFertilizerNitrogen(gdx, level = "regglo")
reportFertilizerNitrogen(gdx, level = "regglo")
gdx |
GDX file |
level |
level of output |
David M Chen
## Not run: x <- reportFertilizerNitrogen(gdx) ## End(Not run)
## Not run: x <- reportFertilizerNitrogen(gdx) ## End(Not run)
reports fit and error indicators compared to initial values
reportFit(gdx, type = "MAPE", level = "cell")
reportFit(gdx, type = "MAPE", level = "cell")
gdx |
GDX file |
type |
type of indicator. Options: R2, MAE, MPE (mean percentage error - bias), MAPE (mean absolute percentage error) |
level |
level at which the regional and global bias should be reported. Options "cell" or "grid" |
Selected error indicator
Edna Molina Bacca, Patrick v. Jeetze
## Not run: x <- reportFit(gdx,type) ## End(Not run)
## Not run: x <- reportFit(gdx,type) ## End(Not run)
reports per-capita calories food supply (including household waste)
reportFoodExpenditure(gdx, detail = FALSE, level = "regglo")
reportFoodExpenditure(gdx, detail = FALSE, level = "regglo")
gdx |
GDX file |
detail |
if detail=F, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
level |
spatial aggregation: "reg", "glo", "regglo", "iso" |
per-capita calories as MAgPIE object (kcal/cap/day)
Benjamin Leon Bodirsky
## Not run: x <- reportFoodExpenditure(gdx) ## End(Not run)
## Not run: x <- reportFoodExpenditure(gdx) ## End(Not run)
reports MAgPIE harvested area for timber.
reportForestYield(gdx)
reportForestYield(gdx)
gdx |
GDX file |
Yield from Forests for timber production
Abhijeet Mishra
## Not run: x <- reportForestYield(gdx) ## End(Not run)
## Not run: x <- reportForestYield(gdx) ## End(Not run)
reports cattle related numbers
reportGraslandSoilCarbon(gdx)
reportGraslandSoilCarbon(gdx)
gdx |
GDX file |
Cattle values as magpie objetc
Marcos Alves
## Not run: x <- reportGraslandSoilCarbon(gdx) ## End(Not run)
## Not run: x <- reportGraslandSoilCarbon(gdx) ## End(Not run)
reports cattle related numbers
reportGrasslandManagement(gdx)
reportGrasslandManagement(gdx)
gdx |
GDX file |
Cattle values as magpie objetc
Marcos Alves
## Not run: x <- reportGrasslandManagement(gdx) ## End(Not run)
## Not run: x <- reportGrasslandManagement(gdx) ## End(Not run)
reportGrasslandYields
reportGrasslandYields(gdx)
reportGrasslandYields(gdx)
gdx |
GDX file |
yield as MAgPIE object (Mt DM/ha)
Marcos Alves
## Not run: x <- reportGrasslandYields(gdx) ## End(Not run)
## Not run: x <- reportGrasslandYields(gdx) ## End(Not run)
report evaluation values for pasture management implementation
reportGrassStats(gdx)
reportGrassStats(gdx)
gdx |
GDX file |
magpie object
Marcos Alves
## Not run: x <- reportGrassStats(gdx) ## End(Not run)
## Not run: x <- reportGrassStats(gdx) ## End(Not run)
reports Croparea from gridded (disaggregated) output
reportGridCroparea(gdx, dir = ".", spamfiledirectory = "")
reportGridCroparea(gdx, dir = ".", spamfiledirectory = "")
gdx |
GDX file |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
area of cropland as MAgPIE object (million ha)
Jannes Breier
## Not run: x <- reportGridCroparea(gdx) ## End(Not run)
## Not run: x <- reportGridCroparea(gdx) ## End(Not run)
reports land-use from gridded (disaggregated) output
reportGridLand(gdx, dir = ".", spamfiledirectory = "")
reportGridLand(gdx, dir = ".", spamfiledirectory = "")
gdx |
GDX file |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
land-use as MAgPIE object (million ha)
Jannes Breier
## Not run: x <- reportGridLand(gdx) ## End(Not run)
## Not run: x <- reportGridLand(gdx) ## End(Not run)
reports Manure with reprting names on grid level.
reportGridManureExcretion(gdx, dir = ".", spamfiledirectory = "")
reportGridManureExcretion(gdx, dir = ".", spamfiledirectory = "")
gdx |
GDX file |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
MAgPIE object
Benjamin Leon Bodirsky
## Not run: x <- reportGridManureExcretion(gdx) ## End(Not run)
## Not run: x <- reportGridManureExcretion(gdx) ## End(Not run)
reports Growing stocks for woody materials
reportGrowingStock(gdx, indicator = "relative", detail = FALSE)
reportGrowingStock(gdx, indicator = "relative", detail = FALSE)
gdx |
GDX file |
indicator |
If the reported numbers are relative (mio m3/ha) or absolute (mio. m3). Default is relative. |
detail |
if detail=FALSE, the subcategories of groups are not reported. |
production as MAgPIE object. Unit: see names
Abhijeet Mishra
## Not run: x <- reportGrowingStock(gdx) ## End(Not run)
## Not run: x <- reportGrowingStock(gdx) ## End(Not run)
reports MAgPIE harvested area for timber.
reportharvested_area_timber(gdx)
reportharvested_area_timber(gdx)
gdx |
GDX file |
Area harvested for timber production
Abhijeet Mishra
## Not run: x <- reportharvested_area_timber(gdx) ## End(Not run)
## Not run: x <- reportharvested_area_timber(gdx) ## End(Not run)
reports hourly labor costs in agriculture from MAgPIE results
reportHourlyLaborCosts(gdx, level = "regglo")
reportHourlyLaborCosts(gdx, level = "regglo")
gdx |
GDX file |
level |
spatial aggregation: "reg", "glo", "regglo" |
hourly labor costs as MAgPIE object
Debbora Leip
## Not run: x <- reportHourlyLaborCosts(gdx) ## End(Not run)
## Not run: x <- reportHourlyLaborCosts(gdx) ## End(Not run)
Calculates the share of people living in hunger.
reportHunger(gdx)
reportHunger(gdx)
gdx |
GDX file |
magpie object with hunger (mio people) or hunger share
Benjamin Leon Bodirsky
## Not run: x <- reportHunger(gdx) ## End(Not run)
## Not run: x <- reportHunger(gdx) ## End(Not run)
reports income
reportIncome(gdx, type = "ppp", level = "regglo")
reportIncome(gdx, type = "ppp", level = "regglo")
gdx |
GDX file |
type |
ppp for purchase power parity, mer for market exchange rate |
level |
spatial aggregation: "reg", "glo", "regglo", "iso" |
Annual per capita and total income as MAgPIE object (US$2017 MER/cap/yr and million US$17 PPP/yr)
Florian Humpenoeder, Isabelle Weindl, Felicitas Beier
## Not run: x <- reportIncome(gdx) ## End(Not run)
## Not run: x <- reportIncome(gdx) ## End(Not run)
reports detailed or aggregated per-capita kcal intake including exogenous scenarios
reportIntakeDetailed(gdx, detail = TRUE, level = "regglo")
reportIntakeDetailed(gdx, detail = TRUE, level = "regglo")
gdx |
GDX file |
detail |
if detail=F, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
level |
spatial aggregation: "reg", "glo", "regglo", "iso" |
per-capita calorie intake as MAgPIE object (kcal/cap/day)
Isabelle Weindl
## Not run: x <- reportIntakeDetailed(gdx) ## End(Not run)
## Not run: x <- reportIntakeDetailed(gdx) ## End(Not run)
reports per-capita calories food supply (including household waste)
reportKcal(gdx, detail = FALSE, level = "regglo")
reportKcal(gdx, detail = FALSE, level = "regglo")
gdx |
GDX file |
detail |
if detail=F, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
level |
spatial aggregation: "reg", "glo", "regglo", "iso" |
per-capita calories as MAgPIE object (kcal/cap/day)
Benjamin Leon Bodirsky, Kristine karstens, Abhijeet Mishra
## Not run: x <- reportKcal(gdx) ## End(Not run)
## Not run: x <- reportKcal(gdx) ## End(Not run)
reports MAgPIE labor costs that go into employment calculation
reportLaborCostsEmpl(gdx)
reportLaborCostsEmpl(gdx)
gdx |
GDX file |
magpie object with labor costs
Debbora Leip
## Not run: x <- reportLaborCostsEmpl(gdx) ## End(Not run)
## Not run: x <- reportLaborCostsEmpl(gdx) ## End(Not run)
reports labor productivity in crop production
reportLaborProductivity( gdx, productAggr = TRUE, type = "physical", level = "regglo" )
reportLaborProductivity( gdx, productAggr = TRUE, type = "physical", level = "regglo" )
gdx |
GDX file |
productAggr |
Aggregate over products or not (boolean) |
type |
type of labor productivity, so far only physical (kg DM / h) |
level |
spatial aggregation: "reg", "glo", "regglo", "iso" |
labor productivity as MAgPIE object
Debbora Leip
## Not run: x <- reportLaborProductivity(gdx) ## End(Not run)
## Not run: x <- reportLaborProductivity(gdx) ## End(Not run)
reports land conservation areas
reportLandConservation(gdx)
reportLandConservation(gdx)
gdx |
GDX file |
land conservation area in Mha
Patrick v. Jeetze, Florian Humpenoeder
## Not run: x <- reportLandConservation(gdx) ## End(Not run)
## Not run: x <- reportLandConservation(gdx) ## End(Not run)
reports land-use
reportLandUse(gdx)
reportLandUse(gdx)
gdx |
GDX file |
land-use as MAgPIE object (million ha)
Florian Humpenoeder, Kristine Karstens, Isabelle Weindl
## Not run: x <- reportLandUse(gdx) ## End(Not run)
## Not run: x <- reportLandUse(gdx) ## End(Not run)
reports land-use change
reportLandUseChange(gdx, baseyear = 1995)
reportLandUseChange(gdx, baseyear = 1995)
gdx |
GDX file |
baseyear |
baseyear for calculating land-use change |
land-use change as MAgPIE object (million ha wrt to baseyear)
Florian Humpenoeder
## Not run: x <- reportLandUseChange(gdx) ## End(Not run)
## Not run: x <- reportLandUseChange(gdx) ## End(Not run)
Writes MAgPIE land use projections to a specific NetCDF that can be read by the Spatial Economic Allocation Landscape Simulator (SEALS) model for generating high resolution land use maps.
reportLandUseForSEALS( magCellLand = "cell.land_0.5_share.mz", outFile = "cell.land_0.5_SEALS.nc", scenName = NULL, dir = ".", selectyears = c(2020, 2030, 2050) )
reportLandUseForSEALS( magCellLand = "cell.land_0.5_share.mz", outFile = "cell.land_0.5_SEALS.nc", scenName = NULL, dir = ".", selectyears = c(2020, 2030, 2050) )
magCellLand |
Disaggregated land use (grid-cell land area share) as magclass object or file (.mz) from a MAgPIE run. |
outFile |
a file name the output should be written to using |
scenName |
Optional scenario name |
dir |
output directory which contains cellular magpie output |
selectyears |
Numeric vector of years to provide data for. |
Proportions of different land use classes per grid sell in a NetCDF format.
Patrick v. Jeetze
## Not run: x <- reportLandUseForSEALS( magCellLand = "cell.land_0.5_share.mz", outFile = "cell.land_0.5_SEALS.nc", selectyears = c(2020, 2030, 2050) ) ## End(Not run)
## Not run: x <- reportLandUseForSEALS( magCellLand = "cell.land_0.5_share.mz", outFile = "cell.land_0.5_SEALS.nc", selectyears = c(2020, 2030, 2050) ) ## End(Not run)
reports the share of different livestock products (excluding fish) in total livestock calorie food supply
reportLivestockDemStructure(gdx)
reportLivestockDemStructure(gdx)
gdx |
GDX file |
livestock demand structure as MAgPIE object (kcal/kcal)
Isabelle Weindl
## Not run: x <- reportLivestockDemStructure(gdx) ## End(Not run)
## Not run: x <- reportLivestockDemStructure(gdx) ## End(Not run)
reportLSUGrasslands
reportLSUGrasslands(gdx)
reportLSUGrasslands(gdx)
gdx |
GDX file |
Livestock eq. denstity as a magpie object (Mt DM/ha) (1 LSU eq. = 8.9 kg DM/day)
Marcos Alves
## Not run: x <- reportGrasslandYields(gdx) ## End(Not run)
## Not run: x <- reportGrasslandYields(gdx) ## End(Not run)
Reports the Nitrogen in Manure of all animals for future MAgPIE projections
Reports the Nitrogen in Manure of all animals for future MAgPIE projections
reportManure(gdx, nutrient = "nr") reportManure(gdx, nutrient = "nr")
reportManure(gdx, nutrient = "nr") reportManure(gdx, nutrient = "nr")
gdx |
GDX file |
nutrient |
nr, p, c... |
Benjamin Leon Bodirsky
## Not run: x <- reportManure(gdx) ## End(Not run) ## Not run: x <- reportManure(gdx) ## End(Not run)
## Not run: x <- reportManure(gdx) ## End(Not run) ## Not run: x <- reportManure(gdx) ## End(Not run)
reports Net Forest Change
reportNetForestChange(gdx)
reportNetForestChange(gdx)
gdx |
GDX file |
NetForestChange as magclass object (Mha per year)
Florian Humpenoeder
## Not run: x <- reportNetForestChange(gdx) ## End(Not run)
## Not run: x <- reportNetForestChange(gdx) ## End(Not run)
Reports the Nitrogen Budgets of Croplands for future MAgPIE projections
reportNitrogenBudgetCropland( gdx, include_emissions = FALSE, grid = FALSE, dir = "." )
reportNitrogenBudgetCropland( gdx, include_emissions = FALSE, grid = FALSE, dir = "." )
gdx |
GDX file |
include_emissions |
TRUE also divides the N surplus into different emissions |
grid |
grid provides outputs on grid level of 0.5 degree |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
Benjamin Leon Bodirsky
## Not run: x <- reportNitrogenBudgetCropland(gdx) ## End(Not run)
## Not run: x <- reportNitrogenBudgetCropland(gdx) ## End(Not run)
Reports the Nitrogen Budgets of non-agricultural lands for future MAgPIE projections
reportNitrogenBudgetNonagland(gdx, grid = FALSE, dir = ".")
reportNitrogenBudgetNonagland(gdx, grid = FALSE, dir = ".")
gdx |
GDX file |
grid |
if TRUE, disaggregate to grid level |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
Benjamin Leon Bodirsky
## Not run: x <- reportNitrogenBudgetNonagland(gdx) ## End(Not run)
## Not run: x <- reportNitrogenBudgetNonagland(gdx) ## End(Not run)
Reports the Nitrogen Budgets of Croplands for future MAgPIE projections
reportNitrogenBudgetPasture( gdx, include_emissions = FALSE, grid = FALSE, dir = "." )
reportNitrogenBudgetPasture( gdx, include_emissions = FALSE, grid = FALSE, dir = "." )
gdx |
GDX file |
include_emissions |
TRUE also divides the N surplus into different emissions |
grid |
if TRUE, disaggregate to grid level |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
Benjamin Leon Bodirsky
## Not run: x <- reportNitrogenBudgetCropland(gdx) ## End(Not run)
## Not run: x <- reportNitrogenBudgetCropland(gdx) ## End(Not run)
Reports different nitrogen use efficiency indicators
reportNitrogenEfficiencies(gdx)
reportNitrogenEfficiencies(gdx)
gdx |
GDX file |
Benjamin Leon Bodirsky
## Not run: x <- reportNitrogenEfficiencies(gdx) ## End(Not run)
## Not run: x <- reportNitrogenEfficiencies(gdx) ## End(Not run)
Reports total Nitrogen Pollution as the sum of surplus from cropland, pasture, awms, consumption and non-agricutlural land
reportNitrogenPollution(gdx, dir = ".")
reportNitrogenPollution(gdx, dir = ".")
gdx |
GDX file |
dir |
magpie output directory that contains gridded Nitrogen Data |
Benjamin Leon Bodirsky
## Not run: x <- reportNitrogenPollution(gdx) ## End(Not run)
## Not run: x <- reportNitrogenPollution(gdx) ## End(Not run)
reports output per worker in crop+livestock production from MAgPIE results
reportOutputPerWorker(gdx)
reportOutputPerWorker(gdx)
gdx |
GDX file |
output per worker as MAgPIE object
Debbora Leip
## Not run: x <- reportOutputPerWorker(gdx) ## End(Not run)
## Not run: x <- reportOutputPerWorker(gdx) ## End(Not run)
reports pasture soil carbon
reportPastSoilCarbon(gdx)
reportPastSoilCarbon(gdx)
gdx |
GDX file |
Soil carbon values as magpie objetc
Marcos Alves
## Not run: x <- reportPastSoilCarbon(gdx) ## End(Not run)
## Not run: x <- reportPastSoilCarbon(gdx) ## End(Not run)
reports biosphere planetary boundary: Share of intact land relative to total land area (unitless) Share of intact land covered by areas within Global Safety Net (unitless) Share of land area that satisfies landscape target (unitless)
reportPBbiosphere( gdx, level = "regglo", dir = ".", intactnessRule = "carbon:0.95" )
reportPBbiosphere( gdx, level = "regglo", dir = ".", intactnessRule = "carbon:0.95" )
gdx |
GDX file |
level |
level of aggregation (regglo: regions and global) |
dir |
directory with required spatial data |
intactnessRule |
rule for intact land can be based on percentage of potential carbon density reached or on age classes for secondary forests, planted forest and other natural land. The argument is split into two components: rule: carbon or ageclass threshold: share of carbon density reached to be classified as intact or threshold in years can be set via this argument Example: "carbon:0.95" or "ageclass:70" |
MAgPIE object
Patrick von Jeetze, Felicitas Beier
## Not run: x <- reportPBbiosphere(gdx) ## End(Not run)
## Not run: x <- reportPBbiosphere(gdx) ## End(Not run)
reports land planetary boundary: forest area as percentage of original forest area
reportPBland(gdx, level = "regglo", dir = ".", foresttype = "all")
reportPBland(gdx, level = "regglo", dir = ".", foresttype = "all")
gdx |
GDX file |
level |
level of aggregation (regglo: regions and global) |
dir |
directory with required spatial data |
foresttype |
managed forest types that are included in the calculation of the forest area (all: all managed forests, noTimber: timber plantations are not counted) |
MAgPIE object
Felicitas Beier, Patrick von Jeetze
## Not run: x <- reportPBland(gdx) ## End(Not run)
## Not run: x <- reportPBland(gdx) ## End(Not run)
reports nitrogen planetary boundary
reportPBnitrogen(gdx, level = "regglo", dir = ".")
reportPBnitrogen(gdx, level = "regglo", dir = ".")
gdx |
GDX file |
level |
level of aggregation (regglo: regions and global) |
dir |
directory with required spatial data |
MAgPIE object
Felicitas Beier, Mike Crawford
## Not run: x <- reportPBnitrogen(gdx) ## End(Not run)
## Not run: x <- reportPBnitrogen(gdx) ## End(Not run)
reports water planetary boundaries
reportPBwater(gdx, level = "regglo")
reportPBwater(gdx, level = "regglo")
gdx |
GDX file |
level |
level of aggregation (regglo: regions and global) |
MAgPIE object
Felicitas Beier, Jens Heinke
## Not run: x <- reportPBwater(gdx) ## End(Not run)
## Not run: x <- reportPBwater(gdx) ## End(Not run)
reports peatland area
reportPeatland(gdx)
reportPeatland(gdx)
gdx |
GDX file |
peatland area as magclass object (million ha)
Florian Humpenoeder
## Not run: x <- reportPeatland(gdx) ## End(Not run)
## Not run: x <- reportPeatland(gdx) ## End(Not run)
reports MAgPIE harvested area for timber.
reportPlantationEstablishment(gdx)
reportPlantationEstablishment(gdx)
gdx |
GDX file |
Area harvested for timber production
Abhijeet Mishra
## Not run: x <- reportPlantationEstablishment(gdx) ## End(Not run)
## Not run: x <- reportPlantationEstablishment(gdx) ## End(Not run)
reports Population
reportPopulation(gdx, level = "regglo")
reportPopulation(gdx, level = "regglo")
gdx |
GDX file |
level |
spatial aggregation: "reg", "glo", "regglo", "iso" |
population as MAgPIE object
Florian Humpenoeder
## Not run: x <- reportPopulation(gdx) ## End(Not run)
## Not run: x <- reportPopulation(gdx) ## End(Not run)
reports food commodity prices
reportPriceAgriculture(gdx)
reportPriceAgriculture(gdx)
gdx |
GDX file |
agricultural commodity prices as MAgPIE object (USD)
Mishko Stevanovic
## Not run: x <- reportPriceAgriculture(gdx) ## End(Not run)
## Not run: x <- reportPriceAgriculture(gdx) ## End(Not run)
reports bioenergy prices
reportPriceBioenergy(gdx)
reportPriceBioenergy(gdx)
gdx |
GDX file |
bioenergy price as MAgPIE object Unit: see names
Florian Humpenoeder
## Not run: x <- reportPriceBioenergy(gdx) ## End(Not run)
## Not run: x <- reportPriceBioenergy(gdx) ## End(Not run)
Calculates the share of people living in hunger.
reportPriceElasticities(gdx)
reportPriceElasticities(gdx)
gdx |
GDX file |
magpie object with hunger (mio people) or hunger share
Benjamin Leon Bodirsky
## Not run: x <- reportHunger(gdx) ## End(Not run)
## Not run: x <- reportHunger(gdx) ## End(Not run)
reports food price index
reportPriceFoodIndex(gdx, baseyear = "y2020")
reportPriceFoodIndex(gdx, baseyear = "y2020")
gdx |
GDX file |
baseyear |
baseyear of the price index |
Food price index as MAgPIE object Unit: see names
Florian Humpenoeder, Felicitas Beier
## Not run: x <- reportPriceFoodIndex(gdx) ## End(Not run)
## Not run: x <- reportPriceFoodIndex(gdx) ## End(Not run)
reports GHG emission prices
reportPriceGHG(gdx)
reportPriceGHG(gdx)
gdx |
GDX file |
GHG emission prices as MAgPIE object
Florian Humpenoeder, Amsalu W. Yalew
## Not run: x <- reportPriceGHG(gdx) ## End(Not run)
## Not run: x <- reportPriceGHG(gdx) ## End(Not run)
reports land prices (land rent)
reportPriceLand(gdx)
reportPriceLand(gdx)
gdx |
GDX file |
land prices as MAgPIE object Unit: see names
Florian Humpenoeder
## Not run: x <- reportPriceLand(gdx) ## End(Not run)
## Not run: x <- reportPriceLand(gdx) ## End(Not run)
Reports the change in consumption and expenditure due to higher or lower food prices
reportPriceShock(gdx)
reportPriceShock(gdx)
gdx |
GDX file |
magpie object
Benjamin Leon Bodirsky
## Not run: x <- reportPriceShock(gdx) ## End(Not run)
## Not run: x <- reportPriceShock(gdx) ## End(Not run)
reports water prices
reportPriceWater(gdx)
reportPriceWater(gdx)
gdx |
GDX file |
water usage as MAgPIE object Unit: see names
Florian Humpenoeder
## Not run: x <- reportPriceWater(gdx) ## End(Not run)
## Not run: x <- reportPriceWater(gdx) ## End(Not run)
reports woody biomass prices (land rent)
reportPriceWoodyBiomass(gdx)
reportPriceWoodyBiomass(gdx)
gdx |
GDX file |
land prices as MAgPIE object Unit: see names
Abhijeet Mishra
## Not run: x <- reportPriceWoodyBiomass(gdx) ## End(Not run)
## Not run: x <- reportPriceWoodyBiomass(gdx) ## End(Not run)
reportes processing input and output quantities primary-to-process or primary-to-secondary
reportProcessing(gdx, detail = TRUE, indicator = "primary_to_process")
reportProcessing(gdx, detail = TRUE, indicator = "primary_to_process")
gdx |
GDX file |
detail |
if detail=FALSE, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
indicator |
"primary_to_process" for process or "secondary_from_primary" for secondary product output |
processing demand as MAgPIE object (Mt DM)
David Chen, Benjamin Leon Bodirsky
## Not run: x <- reportProcessing(gdx = gdx, detail = TRUE, indicator = "primary_to_process") ## End(Not run)
## Not run: x <- reportProcessing(gdx = gdx, detail = TRUE, indicator = "primary_to_process") ## End(Not run)
reports producer price index
reportProducerPriceIndex(gdx, prod_groups = FALSE)
reportProducerPriceIndex(gdx, prod_groups = FALSE)
gdx |
GDX file |
prod_groups |
whether to return only product groups |
Producer price index as MAgPIE object Unit: see names
Isabelle Weindl, David M CHen
## Not run: x <- reportProducerPriceIndex(gdx) ## End(Not run)
## Not run: x <- reportProducerPriceIndex(gdx) ## End(Not run)
reports production
reportProduction(gdx, detail = FALSE, agmip = FALSE)
reportProduction(gdx, detail = FALSE, agmip = FALSE)
gdx |
GDX file |
detail |
if detail=FALSE, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
agmip |
if agmip = TRUE, additional sector aggregates required for AgMIP are reported (e.g. "AGR") |
production as MAgPIE object. Unit: see names
Benjamin Leon Bodirsky, Isabelle Weindl
## Not run: x <- reportProduction(gdx) ## End(Not run)
## Not run: x <- reportProduction(gdx) ## End(Not run)
reports 2nd gen bioenergy production
reportProductionBioenergy(gdx, detail = FALSE)
reportProductionBioenergy(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if detail=FALSE, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
production as MAgPIE object. Unit: see names
Florian Humpenoeder
## Not run: x <- reportProductionBioenergy(gdx) ## End(Not run)
## Not run: x <- reportProductionBioenergy(gdx) ## End(Not run)
reports production growth rate
reportProductionGrowth(gdx, detail = FALSE)
reportProductionGrowth(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if true, provides results for all commodities, otherwhise aggregates some groups |
Production growth rates (index)
Xiaoxi Wang
## Not run: x <- reportProductionGrowth(gdx="fulldata.gdx",detail=TRUE) ## End(Not run)
## Not run: x <- reportProductionGrowth(gdx="fulldata.gdx",detail=TRUE) ## End(Not run)
reports production in Nr analogous to reportProduction
reportProductionNr(gdx, detail = FALSE)
reportProductionNr(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if detail = FALSE, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
production as MAgPIE object. Unit: see names
Benjamin Leon Bodirsky
## Not run: x <- reportProductionNr(gdx) ## End(Not run)
## Not run: x <- reportProductionNr(gdx) ## End(Not run)
reports per-capita protein food supply (including household waste)
reportProtein(gdx, detail = FALSE)
reportProtein(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if detail=F, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
per-capita protein as MAgPIE object (protein/cap/day)
Benjamin Leon Bodirsky, Kristine Karstens, Abhijeet Mishra, Florian Humpenoeder
## Not run: x <- reportKcal(gdx) ## End(Not run)
## Not run: x <- reportKcal(gdx) ## End(Not run)
reports labor costs per ag. worker in relation to GDP pc from MAgPIE results
reportRelativeHourlyLaborCosts(gdx)
reportRelativeHourlyLaborCosts(gdx)
gdx |
GDX file |
labor costs per ag. worker in relation to GDP pc as MAgPIE object
Debbora Leip
## Not run: x <- reportRelativeHourlyLaborCosts(gdx) ## End(Not run)
## Not run: x <- reportRelativeHourlyLaborCosts(gdx) ## End(Not run)
Report soil organic carbon stock size for future MAgPIE projections
reportResidues(gdx)
reportResidues(gdx)
gdx |
GDX file |
Kristine Karstens
## Not run: x <- reportSOM(gdx) ## End(Not run)
## Not run: x <- reportSOM(gdx) ## End(Not run)
reports Forest rotation length.
reportRotationLength(gdx)
reportRotationLength(gdx)
gdx |
GDX file |
Forest rotation length
Abhijeet Mishra
## Not run: x <- reportRotationLength(gdx) ## End(Not run)
## Not run: x <- reportRotationLength(gdx) ## End(Not run)
reports all SDG indicators relevant for SDG1 - Poverty
reportSDG1(gdx)
reportSDG1(gdx)
gdx |
GDX file |
MAgPIE object
Benjamin Bodirsky
## Not run: x <- reportSDG3(gdx) ## End(Not run)
## Not run: x <- reportSDG3(gdx) ## End(Not run)
reports all SDG indicators relevant for SD12 - Sustainable Production and Consumption
reportSDG12(gdx)
reportSDG12(gdx)
gdx |
GDX file |
MAgPIE object
Benjamin Bodirsky
## Not run: x <- reportSDG12(gdx) ## End(Not run)
## Not run: x <- reportSDG12(gdx) ## End(Not run)
reports all SDG indicators relevant for SD15 - Life on Land
reportSDG15(gdx)
reportSDG15(gdx)
gdx |
GDX file |
MAgPIE object
Benjamin Bodirsky, Isabelle Weindl
## Not run: x <- reportSDG15(gdx) ## End(Not run)
## Not run: x <- reportSDG15(gdx) ## End(Not run)
reports all SDG indicators relevant for SD2 - Hunger
reportSDG2(gdx)
reportSDG2(gdx)
gdx |
GDX file |
MAgPIE object
Benjamin Bodirsky
## Not run: x <- reportSDG2(gdx) ## End(Not run)
## Not run: x <- reportSDG2(gdx) ## End(Not run)
reports all SDG indicators relevant for SDG3 - Health
reportSDG3(gdx)
reportSDG3(gdx)
gdx |
GDX file |
MAgPIE object
Benjamin Bodirsky
## Not run: x <- reportSDG3(gdx) ## End(Not run)
## Not run: x <- reportSDG3(gdx) ## End(Not run)
reports all SDG indicators relevant for SDG6 - Access to Water
reportSDG6(gdx, level = "regglo", outputdir = ".")
reportSDG6(gdx, level = "regglo", outputdir = ".")
gdx |
GDX file |
level |
level of aggregation (cluster: "cell", regional: "regglo") |
outputdir |
output directory |
MAgPIE object
Felicitas Beier, Isabelle Weindl
## Not run: x <- reportSDG6(gdx) ## End(Not run)
## Not run: x <- reportSDG6(gdx) ## End(Not run)
reports all SDG indicators relevant for SD9 - Industrial innovation and infrastructure
reportSDG9(gdx)
reportSDG9(gdx)
gdx |
GDX file |
MAgPIE object
Felicitas Beier
## Not run: x <- reportSDG9(gdx) ## End(Not run)
## Not run: x <- reportSDG9(gdx) ## End(Not run)
Report soil organic carbon stock size for future MAgPIE projections
reportSOM(gdx, baseyear = 1995)
reportSOM(gdx, baseyear = 1995)
gdx |
GDX file |
baseyear |
baseyear for calculating carbon stock change |
Kristine Karstens
## Not run: x <- reportSOM(gdx) ## End(Not run)
## Not run: x <- reportSOM(gdx) ## End(Not run)
Report soil organic carbon stock size for future MAgPIE projections (new som realization)
reportSOM2(gdx, baseyear = 1995)
reportSOM2(gdx, baseyear = 1995)
gdx |
GDX file |
baseyear |
baseyear for calculating carbon stock change |
Kristine Karstens
## Not run: x <- reportSOM2(gdx) ## End(Not run)
## Not run: x <- reportSOM2(gdx) ## End(Not run)
reports Tau
reportTau(gdx)
reportTau(gdx)
gdx |
GDX file |
tau values as MAgPIE object (Index)
Florian Humpenoeder
## Not run: x <- reportTau(gdx) ## End(Not run)
## Not run: x <- reportTau(gdx) ## End(Not run)
reports Tc
reportTc(gdx)
reportTc(gdx)
gdx |
GDX file |
tc values as MAgPIE object (
Florian Humpenoeder
## Not run: x <- reportTc(gdx) ## End(Not run)
## Not run: x <- reportTc(gdx) ## End(Not run)
reports MAgPIE demand for timber.
reportTimber(gdx)
reportTimber(gdx)
gdx |
GDX file |
Timber demand
Abhijeet Mishra
## Not run: x <- reportTimber(gdx) ## End(Not run)
## Not run: x <- reportTimber(gdx) ## End(Not run)
reports MAgPIE demand for timber.
reportTimberDemand(gdx)
reportTimberDemand(gdx)
gdx |
GDX file |
Timber demand
Abhijeet Mishra
## Not run: x <- reportTimberDemand(gdx) ## End(Not run)
## Not run: x <- reportTimberDemand(gdx) ## End(Not run)
reports total hours worked in crop+livestock production (and maccs) from MAgPIE results
reportTotalHoursWorked(gdx, level = "regglo")
reportTotalHoursWorked(gdx, level = "regglo")
gdx |
GDX file |
level |
spatial aggregation: "reg", "glo", "regglo" |
total hours worked as MAgPIE object
Debbora Leip
## Not run: x <- reportTotalHoursWorked(gdx) ## End(Not run)
## Not run: x <- reportTotalHoursWorked(gdx) ## End(Not run)
reports trade
reportTrade(gdx, detail = FALSE)
reportTrade(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if true, provides estimates for all commodities, otherwise aggregates some groups |
Net-Exports and self sufficiency (exports/domestic supply) as MAgPIE object. Unit: see names
Benjamin Leon Bodirsky, Mishko Stevanovic
## Not run: x <- reportTrade(gdx="fulldata.gdx",detail=TRUE) ## End(Not run)
## Not run: x <- reportTrade(gdx="fulldata.gdx",detail=TRUE) ## End(Not run)
reports trade growth rate
reportTradeGrowth(gdx, detail = FALSE)
reportTradeGrowth(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if true, provides results for all commodities, otherwhise aggregates some groups |
Trade growth rates (index)
Xiaoxi Wang
## Not run: x <- reportTradeGrowth(gdx="fulldata.gdx",detail=TRUE) ## End(Not run)
## Not run: x <- reportTradeGrowth(gdx="fulldata.gdx",detail=TRUE) ## End(Not run)
reports value of material demand
reportValueMaterialDemand(gdx)
reportValueMaterialDemand(gdx)
gdx |
GDX file |
magpie object
David Chen
## Not run: x <- reportValueMaterialDemand(gdx) ## End(Not run)
## Not run: x <- reportValueMaterialDemand(gdx) ## End(Not run)
reports trade value
reportValueTrade(gdx, detail = FALSE)
reportValueTrade(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if true, provides estimates for all commodities, otherwhise aggregates some groups |
trade value as MAgPIE object Unit: see names
Florian Humpenoeder
## Not run: x <- reportValueTrade(gdx) ## End(Not run)
## Not run: x <- reportValueTrade(gdx) ## End(Not run)
reports indicator on wage development: hourly labor costs in each time step relative to hourly labor costs in 2000
reportWageDevelopment(gdx, baseYear = 2000, level = "regglo")
reportWageDevelopment(gdx, baseYear = 2000, level = "regglo")
gdx |
GDX file |
baseYear |
year relative to which the wage development should be calculated |
level |
spatial aggregation: "reg", "glo", "regglo" |
indicator on wage development as MAgPIE object
Debbora Leip
## Not run: x <- reportWageDevelopment(gdx) ## End(Not run)
## Not run: x <- reportWageDevelopment(gdx) ## End(Not run)
reports water availability
reportWaterAvailability(gdx)
reportWaterAvailability(gdx)
gdx |
GDX file |
water availability as MAgPIE object Unit: see names
Felicitas Beier
## Not run: x <- reportWaterAvailability(gdx) ## End(Not run)
## Not run: x <- reportWaterAvailability(gdx) ## End(Not run)
reports a set of water indicators
reportWaterIndicators(gdx)
reportWaterIndicators(gdx)
gdx |
GDX file |
MAgPIE object
Felicitas Beier
## Not run: x <- reportWaterIndicators(gdx) ## End(Not run)
## Not run: x <- reportWaterIndicators(gdx) ## End(Not run)
reports water usage for agricultural sector, crops and livestock and non-agricultural sector
reportWaterUsage(gdx, detail = TRUE)
reportWaterUsage(gdx, detail = TRUE)
gdx |
GDX file |
detail |
logical. Setting to FALSE reports for agricultural sector, TRUE reports for combined, crops and livestock separately |
water usage as MAgPIE object Unit: see names
Florian Humpenoeder, Vartika Singh, Miodrag Stevanovic, Felicitas Beier
## Not run: x <- reportWaterUsage(gdx) ## End(Not run)
## Not run: x <- reportWaterUsage(gdx) ## End(Not run)
reports working age population
reportWorkingAgePopulation(gdx, level = "regglo")
reportWorkingAgePopulation(gdx, level = "regglo")
gdx |
GDX file |
level |
spatial aggregation: "reg", "glo", "regglo", "iso" |
working age population as MAgPIE object
Debbora Leip
## Not run: x <- reportWorkingAgePopulation(gdx) ## End(Not run)
## Not run: x <- reportWorkingAgePopulation(gdx) ## End(Not run)
reports yields
reportYields(gdx, detail = FALSE, physical = TRUE)
reportYields(gdx, detail = FALSE, physical = TRUE)
gdx |
GDX file |
detail |
if detail=FALSE, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
physical |
if true (default) physical area (croparea) used for yield calculation; if false harvested area used for yield calculation |
yield as MAgPIE object (Mt DM/ha)
Florian Humpenoeder, Xiaoxi Wang, Kristine Karstens, Abhijeet Mishra, Felicitas Beier
## Not run: x <- reportYields(gdx) ## End(Not run)
## Not run: x <- reportYields(gdx) ## End(Not run)
reports potential yields after calibration
reportYieldsCropCalib(gdx, detail = FALSE)
reportYieldsCropCalib(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if detail=FALSE, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
yield as MAgPIE object (Mt DM/ha)
Edna J. Molina Bacca
## Not run: x <- reportYieldsCropCalib(gdx) ## End(Not run)
## Not run: x <- reportYieldsCropCalib(gdx) ## End(Not run)
reports potential yields before calibration
reportYieldsCropRaw(gdx, detail = FALSE)
reportYieldsCropRaw(gdx, detail = FALSE)
gdx |
GDX file |
detail |
if detail=FALSE, the subcategories of groups are not reported (e.g. "soybean" within "oilcrops") |
yield as MAgPIE object (Mt DM/ha)
Edna J. Molina Bacca
## Not run: x <- reportYieldsCropRaw(gdx) ## End(Not run)
## Not run: x <- reportYieldsCropRaw(gdx) ## End(Not run)
Reports the Crop model input yield shifter
reportYieldShifter( gdx, file = NULL, level = "reg", baseyear = "y2000", relative = TRUE, dir = ".", spamfiledirectory = "" )
reportYieldShifter( gdx, file = NULL, level = "reg", baseyear = "y2000", relative = TRUE, dir = ".", spamfiledirectory = "" )
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 superAggregate |
baseyear |
baseyear for the yield shifter. Also fixes land patterns for aggregation to baseyear. |
relative |
relative or absolute changes to baseyear |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
crop yield as MAgPIE object (unit depends on attributes)
Benjamin Leon Bodirsky
## Not run: x <- reportYieldShifter(gdx) ## End(Not run)
## Not run: x <- reportYieldShifter(gdx) ## End(Not run)
reads Crop Residue Biomass out of a MAgPIE gdx file
ResidueBiomass( gdx, level = "reg", dir = ".", spamfiledirectory = "", products = "kcr", product_aggr = FALSE, attributes = "dm", water_aggr = TRUE, plantpart = "both" )
ResidueBiomass( gdx, level = "reg", dir = ".", spamfiledirectory = "", products = "kcr", product_aggr = FALSE, attributes = "dm", water_aggr = TRUE, plantpart = "both" )
gdx |
GDX file |
level |
Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
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. Usually boolean, but here also the value "kres" is allowed, which provides kcr aggregated to kres |
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). |
plantpart |
both ag or bg |
production as MAgPIE object (unit depends on attributes)
Benjamin Leon Bodirsky
## Not run: x <- production(gdx) ## End(Not run)
## Not run: x <- production(gdx) ## End(Not run)
reads various crop residue (carbon) outputs out of a MAgPIE gdx file
Residues( gdx, level = "regglo", products = "kres", waterAggr = TRUE, output = "all" )
Residues( gdx, level = "regglo", products = "kres", waterAggr = TRUE, output = "all" )
gdx |
GDX file |
level |
Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) |
products |
Selection of products (either "kcr" or "kres") |
waterAggr |
Aggregate irrigated and non-irriagted production or not (boolean). |
output |
Switch between different outputs: "biomass", "fieldBalance", "resDemand", all |
production as MAgPIE object (unit depends on attributes)
Kristine Karstens, Michael Crawford
## Not run: x <- Residues(gdx) ## End(Not run)
## Not run: x <- Residues(gdx) ## End(Not run)
reads Crop Residue Usage out of a MAgPIE gdx file
ResidueUsage( gdx, level = "reg", dir = ".", products = "kcr", product_aggr = FALSE, attributes = "dm", water_aggr = TRUE, spamfiledirectory = "" )
ResidueUsage( gdx, level = "reg", dir = ".", products = "kcr", product_aggr = FALSE, attributes = "dm", water_aggr = TRUE, spamfiledirectory = "" )
gdx |
GDX file |
level |
Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
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. Usually boolean, but here also the value "kres" is allowed, which provides kcr aggregated to kres |
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). |
spamfiledirectory |
deprecated. please use |
production as MAgPIE object (unit depends on attributes)
Kristine Karstens, Michael Crawford
## Not run: x <- ResidueUsage(gdx) ## End(Not run)
## Not run: x <- ResidueUsage(gdx) ## End(Not run)
reads rotation length out of a MAgPIE gdx file
RotationLength(gdx, file = NULL, level = "regglo")
RotationLength(gdx, file = NULL, level = "regglo")
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 |
Forest rotation length
Forest rotation length
Abhijeet Mishra
## Not run: x <- RotationLength(gdx) ## End(Not run)
## Not run: x <- RotationLength(gdx) ## End(Not run)
Calculates MAgPIE demand for Seed out of a gdx file
Seed(gdx, level = "reg", attributes = "dm", dir = ".", spamfiledirectory = "")
Seed(gdx, level = "reg", attributes = "dm", dir = ".", spamfiledirectory = "")
gdx |
GDX file |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
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. |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
Demand definitions are equivalent to FAO CBS categories
demand as MAgPIE object (Unit depends on attributes)
Benjamin Leon Bodirsky
## Not run: x <- demand(level="regglo", products="kcr") ## End(Not run)
## Not run: x <- demand(level="regglo", products="kcr") ## End(Not run)
Calculates soil organic carbon stock size based on a MAgPIE gdx file
SOM( gdx, file = NULL, type = "stock", reference = "actual", level = "reg", noncrop_aggr = TRUE, dir = ".", spamfiledirectory = "" )
SOM( gdx, file = NULL, type = "stock", reference = "actual", level = "reg", noncrop_aggr = TRUE, dir = ".", spamfiledirectory = "" )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
type |
"stock" (default) for absoulte values, "density" for per hectar values |
reference |
default is "actual" (cshare in actual carbon stocks). Other option is "target" (cshare in target carbon stocks). |
level |
Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
noncrop_aggr |
aggregate non cropland types to 'noncropland' (if FALSE all land types of pools59 will be reported) |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
spamfiledirectory |
deprecated. please use |
A MAgPIE object containing som values
Kristine Karstens
## Not run: x <- SOM(gdx) ## End(Not run)
## Not run: x <- SOM(gdx) ## End(Not run)
Calculates soil organic carbon stock size based on a MAgPIE gdx file (for threepool realization)
SOM2(gdx, type = "stock", level = "regglo", noncropAggr = TRUE)
SOM2(gdx, type = "stock", level = "regglo", noncropAggr = TRUE)
gdx |
GDX file |
type |
"stock" (default) for absoulte values, "density" for per hectar values |
level |
Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) |
noncropAggr |
aggregate non cropland types to 'noncropland' (if FALSE all land types of pools59 will be reported) |
A MAgPIE object containing som values
Kristine Karstens
## Not run: x <- SOM2(gdx) ## End(Not run)
## Not run: x <- SOM2(gdx) ## End(Not run)
Submits Calibration Factors of current run to calibration archive. Currently covers calibration factors for yields and land conversion costs. This is useful to make runs more comparable to each other. The function can be also used as part of a script running a collection of runs.
submitCalibration( name, file = c("modules/14_yields/input/f14_yld_calib.csv", "modules/39_landconversion/input/f39_calib.cs3"), archive = "/p/projects/landuse/data/input/calibration" )
submitCalibration( name, file = c("modules/14_yields/input/f14_yld_calib.csv", "modules/39_landconversion/input/f39_calib.cs3"), archive = "/p/projects/landuse/data/input/calibration" )
name |
name under which the calibration should be stored. Should be as self-explaining as possible. The total file name has the format calibration_<name>_<date>.tgz. |
file |
path to a f14_yld_calib.csv and f39_calib.cs3 (older version f39_calib.csv) file (in this order). Alternatively a fulldata.gdx file containing the calibration factors can be used. Supported file types are "csv", "cs3" and "gdx". |
archive |
path to the archive the calibration factors should be stored |
file name of the stored calibration factors (useful for scripts in which you might want to re-use a calibration setting at a later stage again)
Jan Philipp Dietrich, Florian Humpenoeder, Patrick v. Jeetze
## Not run: fname <- submitCalibration("TestCalibration", file = "fulldata.gdx") ## End(Not run)
## Not run: fname <- submitCalibration("TestCalibration", file = "fulldata.gdx") ## End(Not run)
drop-in replacement for superAggregate based on toolAggregate
superAggregateX( data, aggr_type, level = "reg", weight = NULL, crop_aggr = FALSE )
superAggregateX( data, aggr_type, level = "reg", weight = NULL, crop_aggr = FALSE )
data |
An MAgPIE |
aggr_type |
Aggregation Type. Can be any function for one or two objects (data and weight) of the same size. Currently pre-supported functions: "sum","mean","weighted_mean". |
level |
Allowed level types are global "glo", regional "reg" and "regglo" |
weight |
Currently only used for weighted_mean |
crop_aggr |
determines whether output should be crop-specific (FALSE) or aggregated over all crops (TRUE). The method used for aggregation is set by aggr_type |
returns a MAgPIE object.
Jan Philipp Dietrich
calculates aggregate change in economic surplus in mio.US$ based on a MAgPIE gdx files from two different scenarios.
surplusChange(gdx1, gdx2, file = NULL, level = "reg", type = "consumer")
surplusChange(gdx1, gdx2, file = NULL, level = "reg", type = "consumer")
gdx1 |
GDX file from benchmark scenario |
gdx2 |
GDX file from the analyzed scenario |
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 superAggregate |
type |
Economic surplus type: "consumer" (default), "producer" or "welfare" |
A MAgPIE object containing aggregate changes in producer surplus, consumer surplus and aggregate economic welfare between an analyzed scenario and a benchmark scenario, in million $US.
Miodrag Stevanovic
## Not run: x <- surplusChange(gdx1, gdx2) ## End(Not run)
## Not run: x <- surplusChange(gdx1, gdx2) ## End(Not run)
Calculates Landuse intensity indicator tau based on a MAgPIE gdx file
tau( gdx, file = NULL, level = "reg", start_value = FALSE, digits = 4, prev_year = "y1985", type = "crop" )
tau( gdx, file = NULL, level = "reg", start_value = FALSE, digits = 4, prev_year = "y1985", type = "crop" )
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 superAggregate |
start_value |
If TRUE, the initial values are added under the year |
digits |
The result will be rounded to this number of digits |
prev_year |
Year to store the initialization tau information in |
type |
type of tc 'pastr' or 'crop'; or "both" if both are needed |
A MAgPIE object containing tau values (index)
Jan Philipp Dietrich
## Not run: x <- tau(gdx) ## End(Not run)
## Not run: x <- tau(gdx) ## End(Not run)
calculates taxes of crop rotations as difference between the selected scenario and the baseline scenario that shall capture the internalized incentives for crop rotations.
taxRevenueRotations( gdx, file = NULL, level = "regglo", dir = ".", penalty = "onlyTaxRevenue" )
taxRevenueRotations( gdx, file = NULL, level = "regglo", dir = ".", penalty = "onlyTaxRevenue" )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
aggregation level, reg, glo or regglo |
dir |
spamfiledirectory |
penalty |
"OnlyTaxRevenue" provides the tax Revenues from a rotation tax/subsidy. "OnlyInternalizedServices" provides the penalty by foregone Ecosystem Services, the part of the externality which is internalized by the farmer independent of the tax. "FullPenalty" provides the sum of both, which is what the model sees. |
Benjamin Leon Bodirsky
## Not run: x <- wageRent(gdx) ## End(Not run)
## Not run: x <- wageRent(gdx) ## End(Not run)
Calculates TC rates based on a MAgPIE gdx file
tc( gdx, file = NULL, level = "reg", annual = TRUE, avrg = FALSE, baseyear = 1995, type = "crop" )
tc( gdx, file = NULL, level = "reg", annual = TRUE, avrg = FALSE, baseyear = 1995, type = "crop" )
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 superAggregate |
annual |
If TRUE, annual values are reported. If FALSE, the values for the whole timestep are reported. If FALSE, avrg has no effect |
avrg |
If FALSE the annual tc rates of the current period are returned, otherwise the average annual tc rate for the period tbase to tn is returned. tbase defaults to the first timestep (see baseyear) |
baseyear |
Determines the base year timestep for annual tc calculation. Average tc rates for later timesteps are calculated with respect to baseyear. No tc rates for timesteps before baseyear are returned) |
type |
type of tc 'pastr' or 'crop' |
A MAgPIE object containing tc rates. Annual ones if annual=TRUE, for the whole timestep if annual=FALSE.
Jan Philipp Dietrich
## Not run: x <- tc(gdx) ## End(Not run)
## Not run: x <- tc(gdx) ## End(Not run)
reads timber demand out of a MAgPIE gdx file
Timber(gdx, file = NULL, level = "regglo")
Timber(gdx, file = NULL, level = "regglo")
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 |
Forest demandfor timber production
Forest demandfor timber production
Abhijeet Mishra
## Not run: x <- Timber(gdx) ## End(Not run)
## Not run: x <- Timber(gdx) ## End(Not run)
reads timber demand out of a MAgPIE gdx file
TimberDemand(gdx, file = NULL, level = "regglo")
TimberDemand(gdx, file = NULL, level = "regglo")
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 |
Forest demandfor timber production
Forest demandfor timber production
Abhijeet Mishra
## Not run: x <- TimberDemand(gdx) ## End(Not run)
## Not run: x <- TimberDemand(gdx) ## End(Not run)
reads timber production out of a MAgPIE gdx file
TimberProductionVolumetric( gdx, file = NULL, level = "regglo", sumProduct = FALSE, sumSource = TRUE )
TimberProductionVolumetric( gdx, file = NULL, level = "regglo", sumProduct = FALSE, sumSource = TRUE )
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 |
sumProduct |
sum over wood and woodfuel (TRUE/FALSE) |
sumSource |
sum over timber sources: timber plantations, primary forest, secondary forest and non-forest land (woodfuel only) (TRUE/FALSE) |
Annual timber production from timber plantations, primary forest, secondary forest and non-forest land (woodfuel only). Converted from mio. ton DM per year to mio. m3 per year using volumetric conversion factors.
Timber production in mio. m3 per year
Abhijeet Mishra, Florian Humpenoeder
## Not run: x <- TimberProductionVolumetric(gdx) ## End(Not run)
## Not run: x <- TimberProductionVolumetric(gdx) ## End(Not run)
Calculates MAgPIE time period lengths between each two timesteps
timePeriods(gdx)
timePeriods(gdx)
gdx |
GDX file |
magpie time periods as MAgPIE object as a number of years
Mishko Stevanovic
## Not run: x <- timePeriods(gdx=gdx) ## End(Not run)
## Not run: x <- timePeriods(gdx=gdx) ## End(Not run)
returns total hours worked per year in crop+livestock production from MAgPIE results
totalHoursWorked(gdx, level = "reg", file = NULL)
totalHoursWorked(gdx, level = "reg", file = NULL)
gdx |
GDX file |
level |
spatial aggregation to report employment ("reg", "glo", or "regglo") |
file |
a file name the output should be written to using write.magpie |
total hours worked in agriculture per year
Debbora Leip
## Not run: x <- totalHoursWorked(gdx) ## End(Not run)
## Not run: x <- totalHoursWorked(gdx) ## End(Not run)
Calculates MAgPIE trade or self-sufficiencies out of a gdx file
trade( gdx, file = NULL, level = "reg", products = "k_trade", product_aggr = FALSE, attributes = "dm", weight = FALSE, relative = FALSE, type = "net-exports" )
trade( gdx, file = NULL, level = "reg", products = "k_trade", product_aggr = FALSE, attributes = "dm", weight = FALSE, relative = FALSE, type = "net-exports" )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
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. |
weight |
in case relative=T also the weighting for the self sufficiencies is provided as it is an intensive parameter |
relative |
if relative=TRUE, self sufficiencies are reported, so the amount of production divided by domestic demand |
type |
exports-imports ("net-exports"), gross imports ("imports") or gross exports ("exports"); only valid if relative=FALSE |
Trade definitions are equivalent to FAO CBS categories
trade (production-demand) as MAgPIE object; unit depends on attributes
Benjamin Leon Bodirsky, Florian Humpenoeder, Mishko Stevanovic
## Not run: x <- trade(gdx="fulldata.gdx", level="regglo", products="kcr") ## End(Not run)
## Not run: x <- trade(gdx="fulldata.gdx", level="regglo", products="kcr") ## End(Not run)
Calculates the value of traded goods based on a gdx file
tradeValue( gdx, file = NULL, level = "reg", products = "k_trade", product_aggr = FALSE, type = "net-exports", glo_weight = "export", relative = FALSE )
tradeValue( gdx, file = NULL, level = "reg", products = "k_trade", product_aggr = FALSE, type = "net-exports", glo_weight = "export", relative = FALSE )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
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) |
type |
exports-imports ("net-exports"), gross imports ("imports") or gross exports ("exports"); only valid if relative=FALSE |
glo_weight |
Decides the calculation of global prices.
Weighting schemes are applied for estimation of global producer price.
If |
relative |
if relative=TRUE, self sufficiencies are reported (the amount of production divided by domestic demand) |
A MAgPIE object containing the value of trade flows in Million of US dollars
Misko Stevanovic, Florian Humpenoeder, Edna J. Molina Bacca
## Not run: x <- tradeValue(gdx) ## End(Not run)
## Not run: x <- tradeValue(gdx) ## End(Not run)
Internal support function to run a list of reportings in
a tryReport
environment.
tryList(..., gdx, level = "regglo")
tryList(..., gdx, level = "regglo")
... |
report function to be run |
gdx |
gdx file to report from |
level |
spatial level (either "regglo" for region+global or "iso" for ISO countries) |
Jan Philipp Dietrich
Internal support function to run a reporting in a try environment and properly report problems if something goes wrong without stopping the further processing in case of an error
tryReport(report, width, gdx, level = "regglo", n = 1)
tryReport(report, width, gdx, level = "regglo", n = 1)
report |
report function to be run |
width |
max number of characters per line |
gdx |
gdx file to report from |
level |
spatial level (either "regglo" for region+global or "iso" for ISO countries) |
n |
number of parent generations to go back when catching the environment the report should get evaluated in |
Jan Philipp Dietrich
Create Validation pdf from MAgPIE output and corresponding validation.mif
validation( gdx, hist, file = "validation.pdf", runinfo = NULL, clusterinfo = NULL, debug = FALSE, reportfile = NULL, scenario = NULL, getReport = NULL, ... )
validation( gdx, hist, file = "validation.pdf", runinfo = NULL, clusterinfo = NULL, debug = FALSE, reportfile = NULL, scenario = NULL, getReport = NULL, ... )
gdx |
GDX file |
hist |
Validation data. All formats allowed which can be converted to quitte (including characters containing the path to a mif file) |
file |
a file name the output pdf |
runinfo |
(optional) Rdata object with run information |
clusterinfo |
(optional) RDS file or vector containing mapping information on 0.5degree between regions and cluster |
debug |
Switch to activate or deactivate debug mode |
reportfile |
file name to which a backup of the magpie reporting should be written (file ending should be ".mif"). No report written if set to NULL or if report is already provided via getReport! |
scenario |
scenario name used inside reportfile. Not used if reportfile is NULL. |
getReport |
the return value of the |
... |
additional arguments supplied to the validationpdf function |
Jan Philipp Dietrich
## Not run: validation("fulldata.gdx","validation.mif",filter="Yield") ## End(Not run)
## Not run: validation("fulldata.gdx","validation.mif",filter="Yield") ## End(Not run)
calculates agricultural costs without taxes and incentives (i.e. GHG taxes and BII incentives)
ValueMaterialDemand(gdx, file = NULL, level = "regglo")
ValueMaterialDemand(gdx, file = NULL, level = "regglo")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
aggregation level, reg, glo or regglo |
David M Chen
## Not run: x <- ValueMaterialDemand(gdx) ## End(Not run)
## Not run: x <- ValueMaterialDemand(gdx) ## End(Not run)
calculates indicator to describe wage development based on agricultural wages in MAgPIE (hourly labor costs relative to a base year)
wageDevelopment(gdx, baseYear = 2000, file = NULL, level = "regglo")
wageDevelopment(gdx, baseYear = 2000, file = NULL, level = "regglo")
gdx |
GDX file |
baseYear |
year relative to which the wage development should be calculated |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("iso", "reg", "glo", "regglo") |
MAgPIE object containing indicator on wage development
Debbora Leip
## Not run: x <- wageDevelopment(gdx) ## End(Not run)
## Not run: x <- wageDevelopment(gdx) ## End(Not run)
calculates wage rent for exogenous wage scenarios
wageRent(gdx, file = NULL, level = "regglo")
wageRent(gdx, file = NULL, level = "regglo")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
aggregation level, reg, glo or regglo |
Debbora Leip
## Not run: x <- wageRent(gdx) ## End(Not run)
## Not run: x <- wageRent(gdx) ## End(Not run)
reads area actually irrigated from a MAgPIE gdx file
water_AAI(gdx, file = NULL, level = "reg", dir = ".")
water_AAI(gdx, file = NULL, level = "reg", dir = ".")
gdx |
GDX file |
file |
a file name the output should be written to using |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) |
A MAgPIE object containing the area actually irrigated (Mha)
Stephen Wirth, Anne Biewald, Felicitas Beier
## Not run: x <- water_AEI(gdx) ## End(Not run)
## Not run: x <- water_AEI(gdx) ## End(Not run)
reads area equipped for irrigation from a MAgPIE gdx file
water_AEI(gdx, file = NULL, level = "reg")
water_AEI(gdx, file = NULL, level = "reg")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
A MAgPIE object containing the area equipped for irrigation (Mha)
Markus Bonsch
## Not run: x <- water_AEI(gdx) ## End(Not run)
## Not run: x <- water_AEI(gdx) ## End(Not run)
reads available water from a MAgPIE gdx file
water_avail( gdx, file = NULL, level = "reg", dir = ".", sources = NULL, sum = TRUE, digits = 4 )
water_avail( gdx, file = NULL, level = "reg", dir = ".", sources = NULL, sum = TRUE, digits = 4 )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
dir |
directory for files necessary for disaggregation |
sources |
Vector of water sources that shall be obtained. NULL for all sources |
sum |
Sum the contribution of different sources (TRUE) or display them individually (FALSE) |
digits |
integer. For rounding of the return values |
A MAgPIE object containing the available water (km^3)
Markus Bonsch, Felicitas Beier
## Not run: x <- water_avail(gdx) ## End(Not run)
## Not run: x <- water_avail(gdx) ## End(Not run)
reads Irrigation efficiency from a MAgPIE gdx file
water_efficiency(gdx, file = NULL, level = "reg")
water_efficiency(gdx, file = NULL, level = "reg")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
A MAgPIE object containing the irrigation efficiency on the requested aggregation level
Markus Bonsch
## Not run: x <- water_efficiency(gdx) ## End(Not run)
## Not run: x <- water_efficiency(gdx) ## End(Not run)
reads water prices from a MAgPIE gdx file
water_price( gdx, file = NULL, level = "reg", weight = "value", index = FALSE, index_baseyear = 2005, digits = 4 )
water_price( gdx, file = NULL, level = "reg", weight = "value", index = FALSE, index_baseyear = 2005, digits = 4 )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate |
weight |
For determining weights to use for generating water prices at levels beyond 'cellular'. Takes "value" and "quantity". "value" sums regional weights by value of water per cluster, "quantity" sums regional weight by qty of water per cluster |
index |
FALSE (default) or TRUE |
index_baseyear |
baseyear to use for index calculation (only used if index=TRUE) |
digits |
integer. For rounding of the return values |
A MAgPIE object containing the water shadow prices (US Dollar/cubic metre).
Markus Bonsch, Vartika Singh, Miodrag Stevanovic
## Not run: x <- water_price(gdx) ## End(Not run)
## Not run: x <- water_price(gdx) ## End(Not run)
reads area usage from a MAgPIE gdx file
water_usage( gdx, file = NULL, level = "reg", users = NULL, sum = FALSE, seasonality = "total", abstractiontype = "withdrawal", digits = 4, dir = "." )
water_usage( gdx, file = NULL, level = "reg", users = NULL, sum = FALSE, seasonality = "total", abstractiontype = "withdrawal", digits = 4, dir = "." )
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) |
seasonality |
water usage time of the year. options: "grper" (growing period) or "total" (entire year). Note: currently only implemented for non-agricultural water usage. |
abstractiontype |
water usage abstraction type: "withdrawal" or "consumption" |
digits |
integer. For rounding of the return values |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
A MAgPIE object containing the water usage (km^3/yr)
Markus Bonsch, Vartika Singh, Felicitas Beier
## Not run: x <- water_usage(gdx) ## End(Not run)
## Not run: x <- water_usage(gdx) ## End(Not run)
reads environmental flow requirements (as they enter MAgPIE) from a MAgPIE gdx file
waterEFR(gdx, file = NULL, level = "cell", digits = 4)
waterEFR(gdx, file = NULL, level = "cell", digits = 4)
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) |
digits |
integer. For rounding of the return values |
A MAgPIE object containing environmental flow requirements (km^3)
Felicitas Beier
## Not run: x <- waterEFR(gdx) ## End(Not run)
## Not run: x <- waterEFR(gdx) ## End(Not run)
calculates area that falls into cluster experiencing environmental flow violations from MAgPIE outputs
waterEFVarea(gdx, file = NULL, level = "reg", digits = 4, dir = ".")
waterEFVarea(gdx, file = NULL, level = "reg", digits = 4, dir = ".")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global), or "grid" (for disaggregated output using cropland as weight) |
digits |
integer. For rounding of the return values |
dir |
directory for weight for disaggregation |
A MAgPIE object containing the area under environmental flow violations (Mha)
Felicitas Beier
## Not run: x <- waterEFVarea(gdx) ## End(Not run)
## Not run: x <- waterEFVarea(gdx) ## End(Not run)
calculates environmental flow violation volume from MAgPIE outputs
waterEFViolation(gdx, file = NULL, level = "reg", digits = 4, dir = ".")
waterEFViolation(gdx, file = NULL, level = "reg", digits = 4, dir = ".")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global), or "grid" (for disaggregated output using cropland as weight) |
digits |
integer. For rounding of the return values |
dir |
directory for weight for disaggregation |
A MAgPIE object containing the volume of environmental flow violations (km^3)
Felicitas Beier
## Not run: x <- waterEFViolation(gdx) ## End(Not run)
## Not run: x <- waterEFViolation(gdx) ## End(Not run)
calculates ratio of environmental flow violation volume (EFV) to water environmental flow requirements (EFR) in MAgPIE.
waterEFVratio(gdx, file = NULL, level = "cell", dir = ".")
waterEFVratio(gdx, file = NULL, level = "cell", dir = ".")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) or "grid" (grid cell) |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
MAgPIE object
Felicitas Beier
## Not run: x <- waterEFVratio(gdx) ## End(Not run)
## Not run: x <- waterEFVratio(gdx) ## End(Not run)
calculates which areas are affected by water stress from water availability and water demand in MAgPIE. Water stress is calculated based on the proportion of water withdrawals to water availability. Thresholds based on World Resources Institute definition (https://www.wri.org/data/water-stress-country): Low stress: <10 Low-to-medium stress: 10-20 Medium to high stress: 20-40 High stress: 40-80 Extremely high stress: >80
waterStress(gdx, stressRatio = 0.4, file = NULL, level = "cell")
waterStress(gdx, stressRatio = 0.4, file = NULL, level = "cell")
gdx |
GDX file |
stressRatio |
threshold defining level of water stress (e.g. 0.2 for medium water stress, 0.4 for high water stress) |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) |
MAgPIE object indicating whether location is water stressed (1) or not (0)
Felicitas Beier
## Not run: x <- waterStress(gdx) ## End(Not run)
## Not run: x <- waterStress(gdx) ## End(Not run)
People living in water stressed region
waterStressedPopulation( gdx, file = NULL, level = "cell", dir = ".", absolute = TRUE )
waterStressedPopulation( gdx, file = NULL, level = "cell", dir = ".", absolute = TRUE )
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) or "grid" (grid cell) |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
absolute |
TRUE: reports people living in water stressed region in million, FALSE: returns share of population |
MAgPIE object
Felicitas Beier
## Not run: x <- waterStressRatio(gdx) ## End(Not run)
## Not run: x <- waterStressRatio(gdx) ## End(Not run)
calculates water stress ratio from water availability and water demand in MAgPIE. Water stress ratio is the ratio of water withdrawals (in the growing period) to water availability (in the growing period)
waterStressRatio(gdx, file = NULL, level = "cell", dir = ".")
waterStressRatio(gdx, file = NULL, level = "cell", dir = ".")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
spatial level of aggregation: "cell" (cellular), "reg" (regional), "glo" (global), "regglo" (regional and global) or "grid" (grid cell) |
dir |
for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation |
MAgPIE object
Felicitas Beier
## Not run: x <- waterStressRatio(gdx) ## End(Not run)
## Not run: x <- waterStressRatio(gdx) ## End(Not run)
Reads wood harvest area separated by source (primforest, secdforest, forestry, other) and age classes from a gdx. The data is on cluster level and the unit is Mha per year.
woodHarvestArea(gdx)
woodHarvestArea(gdx)
gdx |
A fulldata.gdx of a magpie run, usually with endogenous forestry enabled |
A magpie object with the following dimensions: region, id, year, source, ageClass
Pascal Sauer
Reads roundwood and fuelwood production/harvest data separated by source (primforest, secdforest, forestry, other) from a gdx. The data is on cluster level and the unit is Petagram (= mio. t) dry matter per year (Pg DM yr-1).
woodProduction(gdx)
woodProduction(gdx)
gdx |
A fulldata.gdx of a magpie run, usually with endogenous forestry enabled |
A magpie object with the following dimensions: region, id, year, source, woodType
Pascal Sauer
Calculates crop yields based on a MAgPIE gdx file
yields( gdx, file = NULL, level = "reg", products = "kcr", product_aggr = F, attributes = "dm", water_aggr = T )
yields( gdx, file = NULL, level = "reg", products = "kcr", product_aggr = F, attributes = "dm", water_aggr = T )
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 superAggregate |
products |
Selection of products (either by naming products, e.g. "tece", or naming a set,e.g."kcr"), also including "pasture" |
product_aggr |
aggregate over products or not (boolean) |
attributes |
dry matter: Mt/ha ("dm"), gross energy: PJ/ha ("ge"), reactive nitrogen: Mt/ha ("nr"), phosphor: Mt/ha ("p"), potash: Mt/ha ("k"), wet matter: Mt/ha ("wm"). Can also be a vector. |
water_aggr |
aggregate irrigated and non-irriagted production or not (boolean). |
crop yield as MAgPIE object (unit depends on attributes)
Florian Humpenoeder
## Not run: x <- yields(gdx) ## End(Not run)
## Not run: x <- yields(gdx) ## End(Not run)
Reads potential yields after calibration
YieldsCropCalib(gdx, file = NULL, level = "cell", dir = ".")
YieldsCropCalib(gdx, file = NULL, level = "cell", dir = ".")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation |
dir |
directory for disaggregation to grid level |
A MAgPIE object containing values of potential yields after the calibration routines
Edna Molina Bacca
## Not run: x <- YieldsCropCalib(gdx) ## End(Not run)
## Not run: x <- YieldsCropCalib(gdx) ## End(Not run)
Reads potential yields after calibration
YieldsCropRaw(gdx, file = NULL, level = "cell")
YieldsCropRaw(gdx, file = NULL, level = "cell")
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation |
A MAgPIE object containing values of potential yields after the calibration routines
Edna Molina Bacca
## Not run: x <- YieldsCropRaw(gdx) ## End(Not run)
## Not run: x <- YieldsCropRaw(gdx) ## End(Not run)