Package 'mrland'

Title: MadRaT land data package
Description: The package provides land related data via the madrat framework.
Authors: Jan Philipp Dietrich [aut, cre], Abhijeet Mishra [aut], Isabelle Weindl [aut], Benjamin Leon Bodirsky [aut], Xiaoxi Wang [aut], Lavinia Baumstark [aut], Ulrich Kreidenweis [aut], David Klein [aut], Nele Steinmetz [aut], David Chen [aut], Florian Humpenoeder [aut], Patrick von Jeetze [aut], Stephen Wirth [aut], Felicitas Beier [aut], David Hoetten [aut], Pascal Sauer [aut], Jake Tommey [aut]
Maintainer: Jan Philipp Dietrich <[email protected]>
License: LGPL-3 | file LICENSE
Version: 0.65.1
Built: 2024-11-19 08:30:41 UTC
Source: https://github.com/pik-piam/mrland

Help Index


MadRaT land data package

Description

The package provides land related data via the madrat framework.

Author(s)

Maintainer: Jan Philipp Dietrich <[email protected]>

See Also

Useful links:


calc2ndBioDem

Description

calculates 2nd generation bioenergy demand

Usage

calc2ndBioDem(datasource, rev = numeric_version("0.1"))

Arguments

datasource

source to be used

rev

data revision the output will be produced for (numeric_version)

Value

magpie object with results on country level, weight on country level, unit and description.

Examples

## Not run: 
calcOutput("2ndBioDem")

## End(Not run)

Aggregation and calculation of the mean of each MAgPIE region for the source SathayeForest

Description

This function aggregates the data from source SathayeForest. A weight is implemented as the mean for each MAgPIE region is calculated.

Usage

calcAfforestCosts()

Value

MAgPIE object of the calculated means of each MAgPIE region

Author(s)

Nele Steinmetz

See Also

calcOutput, readSathayeForest, convertSathayeForest

Examples

## Not run: 

a <- calcOutput("AfforestCosts")


## End(Not run)

calcAtmosphericDepositionRates

Description

Conputes Atmospheric (nitrogen) deposition rates per area on different land-use types.

Usage

calcAtmosphericDepositionRates(cellular = FALSE, cells = "lpjcell")

Arguments

cellular

TRUE for results on 0.5 degree grid.

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Benjamin Leon Bodirsky

See Also

calcAtmosphericDeposition, calcNitrogenBudgetCropland

Examples

## Not run: 
calcOutput("AtmosphericDepositionRates")

## End(Not run)

calcAvlCropland

Description

Calculates the total available cropland per grid cell, based on physical cropland suitability data or other criteria, such as constraints on cropland expansion

Usage

calcAvlCropland(
  marginal_land = "magpie",
  cell_upper_bound = 0.9,
  country_level = FALSE,
  cells = "lpjcell",
  luhBaseYear = "y1995"
)

Arguments

marginal_land

Defines which share of marginal land should be included (see options below) and whether suitable land under irrigated conditions ("irrigated"), under rainfed conditions ("rainfed") or suitability under rainfed conditions including currently irrigated land (rainfed_and_irrigated) should be used. Options combined via ":" The different marginal land options are:

  • "all_marginal": All marginal land (suitability index between 0-0.33) is included as suitable

  • "q33_marginal": The bottom tertile (suitability index below 0.13) of the marginal land area is excluded.

  • "q50_marginal": The bottom half (suitability index below 0.18) of the marginal land area is excluded.

  • "q66_marginal": The first and second tertile (suitability index below 0.23) of the marginal land area are excluded.

  • "q75_marginal": The first, second and third quartiles (suitability index below 0.25) of the marginal land are are excluded

  • "no_marginal": Areas with a suitability index of 0.33 and lower are excluded.

  • "magpie": Returns "all_marginal:rainfed_and_irrigated", "q33_marginal:rainfed_and_irrigated" and "no_marginal:rainfed_and_irrigated" in a magclass object to be used as magpie input.

cell_upper_bound

Upper bound for cropland at the grid cell level. Even if, for instance, the total available cropland area equals the land area in a grid cell, cropland cannot be expanded above this value.

country_level

Whether output shall be at country level. Requires aggregate=FALSE in calcOutput.

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

luhBaseYear

Base year of LUH land area

Value

magpie object in cellular resolution

Author(s)

Patrick v. Jeetze, Felicitas Beier

Examples

## Not run: 
calcOutput("AvlCropland", aggregate = FALSE)

## End(Not run)

calcBHIFL

Description

Function calculates land area in conservation priority areas

Usage

calcBHIFL(cells = "lpjcell", nclasses = "seven")

Arguments

cells

number of cells of landmask (select "magpiecell" for 59199 cells or "lpjcell" for 67420 cells)

nclasses

Options are either "seven" or "nine".

  • "seven" separates primary and secondary forest and includes "crop", "past", "forestry", "primforest", "secdforest", "urban" and "other"

  • "nine" adds the separation of pasture and rangelands, as well as a differentiation of primary and secondary non-forest vegetation and therefore returns "crop", "past", "range", "forestry", "primforest", "secdforest", "urban", "primother" and "secdother"

Value

magpie object in cellular resolution with different protection options in conservation priority areas

Author(s)

Patrick v. Jeetze

Examples

## Not run: 
calcOutput("BHIFL", aggregate = FALSE)

## End(Not run)

calcBMIshr

Description

estimates average BMI of a BMI group for a population group

Usage

calcBMI()

Value

List with a magpie object

Author(s)

Benjamin Leon Bodirsky

See Also

readNCDrisc, calcIntake

Examples

## Not run:  
calcOutput("BMI",aggregate=FALSE)

## End(Not run)

calcBMIshr

Description

estimates population based on BMI share

Usage

calcBMIshr(convert = TRUE)

Arguments

convert

Use raw data or interpolated data. Raw data should only be used for regressions.

Value

List with a magpie object

Author(s)

Benjamin Leon Bodirsky

See Also

readNCDrisc, calcIntake

Examples

## Not run: 
calcOutput("BMIshr")

## End(Not run)

calcBrooks2005OldConservationPrios

Description

Function calculates land area in conservation priority areas

Usage

calcBrooks2005OldConservationPrios(cells = "lpjcell", nclasses = "seven")

Arguments

cells

number of cells of landmask (select "magpiecell" for 59199 cells or "lpjcell" for 67420 cells)

nclasses

Options are either "seven" or "nine".

  • "seven" separates primary and secondary forest and includes "crop", "past", "forestry", "primforest", "secdforest", "urban" and "other"

  • "nine" adds the separation of pasture and rangelands, as well as a differentiation of primary and secondary non-forest vegetation and therefore returns "crop", "past", "range", "forestry", "primforest", "secdforest", "urban", "primother" and "secdother"

Value

magpie object in cellular resolution with different protection options in conservation priority areas

Author(s)

Patrick v. Jeetze

Examples

## Not run: 
calcOutput("ConservationPriority", aggregate = FALSE)

## End(Not run)

calcClimateRegionsIPCC

Description

calculates IPCC Climate Regions (IPCC2006 ch.4.3) based on t, ppt, pet from LPJml. elevation dimension not included for tropical montane class

Usage

calcClimateRegionsIPCC(
  landusetypes = "all",
  cellular = FALSE,
  yearly = FALSE,
  convert = TRUE
)

Arguments

landusetypes

all or only one

cellular

FALSE for country level, TRUE for cells

yearly

FALSE for normal magpie 5 year time spans, TRUE for yearly

convert

fills missing countries for country level aggregation with warm temperate moist (mostly small island nations)

Value

Country or cellular magpie object with fraction of each climate region by country or cell

Author(s)

David Chen

Examples

## Not run: 
calcOutput("ClimateRegionsIPCC")

## End(Not run)

calcConservationPriorities

Description

Function calculates land area in conservation priority areas that was unprotected in 2020 (WDPA).

Usage

calcConservationPriorities(
  consvBaseYear = "y1750",
  cells = "lpjcell",
  nclasses = "seven"
)

Arguments

consvBaseYear

Reference year for land conservation. Chosing "y1750", for instance, means that the reference land use is based on the year 1750 ('pre-industrial') so land use can be restored to the pre-industrial state in conservation priority areas. Any year available in the LUH2v2 data set can be chosen. Historic land use in the LUH2v2 data is based on the HYDE data base. The choice "y2020" provides a special case, in which reference land use is based on the 2020 ESA CCI LULC map, derived at a spatial resolution of 300 x 300 Meter.

cells

number of cells of landmask (select "magpiecell" for 59199 cells or "lpjcell" for 67420 cells)

nclasses

Options are either "seven" or "nine".

  • "seven" separates primary and secondary forest and includes "crop", "past", "forestry", "primforest", "secdforest", "urban" and "other"

  • "nine" adds the separation of pasture and rangelands, as well as a differentiation of primary and secondary non-forest vegetation and therefore returns "crop", "past", "range", "forestry", "primforest", "secdforest", "urban", "primother" and "secdother"

Value

magpie object in cellular resolution with different protection options in conservation priority areas

Author(s)

Patrick v. Jeetze

Examples

## Not run: 
calcOutput("ConservationPriority2", aggregate = FALSE)

## End(Not run)

calcCriticalConnectivityAreas

Description

Returns unprotected land area (Mha) within Critical Connectivit Areas as given in Brennan et al. (2022).

Usage

calcCriticalConnectivityAreas(
  maginput = TRUE,
  nclasses = "seven",
  cells = "lpjcell",
  mask = "KBA_GSN"
)

Arguments

maginput

Whether data should be transformed (based on LUH2v2 data) to match land use types used in MAgPIE.

nclasses

If magpie_input = TRUE. Options are either "seven" or "nine". Note that by default, the protected area is reported for urban land and forestry is zero.

  • "seven" separates primary and secondary forest and includes "crop", "past", "forestry", "primforest", "secdforest", "urban" and "other"

  • "nine" adds the separation of pasture and rangelands, as well as a differentiation of primary and secondary non-forest vegetation and therefore returns "crop", "past", "range", "forestry", "primforest", "secdforest", "urban", "primother" and "secdother"

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

mask

Whether Key Biodiversity Areas ("KBA") or Global Safety Net and Key Biodiversity Areas ("KBA_GSN") are masked. This switch is useful for complementary scenario building.

Value

List with a magpie object

Author(s)

Patrick v. Jeetze

See Also

readBrennan2022

Examples

## Not run: 
calcOutput("calcCriticalConnectivityAreas", aggregate = FALSE)

## End(Not run)

calcCroplandTreecover

Description

Returns area on cropland covered by trees (Mha).

Usage

calcCroplandTreecover(
  maginput = TRUE,
  cells = "magpiecell",
  countryLevel = FALSE
)

Arguments

maginput

Whether data should be corrected to align with cropland initialised in MAgPIE.

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

countryLevel

Whether output shall be at country level. Requires aggregate=FALSE in calcOutput.

Value

List with a magpie object

Author(s)

Patrick v. Jeetze

See Also

readCopernicus

Examples

## Not run: 
calcOutput("CroplandTreecover", aggregate = FALSE)

## End(Not run)

calcEATFruitvegRatio

Description

Calculates the share of fruits and vegetables in the calorie supply from the others MAgPIE commodity for the past. Information on the calorie supply from fruits and vegetables is relevant in the context of dietary recommendations, e.g. as proposed by the EAT-Lancet Commission on healthy diets from sustainable food systems.

Usage

calcEATFruitvegRatio(populationweight = "PopulationPast")

Arguments

populationweight

datasource of populationweight: FAO can be selected in order to better meet exact values. Normal datasource is PopulationPast

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl, Felicitas Beier

See Also

calcOutput, calcEATLancetTargets, calcFAOharmonized, calcEATLancetDiets

Examples

## Not run: 
calcOutput("EATFruitvegRatio")

## End(Not run)

calcEATLancetDiets

Description

Calculates daily per capita intake for MAgPIE food commodities that are consistent with diet scenarios developed by the EAT-Lancet Commission on healthy diets from sustainable food systems. The unit is kcal/day per capita or wm/day per capita. Mapping of intake from EAT Lancet to MAgPIE food commodities is done indivudually for the different available units.

Usage

calcEATLancetDiets(
  attributes = c("wm", "kcal"),
  calib = TRUE,
  FAOcountr = FALSE
)

Arguments

attributes

attributes of different food commodities (available: kcal and wm).

calib

if TRUE, total daily per capita intake for MAgPIE food commodities is calibrated to EAT Lancet total intake.

FAOcountr

if TRUE, estimates for countries not covered in FAOSTAT are set to Zero.

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

See Also

calcOutput, readEATLancet, convertEATLancet

Examples

## Not run: 
calcOutput("EATLancetDiets")

## End(Not run)

calcEATLancetTargets

Description

Calculates minimum and maximum targets for healthy food intake according to reference recommendations proposed by the EAT-Lancet Commission on healthy diets from sustainable food systems, specified for different MAgPIE commodities.

Usage

calcEATLancetTargets(attributes = "kcal/d")

Arguments

attributes

Attributes of food commodities (available: kcal/d and g/d)

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

See Also

calcOutput, readEATLancet, calcEATLancetDiets

Examples

## Not run: 
calcOutput("EATLancetTargets")

## End(Not run)

calcEATLancetWaste

Description

Calculates the ratio between food supply at household level and food intake for different MAgPIE commodities accounting for food-specific estimates of baseline intake of quantification of EAT Lancet diets by the EAT-Lancet comission, as well as for FAO food waste shares.

Usage

calcEATLancetWaste(out_type = "ratio")

Arguments

out_type

ratio: total food supply to total intake. ratio_detailed_calib: calibrated food-specific estimates. ratio_detailed: food-specific estimates based on FAO food waste shares calib: factor for calibrating estimates based on FAO waste shares to food supply

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

See Also

calcOutput, readEATLancet, calcEATLancetDiets, convertEATLancet

Examples

## Not run:  
calcOutput("EATLancetWaste")

## End(Not run)

calcEFch4AWMS

Description

emission factors for methane from animal waste management, depending on manure managed in confinements. The emission factors were calculated based on FAOSTAT estimates due to lack of all necessary parameters in the IPCC Guidelines

Usage

calcEFch4AWMS()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Benjamin Leon Bodirsky

See Also

calcEFch4Rice, calcOutput

Examples

## Not run: 
calcOutput("EFch4AWMS")

## End(Not run)

calcEFch4Rice

Description

emission factors for methane from flooded rice fields, depending on phyiscal area or area harvested. The emission factors were calculated based on FAOSTAT estimates due to lack of all necessary parameters in the IPCC Guidelines

Usage

calcEFch4Rice(physical = TRUE)

Arguments

physical

if true physical area, if false area harvested

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Benjamin Leon Bodirsky

See Also

calcEFch4AWMS, calcOutput

Examples

## Not run: 
calcOutput("EFch4Rice")

## End(Not run)

calcEmisNitrogenPast

Description

Emission factors from cropland soils.

Usage

calcEfNSoil(method = "IPCC_reg")

Arguments

method

If IPCC, using the ipcc emission factors as share of applied N inputs. If Nloss, as share of cropland budget surplus.

Value

List of magpie object with results on country level, weight on country level, unit and description.

Author(s)

Benjamin Leon Bodirsky

Examples

## Not run:  
calcOutput("EmisNitrogenPast")

## End(Not run)

calcEndUseTimber

Description

Calculates the demand of timber from historical FAO data (including intermediate products).

Usage

calcEndUseTimber()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Abhijeet Mishra

See Also

calcFAOmassbalance_pre

Examples

## Not run:  
calcOutput("EndUseTimber")

## End(Not run)

calcExoTcDummy

Description

Dummy file for regional exogenous tau path

Usage

calcExoTcDummy()

Value

Dummy file for regional exogenous tau path

Author(s)

Florian Humpenoeder

See Also

readSource, calcOutput


calcFAOLossesWaste

Description

Calculates the ratio between food supply at household level and food intake for different MAgPIE commodities based on estimated/assumed FAO waste shares for each commodity group (optionally also including food conversion factors into edible matter).

Usage

calcFAOLossesWaste(out_type = "waste")

Arguments

out_type

waste: food-specific ratios based on FAO food waste shares waste_edible: food-specific ratios based on FAO food waste shares including conversion into edible matter

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

See Also

calcOutput, readFAOLossesWaste, calcEATLancetWaste

Examples

## Not run:  
calcOutput("FAOLossesWaste")

## End(Not run)

calcForestAreaInitialization

Description

Calculates the management factor(s) needed to upscale the yield of forest plantations as compared to natural vegetation based on FAO data.

Usage

calcForestAreaInitialization()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Abhijeet Mishra

See Also

calcFAOmassbalance_pre

Examples

## Not run: 
calcOutput("ForestAreaInitialization")

## End(Not run)

calcForestDisturbances

Description

Calculates which share of forest land is lost due to forest disturbances (including insects, diseases, severe weather events and other causes)

Usage

calcForestDisturbances()

Value

MAgPIE object with FRA 2020 forest disturbance shares

Author(s)

Abhijeet Mishra

See Also

readFRA2020

Examples

## Not run:  
calcOutput("ForestDisturbances",aggregate=FALSE)

## End(Not run)

calcForestFireLoss

Description

Calculate how much loss of forest area happens due to fire disturbances based on FRA 2020 data

Usage

calcForestFireLoss()

Value

MAgPIE object with FRA 2020 forest fire area loss

Author(s)

Abhijeet Mishra

See Also

readFRA2020

Examples

## Not run:  
calcOutput("ForestFireLoss",aggregate=FALSE)

## End(Not run)

calcForestFireShare

Description

Calculates which share of forest land is lost due to forest fires

Usage

calcForestFireShare()

Value

MAgPIE object with FRA 2020 forest fire shares

Author(s)

Abhijeet Mishra

See Also

readFRA2020

Examples

## Not run:  
calcOutput("ForestFireShare",aggregate=FALSE)

## End(Not run)

calcForestLossShare

Description

Calculates which share of forest land is lost due to different drivers

Usage

calcForestLossShare()

Value

MAgPIE object with share of area lost in forests due to different drivers

Author(s)

Abhijeet Mishra

See Also

readForestLossDrivers

Examples

## Not run:  
calcOutput("ForestLossShare",aggregate=FALSE)

## End(Not run)

calcForestProductionInitialization

Description

Calculates the management factor(s) needed to upscale the yield of forest plantations as compared to natural vegetation based on FAO data.

Usage

calcForestProductionInitialization()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Abhijeet Mishra

See Also

calcFAOmassbalance_pre

Examples

## Not run: 
calcOutput("ForestProductionInitialization")

## End(Not run)

calcForestryProductionRatio

Description

Calculates the management factor(s) needed to upscale the yield of forest plantations as compared to natural vegetation based on FAO data.

Usage

calcForestryProductionRatio()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Abhijeet Mishra

See Also

calcFAOmassbalance_pre

Examples

## Not run:  
calcOutput("ForestryProductionRatio")

## End(Not run)

calcGDPdeflator

Description

calculates a iso-level deflator, this is needed to run food demand and livestock regressions consistently

Usage

calcGDPdeflator(yearFrom = 2017, yearTo = 2005, currency = "PPP")

Arguments

yearFrom

year in "y2005" format

yearTo

year in "y2005" format

currency

"PPP" or "MER"

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

David Chen


calcGHGPrices

Description

reads in GHG prices from past runs

Usage

calcGHGPrices(
  emissions = "pollutants",
  datasource = "REMMAG",
  rev = numeric_version("0.1")
)

Arguments

emissions

which type of emissions shall be returned. ghg just returns n2o, ch4 and co2, pollutants a longer list including also air pollutants

datasource

REMIND for prices from R2M4 coupled runs, REMMAG for old coupled runs, SSPResults for prices from the SSP scenarios from the IIASA database, SSP_and_REM for a combination of REMIND and SSPResults

rev

data revision the output will be produced for (numeric_version).

Value

list of magpie object with results on country level, weight on country level, unit and description.

Author(s)

David Chen, Benjamin Leon Bodirsky, David Klein

See Also

readSSPResults

Examples

## Not run: 
calcOutput("GHGPrices")

## End(Not run)

calcGlobalSafetyNet

Description

Returns unprotected land area (Mha) within the Global Safety Net (Dinerstein et al. 2020).

Usage

calcGlobalSafetyNet(maginput = TRUE, nclasses = "seven", cells = "lpjcell")

Arguments

maginput

Whether data should be transformed (based on LUH2v2 data) to match land use types used in MAgPIE.

nclasses

If magpie_input = TRUE. Options are either "seven" or "nine". Note that by default, the protected area is reported for urban land and forestry is zero.

  • "seven" separates primary and secondary forest and includes "crop", "past", "forestry", "primforest", "secdforest", "urban" and "other"

  • "nine" adds the separation of pasture and rangelands, as well as a differentiation of primary and secondary non-forest vegetation and therefore returns "crop", "past", "range", "forestry", "primforest", "secdforest", "urban", "primother" and "secdother"

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

Value

List with a magpie object

Author(s)

Patrick v. Jeetze

See Also

readDinerstein2020

Examples

## Not run: 
calcOutput("calcGlobalSafetyNet", aggregate = FALSE)

## End(Not run)

calcGTAPTrade

Description

calculate trade data from GTAP dataset

Usage

calcGTAPTrade(subtype = NULL, bilateral = FALSE)

Arguments

subtype

GTAP version and subtype, separated by "_" available versions are "GTAP7", "GTAP8", and "GTAP9" GTAP sheets relevant for trade are "VIWS": Trade - Bilateral Imports at World Prices "VIMS": Trade - Bilateral Imports at Market Prices "VXWD": Trade - Bilateral Exports at World Prices "VXMD": Trade - Bilateral Exports at Market Prices "VDFM": Intermediates - Firms' Domestic Purchases at Market Prices "VIFM": Intermediates - Firms' Imports at Market Prices "VFM": Endowments - Firms' Purchases at Market Prices "VOA": Payment received by producers (fram gtate value) "VOM": Value of output at dometic market prices

bilateral

whether bilateral trade data should be calculated

Value

Trade related data as an MAgPIE object

Author(s)

Xiaoxi Wang, David M Chen

Examples

## Not run: 
x <- calcGTAP("GTAP7_VXMD")

## End(Not run)

calcH08evapotranspiration

Description

Calc evapotranspiration data for SSP cenarios in mm/month

Usage

calcH08evapotranspiration(subtype = "H08:mri-esm2-0")

Arguments

subtype

Switch between different inputs

Value

magpie object in cellular resolution

Author(s)

Marcos Alves

Examples

## Not run: 
calcOutput("H08evapotranspiration", subtype = "H08:mri-esm2-0")

## End(Not run)

calcHalfEarth

Description

Function calculates land area in 'Half Earth' conservation priority area

Usage

calcHalfEarth(cells = "lpjcell", nclasses = "seven")

Arguments

cells

number of cells of landmask (select "magpiecell" for 59199 cells or "lpjcell" for 67420 cells)

nclasses

Options are either "seven" or "nine".

  • "seven" separates primary and secondary forest and includes "crop", "past", "forestry", "primforest", "secdforest", "urban" and "other"

  • "nine" adds the separation of pasture and rangelands, as well as a differentiation of primary and secondary non-forest vegetation and therefore returns "crop", "past", "range", "forestry", "primforest", "secdforest", "urban", "primother" and "secdother"

Value

magpie object in cellular resolution with different protection options in conservation priority areas

Author(s)

Patrick v. Jeetze, Felicitas Beier

Examples

## Not run: 
calcOutput("HalfEarth", aggregate = FALSE)

## End(Not run)

calcIr2RfYieldRatio

Description

Passes on the irrigated to rainfed yield ratio from AQUASTAT

Usage

calcIr2RfYieldRatio()

Value

MAgPIE object of yields

Author(s)

Kristine Karstens

See Also

[readAQUASTAT()], [convertAQUASTAT()]

Examples

## Not run: 
    calcOutput("Ir2RfYieldRatio")
  
## End(Not run)

calcIrrecoverableCarbonLand

Description

Returns unprotected land area (Mha) that covers 50 99

Usage

calcIrrecoverableCarbonLand(
  maginput = TRUE,
  nclasses = "seven",
  cells = "lpjcell"
)

Arguments

maginput

Whether data should be transformed (based on LUH2v2 data) to match land use types used in MAgPIE.

nclasses

If magpie_input = TRUE. Options are either "seven" or "nine". Note that by default, the protected area is reported for urban land and forestry is zero.

  • "seven" separates primary and secondary forest and includes "crop", "past", "forestry", "primforest", "secdforest", "urban" and "other"

  • "nine" adds the separation of pasture and rangelands, as well as a differentiation of primary and secondary non-forest vegetation and therefore returns "crop", "past", "range", "forestry", "primforest", "secdforest", "urban", "primother" and "secdother"

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

Value

List with a magpie object

Author(s)

Patrick v. Jeetze

See Also

readNoon2022

Examples

## Not run: 
calcOutput("calcIrrecoverableCarbonLand", aggregate = FALSE)

## End(Not run)

calcIrrigationInvCosts

Description

This function calculates irrigation investment costs for each country until the year 2050. Values linearly converge towards the value of Germany (1995) by 2050.

Usage

calcIrrigationInvCosts()

Value

MAgPIE object

Author(s)

Nele Steinmetz, Felicitas Beier

See Also

calcOutput, readWBirrigation, convertWBirrigation

Examples

## Not run: 
calcOutput("IrrigationInvCosts")

## End(Not run)

calcISIMIP3bYields

Description

reads and cleans up ISIMIP3b crop yield data

Usage

calcISIMIP3bYields(
  subtype = "yields:EPIC-IIASA:ukesm1-0-ll:ssp585:default:3b",
  smooth = TRUE,
  cells = "lpjcell"
)

Arguments

subtype

subtype of yield based on readISIMIPoutputs, for crop yields

smooth

smooth cells via spline

cells

magpie or lpjcell

Value

magpie object in cellular resolution

Author(s)

David Meng-Chuen Chen, Edna Molina Bacca

Examples

## Not run: 
calcOutput("ISIMIP3bYields", aggregate = FALSE)

## End(Not run)

calcKeyBiodiversityAreas

Description

Returns unprotected land area (Mha) within Key Biodiversity Areas.

Usage

calcKeyBiodiversityAreas(
  maginput = TRUE,
  unprotected = TRUE,
  nclasses = "seven",
  cells = "lpjcell"
)

Arguments

maginput

Whether data should be transformed (based on LUH2v2 data) to match land use types used in MAgPIE.

unprotected

if TRUE only KBA land that is currently unprotected is returned

nclasses

If magpie_input = TRUE. Options are either "seven" or "nine". Note that by default, the protected area is reported for urban land and forestry is zero.

  • "seven" separates primary and secondary forest and includes "crop", "past", "forestry", "primforest", "secdforest", "urban" and "other"

  • "nine" adds the separation of pasture and rangelands, as well as a differentiation of primary and secondary non-forest vegetation and therefore returns "crop", "past", "range", "forestry", "primforest", "secdforest", "urban", "primother" and "secdother"

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

Value

List with a magpie object

Author(s)

Patrick v. Jeetze

See Also

readKeyBiodiversityAreas

Examples

## Not run: 
calcOutput("calcKeyBiodiversityAreas", aggregate = FALSE)

## End(Not run)

calcLossShare

Description

Calculates share of domestic supply wasted

Usage

calcLossShare()

Value

List of magpie object with results and weight on country or cellular level, unit and description.

Author(s)

Benjamin Leon Bodirsky

Examples

## Not run: 
calcOutput("LossShare")

## End(Not run)

calcMulticroppingCells

Description

Returns grid cells and crops where multiple cropping takes place given the chosen scenario

Usage

calcMulticroppingCells(
  selectyears,
  lpjml,
  climatetype,
  scenario,
  sectoral = "kcr"
)

Arguments

selectyears

Years to be returned

lpjml

LPJmL version required for respective inputs: natveg or crop

climatetype

Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical"

scenario

"actual:total": currently multicropped areas calculated from total harvested areas and total physical areas per cell from readLandInG "actual:crop" (crop-specific), "actual:irrigation" (irrigation-specific), "actual:irrig_crop" (crop- and irrigation-specific) "total" "potential:endogenous": potentially multicropped areas given temperature and productivity limits "potential:exogenous": potentially multicropped areas given GAEZ suitability classification

sectoral

"kcr" MAgPIE crops, and "lpj" LPJmL crops

Value

magpie object in cellular resolution

Author(s)

Felicitas Beier

Examples

## Not run: 
calcOutput("MulticroppingCells", aggregate = FALSE)

## End(Not run)

calcMulticroppingIntensity

Description

Returns cropping intensity according to LandInG data given the chosen scenario

Usage

calcMulticroppingIntensity(scenario, selectyears, sectoral = "lpj")

Arguments

scenario

"total": currently multicropped areas calculated from total harvested areas and total physical areas per cell from readLandInG "crop" (crop-specific), "irrigation" (irrigation-specific), "irrig_crop" (crop- and irrigation-specific)

selectyears

Years to be returned

sectoral

"kcr" MAgPIE crop types, and "lpj" LPJmL crop types

Value

magpie object in cellular resolution

Author(s)

Felicitas Beier

Examples

## Not run: 
calcOutput("MulticroppingIntensity", aggregate = FALSE)

## End(Not run)

calcMulticroppingYieldIncrease

Description

Calculates yield increase achieved through multiple cropping (as factor of off season to main season crop yield) under irrigated and rainfed conditions respectively. Optionally: return which grid cells are potentially suitable for multiple cropping activities under rainfed and irrigated conditions. Calculation is based on grassland gross primary production (GPP) in the growing period of the respective crop and annual grass GPP.

Usage

calcMulticroppingYieldIncrease(
  selectyears,
  lpjml,
  climatetype,
  fallowFactor = 0.75
)

Arguments

selectyears

Years to be returned

lpjml

LPJmL version required for respective inputs as single string: "crop" version

climatetype

Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical"

fallowFactor

Factor determining yield reduction in off season due to fallow period between harvest of first (main) season and sowing of second (off) season

Value

magpie object in cellular resolution

Author(s)

Felicitas Beier

Examples

## Not run: 
calcOutput("MulticroppingYieldIncrease", aggregate = FALSE)

## End(Not run)

calcNINDiets

Description

Calculates daily per capita intake for MAgPIE food commodities that are consistent with diet scenarios developed by the NIN-Lancet Commission on healthy diets from sustainable food systems. The unit is kcal/day per capita or wm/day per capita. Mapping of intake from NIN Lancet to MAgPIE food commodities is done indivudually for the different available units.

Usage

calcNINDiets(attributes = c("wm", "kcal"), calib = TRUE, FAOcountr = FALSE)

Arguments

attributes

attributes of different food commodities (available: kcal and wm).

calib

if TRUE, total daily per capita intake for MAgPIE food commodities is calibrated to NIN Lancet total intake.

FAOcountr

if TRUE, estimates for countries not covered in FAOSTAT are set to Zero.

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

See Also

calcOutput, readNIN, convertNIN

Examples

## Not run: 
calcOutput("NINDiets")

## End(Not run)

calcNINFruitvegRatio

Description

Calculates the share of fruits and vegetables in the calorie supply from the others MAgPIE commodity for the past. Information on the calorie supply from fruits and vegetables is relevant in the context of dietary recommendations, e.g. as proposed by the NIN.

Usage

calcNINFruitvegRatio(populationweight = "PopulationPast")

Arguments

populationweight

datasource of populationweight: FAO can be selected in order to better meet exact values. Normal datasource is PopulationPast

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

See Also

calcOutput, calcNINTargets, calcFAOharmonized, calcNINDiets

Examples

## Not run: 
calcOutput("NINFruitvegRatio")

## End(Not run)

calcNINTargets

Description

Calculates minimum and maximum targets for healthy food intake according to reference recommendations proposed by the NIN on healthy diets from sustainable food systems, specified for different MAgPIE commodities.

Usage

calcNINTargets(attributes = "kcal/d")

Arguments

attributes

Attributes of food commodities (available: kcal/d and g/d)

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

See Also

calcOutput, readNIN, calcNINDiets

Examples

## Not run: 
calcOutput("NINTargets")

## End(Not run)

calcNINWaste

Description

Calculates the ratio between food supply at household level and food intake for different MAgPIE commodities accounting for food-specific estimates of baseline intake of quantification of NIN diets by the NIN comission, as well as for FAO food waste shares.

Usage

calcNINWaste(out_type = "ratio")

Arguments

out_type

ratio: total food supply to total intake. ratio_detailed_calib: calibrated food-specific estimates. ratio_detailed: food-specific estimates based on FAO food waste shares calib: factor for calibrating estimates based on FAO waste shares to food supply

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

See Also

calcOutput, readNIN, calcNINDiets, convertNIN

Examples

## Not run: 
calcOutput("NINWaste")

## End(Not run)

calcNitrogenFixationFreeliving

Description

calculates fixation rates from freeliving bacteria per area

Usage

calcNitrogenFixationFreeliving()

Value

List of magpie objects with results on global level, empty weight, unit and description.

Author(s)

Benjamin Leon Bodirsky

See Also

calcNitrogenFixationPast readHerridge

Examples

## Not run:  
calcOutput("NitrogenFixationFreeliving")

## End(Not run)

calcNitrogenFixationNdfa

Description

calculates the share of N in biomass derived from biological fixation

Usage

calcNitrogenFixationNdfa()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Benjamin Leon Bodirsky

See Also

calcNitrogenFixationPast

Examples

## Not run: 
calcOutput("calcNitrogenFixationNdfa")

## End(Not run)

calcNutritionAttributes

Description

Calculates nutrition attributes of food products, i.e. calorie and protein supply of a product dedicated to food use.

Usage

calcNutritionAttributes()

Value

magpie object

Author(s)

Benjamin Bodirsky

Examples

## Not run: 
calcOutput("NutritionAttributes", aggregate = FALSE)

## End(Not run)

calcOzoneYieldShock

Description

calculate Ozone yield shocks Data from the EAT-Lancet deepdive on Ozone shock effects on crop yields.

Usage

calcOzoneYieldShock(weighting = "totalCrop", marginal_land = "magpie")

Arguments

weighting

use of different weights (totalCrop (default), totalLUspecific, cropSpecific, crop+irrigSpecific, avlCropland, avlCropland+avlPasture)

marginal_land

Defines which share of marginal land should be included (see options below) and whether suitable land under irrigated conditions ("irrigated"), under rainfed conditions ("rainfed") or suitability under rainfed conditions including currently irrigated land (rainfed_and_irrigated) should be used. Options combined via ":" The different marginal land options are:

  • "all_marginal": All marginal land (suitability index between 0-0.33) is included as suitable

  • "q33_marginal": The bottom tertile (suitability index below 0.13) of the marginal land area is excluded.

  • "q50_marginal": The bottom half (suitability index below 0.18) of the marginal land area is excluded.

  • "q66_marginal": The first and second tertile (suitability index below 0.23) of the marginal land area are excluded.

  • "q75_marginal": The first, second and third quartiles (suitability index below 0.25) of the marginal land are are excluded

  • "no_marginal": Areas with a suitability index of 0.33 and lower are excluded.

  • "magpie": Returns "all_marginal:rainfed_and_irrigated", "q33_marginal:rainfed_and_irrigated" and "no_marginal:rainfed_and_irrigated" in a magclass object to be used as magpie input.

Value

magpie object in cellular resolution

Author(s)

Jake Tommey

Examples

## Not run: 
calcOutput("OzoneYieldShock")

## End(Not run)

calcPastureYield

Description

Provides pasture yields defined as ratio of grazed biomass to grazed area

Usage

calcPastureYield(range_pastr = FALSE)

Arguments

range_pastr

Boolean value indicating if the grass yields should be split between rangelands and pastures.

Value

Pasture yields and corresponding weights as a list of two MAgPIE objects

Author(s)

Isabelle Weindl, Marcos Alves

See Also

calcOutput, calcFAOmassbalance, readSource

Examples

## Not run: 
calcOutput("PastureYield")

## End(Not run)

calcPhotosynthesisTemperature

Description

This function calculates crop-specific temperature limits for the multicropping mask based on the photosynthesis optimum and the LPJmL parameters temp_co2 and temp_photos

Usage

calcPhotosynthesisTemperature(threshold = 0.8)

Arguments

threshold

Photosynthesis efficiency threshold (between 0 and 1)

Value

magpie object

Author(s)

Felicitas Beier, Jens Heinke

Examples

## Not run: 
calcOutput("PhotosynthesisTemperature", aggregate = FALSE)

## End(Not run)

calcPlantationContribution

Description

Calculates the interpolated contribution share of plantations to roundwood demand

Usage

calcPlantationContribution()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Abhijeet Mishra

See Also

calcFAOmassbalance_pre

Examples

## Not run: 
calcOutput("PlantationContribution")

## End(Not run)

calcPlantedForest

Description

Calculates the share of plantations in planted forest

Usage

calcPlantedForest()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Abhijeet Mishra

See Also

calcFAOmassbalance_pre

Examples

## Not run: 
calcOutput("PlantedForest")

## End(Not run)

calcProtectArea

Description

Function extracts conservation protected area

Usage

calcProtectArea(cells = "lpjcell", bhifl = TRUE)

Arguments

cells

number of cells of landmask (select "magpiecell" for 59199 cells or "lpjcell" for 67420 cells)

bhifl

should be TRUE (including BH_IFL scenario) for cellular preprocessing revisions > 4.65

Value

magpie object in cellular resolution with different protection scenarios

Author(s)

Felicitas Beier, David Chen

Examples

## Not run: 
calcOutput("ProtectArea", aggregate = FALSE)

## End(Not run)

calcProtectedAreaBaseline

Description

Returns protected land area (Mha) in terms of cropland, pasture, forest and other land between 1995 and 2020.

Usage

calcProtectedAreaBaseline(
  magpie_input = TRUE,
  nclasses = "seven",
  cells = "lpjcell"
)

Arguments

magpie_input

Whether data should be transformed (based on LUH2v2 data) to match land use types used in MAgPIE.

nclasses

If magpie_input = TRUE. Options are either "seven" or "nine". Note that by default, the protected area is reported for urban land and forestry is zero.

  • "seven" separates primary and secondary forest and includes "crop", "past", "forestry", "primforest", "secdforest", "urban" and "other"

  • "nine" adds the separation of pasture and rangelands, as well as a differentiation of primary and secondary non-forest vegetation and therefore returns "crop", "past", "range", "forestry", "primforest", "secdforest", "urban", "primother" and "secdother"

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

Value

List with a magpie object

Author(s)

Patrick v. Jeetze

See Also

calcProtectArea

Examples

## Not run: 
calcOutput("ProtectedAreaBaseline", aggregate = FALSE)

## End(Not run)

calcPumpingCosts

Description

provides costs of pumping irrigation water

Usage

calcPumpingCosts()

Value

A magpie object at iso level for all years with information on pumping costs

Author(s)

Vartika Singh #' @seealso readSource, calcOutput

Examples

## Not run: 
calcOutput("PumpingCosts")

## End(Not run)

calcPYieldSlope

Description

provides slope for calculating pasture intensification

Usage

calcPYieldSlope()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

See Also

readPYieldCoeff

Examples

## Not run:  
calcOutput("PYieldSlope")

## End(Not run)

calcSeedShare

Description

Calculates Seed share (seed demand per production)

Usage

calcSeedShare()

Value

List of magpie object with results and weight on country or cellular level, unit and description.

Author(s)

Benjamin Leon Bodirsky

Examples

## Not run: 
calcOutput("SeedShare")

## End(Not run)

calcSNVTargetCropland

Description

Returns cropland area (Mha) that requires relocation in response of maintaining 20

Usage

calcSNVTargetCropland(maginput = TRUE, cells = "magpiecell")

Arguments

maginput

Whether data should be corrected to align with cropland initialised in MAgPIE.

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

Value

List with a magpie object

Author(s)

Patrick v. Jeetze

See Also

readCopernicus

Examples

## Not run: 
calcOutput("SNVTargetCropland", aggregate = FALSE)

## End(Not run)

calcSoilStockChangeFactors

Description

calculates and merges information on stock change factors

Usage

calcSoilStockChangeFactors()

Value

MAgPIE object of yields

Author(s)

Kristine Karstens

See Also

[readIPCC()]

Examples

## Not run: 
calcOutput("SoilStockChangeFactors")

## End(Not run)

calcSOMexogenous

Description

Uses an exogenous trajectory of Soil organic matter loss nitrogen release

Usage

calcSOMexogenous()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Benjamin Leon Bodirsky

See Also

calcOutput

Examples

## Not run: 
calcOutput("SOMexogenous")

## End(Not run)

calcTauHistorical

Description

Calculates historical trends in agricultural land use intensity Tau based on FAO yield trends.

Usage

calcTauHistorical()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Isabelle Weindl

Examples

## Not run:  
calcOutput("TauHistorical")

## End(Not run)

calcTimberDemandExt

Description

Calculates the demand of timber from FAO data (including intermediate products).

Usage

calcTimberDemandExt()

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

Abhijeet Mishra

See Also

calcFAOmassbalance_pre

Examples

## Not run:  
calcOutput("TimberDemandExt")

## End(Not run)

Calculate imports/exports

Description

Calculate the difference between production and domestic_supply. Numbers till 2010 are derived from FAO. Numbers after 2010 are hold constant

Usage

calcTradeBalance()

Value

regional trade balances

Author(s)

Jan Philipp Dietrich

See Also

calcOutput, calcFAOmassbalance

Examples

## Not run:  
a <- calcTradeBalance()

## End(Not run)

Calculate global under-/overproduction

Description

Calculate the difference between the global production and the global domestic_supply. The difference is the result of imports not equaling exports, and because storage is not considered. The calculated DomesticBalanceflow assures that production matches domestic_supply. The goods come from nowhere and go to nowhere. The numbers are usually decreased linearly and become zero in 2050.

Usage

calcTradeBalanceflow()

Value

global Domestic Balanceflows as MAgPIE object

Author(s)

Ulrich Kreidenweis, Xiaoxi Wang

See Also

calcOutput, calcFAOmassbalance

Examples

## Not run:  
a <- calcTradeBalanceflow()

## End(Not run)

Calculate export shares

Description

Provides export shares of countries compared to total export. This is based on export values from FAOSTAT. Function calculates this based on average values of the specified years.

Usage

calcTradeExportShr()

Value

Export shares

Author(s)

Ulrich Kreidenweis, Xiaoxi Wang

See Also

calcOutput, calcFAOmassbalance

Examples

## Not run: 
a <- calcTradeExportShr()

## End(Not run)

calcTradeMargin

Description

calculate total value of trade margins from GTAP dataset

Usage

calcTradeMargin(
  gtap_version = "GTAP9",
  bilateral = FALSE,
  producer_price = "FAOini"
)

Arguments

gtap_version

type of GTAP data version

  • GTAP7

  • GTAP8

  • GTAP9

bilateral

whether bilateral trade margin should be calculated

producer_price

which producer price should be used

Value

Trade margins as an MAgPIE object

Author(s)

Xiaoxi Wang

Examples

## Not run: 
x <- calcTradeMargin("GTAP7")

## End(Not run)

Calculate food/material self sufficiencies

Description

Calculates regional self sufficiences from FAO data as production/domestic_supply.

Usage

calcTradeSelfSuff()

Value

Self sufficiences

Author(s)

Ulrich Kreidenweis

See Also

calcOutput, calcFAOmassbalance

Examples

## Not run: 
a <- calcTradeSelfSuff()

## End(Not run)

calcTradeTariff

Description

calculate tarde tariffs from GTAP dataset

Usage

calcTradeTariff(
  gtap_version = "GTAP9",
  type_tariff = "total",
  bilateral = FALSE
)

Arguments

gtap_version

type of GTAP data version

  • GTAP7

  • GTAP8

type_tariff

which producer price should be used

  • type_tariff

bilateral

calculates whether tariffs should be bilateral

Value

Trade tariffs as an MAgPIE object

Author(s)

Xiaoxi Wang

Examples

## Not run: 
    x <- calcTradeTariff("GTAP7")
    
## End(Not run)

calcUrbanLandFuture

Description

Urban land in Mha on 0.5deg grid

Usage

calcUrbanLandFuture(
  timestep = "5year",
  subtype = "LUH2v2",
  cells = "lpjcell",
  cellular = TRUE
)

Arguments

timestep

5year or yearly

subtype

where the data source comes from ("LUH2v2" or "Gao")

cells

magpiecell (59199 cells) or lpjcell (67420 cells)

cellular

TRUE for results on 0.5 degree grid.

Value

List of magpie objects with results on 0.5deg grid level, weights NULL, unit and description.

Author(s)

David Chen, Patrick v. Jeetze, Felicitas Beier


calcValueProduction

Description

calculates production value based on production and prices, only works for FAO dataset currently

Usage

calcValueProduction(datasource = "FAO", cellular = TRUE)

Arguments

datasource

Options of the source of the price data: only FAO has country level data

cellular

cellular or iso country values

Value

List of magpie objects with results on country level, weight on country level, unit and description.

Author(s)

David Chen

See Also

calcProduction, calcPriceAgriculture

Examples

## Not run: 
calcOutput("ValueProduction")

## End(Not run)

calcYields

Description

This function extracts yields from LPJmL and transforms them to MAgPIE crops calibrating proxy crops to FAO yields. Optionally, ISIMIP yields can be returned.

Usage

calcYields(
  source = c(lpjml = "ggcmi_phase3_nchecks_9ca735cb", isimip = NULL),
  climatetype = "GSWP3-W5E5:historical",
  cells = "lpjcell",
  selectyears = seq(1965, 2100, by = 5),
  weighting = "totalCrop",
  multicropping = FALSE,
  indiaYields = FALSE,
  scaleFactor = 0.3,
  marginal_land = "magpie"
)

Arguments

source

Defines LPJmL version for main crop inputs and isimip replacement. For isimip choose crop model/gcm/rcp/co2 combination formatted like this: "yields:EPIC-IIASA:ukesm1-0-ll:ssp585:default:3b"

climatetype

Switch between different climate scenarios

cells

if cellular is TRUE: "magpiecell" for 59199 cells or "lpjcell" for 67420 cells

selectyears

Years to be returned

weighting

use of different weights (totalCrop (default), totalLUspecific, cropSpecific, crop+irrigSpecific, avlCropland, avlCropland+avlPasture)

multicropping

Multicropping activated (TRUE) or not (FALSE) and Multiple Cropping Suitability mask selected (mask can be: "none": no mask applied (only for development purposes) "actual:total": currently multicropped areas calculated from total harvested areas and total physical areas per cell from readLandInG "actual:crop" (crop-specific), "actual:irrigation" (irrigation-specific), "actual:irrig_crop" (crop- and irrigation-specific), "potential:endogenous": potentially multicropped areas given temperature and productivity limits "potential:exogenous": potentially multicropped areas given GAEZ suitability classification) (e.g. TRUE:actual:total; TRUE:none; FALSE)

indiaYields

if TRUE returns scaled yields for rainfed crops in India

scaleFactor

integer value by which indiaYields will be scaled

marginal_land

Defines which share of marginal land should be included (see options below) and whether suitable land under irrigated conditions ("irrigated"), under rainfed conditions ("rainfed") or suitability under rainfed conditions including currently irrigated land (rainfed_and_irrigated) should be used. Options combined via ":" The different marginal land options are:

  • "all_marginal": All marginal land (suitability index between 0-0.33) is included as suitable

  • "q33_marginal": The bottom tertile (suitability index below 0.13) of the marginal land area is excluded.

  • "q50_marginal": The bottom half (suitability index below 0.18) of the marginal land area is excluded.

  • "q66_marginal": The first and second tertile (suitability index below 0.23) of the marginal land area are excluded.

  • "q75_marginal": The first, second and third quartiles (suitability index below 0.25) of the marginal land are are excluded

  • "no_marginal": Areas with a suitability index of 0.33 and lower are excluded.

  • "magpie": Returns "all_marginal:rainfed_and_irrigated", "q33_marginal:rainfed_and_irrigated" and "no_marginal:rainfed_and_irrigated" in a magclass object to be used as magpie input.

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens, Felicitas Beier

Examples

## Not run: 
calcOutput("Yields", aggregate = FALSE)

## End(Not run)

calcYieldsCalibrated

Description

This functions calibrates extracted yields from LPJmL to FAO country level yields

Usage

calcYieldsCalibrated(
  source = c(lpjml = "ggcmi_phase3_nchecks_9ca735cb", isimip = NULL),
  climatetype = "GSWP3-W5E5:historical",
  refYear = "y1995",
  selectyears = seq(1965, 2100, by = 5),
  cells = "lpjcell",
  multicropping = FALSE,
  refYields = FALSE,
  areaSource = "FAO",
  marginal_land = "magpie"
)

Arguments

source

Defines LPJmL version for main crop inputs and isimip replacement. For isimip choose crop model/gcm/rcp/co2 combination formatted like this: "yields:EPIC-IIASA:ukesm1-0-ll:ssp585:default:3b"

climatetype

switch between different climate scenarios

refYear

reference year for calibration

selectyears

Years to be returned (for memory reasons)

cells

number of cells "magpiecell" for 59199 cells or "lpjcell" for 67420 cells

multicropping

Multicropping activated (TRUE) or not (FALSE) and Multiple Cropping Suitability mask selected (mask can be: "none": no mask applied (only for development purposes) "actual:total": currently multicropped areas calculated from total harvested areas and total physical areas per cell from readLanduseLandInG "actual:crop" (crop-specific), "actual:irrigation" (irrigation-specific), "actual:irrig_crop" (crop- and irrigation-specific), "potential:endogenous": potentially multicropped areas given temperature and productivity limits "potential:exogenous": potentially multicropped areas given GAEZ suitability classification) (e.g. TRUE:actual:total; TRUE:none; FALSE)

refYields

assumption for baseline yields with respect to multiple cropping (e.g., FALSE: single-cropped LPJmL yields used as baseline to calculate country-level yields, "TRUE:actual:irrig_crop": multicropped yields where LandInG reports current multiple cropping (irrigation- and crop-specific))

areaSource

data source for croparea used in calculation: FAO or LandInG Note: when calibrating multicropped yields, LandInG croparea should be used

marginal_land

Defines which share of marginal land should be included (see options below) and whether suitable land under irrigated conditions ("irrigated"), under rainfed conditions ("rainfed") or suitability under rainfed conditions including currently irrigated land (rainfed_and_irrigated) should be used. Options combined via ":" The different marginal land options are:

  • "all_marginal": All marginal land (suitability index between 0-0.33) is included as suitable

  • "q33_marginal": The bottom tertile (suitability index below 0.13) of the marginal land area is excluded.

  • "q50_marginal": The bottom half (suitability index below 0.18) of the marginal land area is excluded.

  • "q66_marginal": The first and second tertile (suitability index below 0.23) of the marginal land area are excluded.

  • "q75_marginal": The first, second and third quartiles (suitability index below 0.25) of the marginal land are are excluded

  • "no_marginal": Areas with a suitability index of 0.33 and lower are excluded.

  • "magpie": Returns "all_marginal:rainfed_and_irrigated", "q33_marginal:rainfed_and_irrigated" and "no_marginal:rainfed_and_irrigated" in a magclass object to be used as magpie input.

Value

magpie object in cellular resolution from reference year onwards

Author(s)

Kristine Karstens, Felicitas Beier

Examples

## Not run: 
calcOutput("YieldsCalibrated", aggregate = FALSE)

## End(Not run)

calcYieldsLPJmL

Description

This function extracts yields from LPJmL for all years

Usage

calcYieldsLPJmL(
  lpjml = "ggcmi_phase3_nchecks_bft_e511ac58",
  climatetype = "GSWP3-W5E5:historical",
  cells = "lpjcell"
)

Arguments

lpjml

Defines LPJmL version for main crop inputs

climatetype

Switch between different climate scenarios

cells

if cellular is TRUE: "magpiecell" for 59199 cells or "lpjcell" for 67420 cells

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens, Felicitas Beier

Examples

## Not run: 
calcOutput("YieldsLPJmL", aggregate = FALSE)

## End(Not run)

calcYieldsWeight

Description

This function calculates the crop area weightings to use for yields.

Usage

calcYieldsWeight(
  cells = "lpjcell",
  weighting = "totalCrop",
  marginal_land = "magpie"
)

Arguments

cells

if cellular is TRUE: "magpiecell" for 59199 cells or "lpjcell" for 67420 cells

weighting

use of different weights (totalCrop (default), totalLUspecific, cropSpecific, crop+irrigSpecific, avlCropland, avlCropland+avlPasture)

marginal_land

Defines which share of marginal land should be included (see options below) and whether suitable land under irrigated conditions ("irrigated"), under rainfed conditions ("rainfed") or suitability under rainfed conditions including currently irrigated land (rainfed_and_irrigated) should be used. Options combined via ":" The different marginal land options are:

  • "all_marginal": All marginal land (suitability index between 0-0.33) is included as suitable

  • "q33_marginal": The bottom tertile (suitability index below 0.13) of the marginal land area is excluded.

  • "q50_marginal": The bottom half (suitability index below 0.18) of the marginal land area is excluded.

  • "q66_marginal": The first and second tertile (suitability index below 0.23) of the marginal land area are excluded.

  • "q75_marginal": The first, second and third quartiles (suitability index below 0.25) of the marginal land are are excluded

  • "no_marginal": Areas with a suitability index of 0.33 and lower are excluded.

  • "magpie": Returns "all_marginal:rainfed_and_irrigated", "q33_marginal:rainfed_and_irrigated" and "no_marginal:rainfed_and_irrigated" in a magclass object to be used as magpie input.

Value

magpie object in cellular resolution

Author(s)

Kristine Karstens, Felicitas Beier

Examples

## Not run: 
calcOutput("YieldsWeight", yields, aggregate = FALSE)

## End(Not run)

convertAQUASTAT

Description

Convert data based on AQUASTAT database (http://www.fao.org/nr/water/aquastat/data/query/index.html?lang=en)

Usage

convertAQUASTAT(x, subtype)

Arguments

x

MAgPIE object containing AQUASTAT data on country level

subtype
  • ConsAgri: 4454|Conservation agriculture area (1000 ha) 4454_conservation_agriculture_area_in_1000_ha.csv

  • ConsAgriShare: 4455|Commoditiy Balance LivestockConservation agriculture area as 4455_conservation_agriculture_area_as_share_of_ arable_land_areas.csv)

  • rf2irRatio: Ratio between rainfed and irrigated yields ( Ratio_between_rainfed_and_irrigated_yields.csv

Value

magpie objects with results on contury level

Author(s)

Kristine Karstens

Examples

## Not run: 
readSource("AQUASTAT", subtype = "ConsAgri", convert = TRUE)

## End(Not run)

convertEATLancet

Description

Convert data from the EAT Lancet Commission to be used in MAgPIE

Usage

convertEATLancet(x, subtype)

Arguments

x

MAgPIE object containing EAT Lancet data at mixed country-region resolution

subtype

Type of EAT Lancet data that should be read. Available types are:

  • cons_data: Consumption analysis ("EAT_Lancet_cons_data.csv")

  • recommend: Food recommendations ("EAT_Lancet_recommendations.csv")

Value

EAT Lancet data as MAgPIE object at ISO country level

Author(s)

Isabelle Weindl, Felicitas Beier

See Also

readSource

Examples

## Not run: 
a <- readSource(type = "EATLancet", subtype = "cons_data")

## End(Not run)

Convert data on food losses and waste from FAO for several commodity groups

Description

Convert data on food losses and waste on ISO country level.

Usage

convertFAOLossesWaste(x, subtype)

Arguments

x

MAgPIE object containing data on food losses and waste at mixed country-region resolution

subtype

Steps of the food supply chain where food losses and waste occur. Available types are:

  • Consumption: consumption level

Value

Data on food losses and waste as MAgPIE object at ISO country level

Author(s)

Isabelle Weindl

See Also

readSource

Examples

## Not run: 
a <- readSource(type="FAOLossesWaste",subtype="Consumption")

## End(Not run)

Converts Forestry Production Ratio Update dd-Jmm-jjjj - Please add comment if changes made here (Abhi)

Description

Converts Forestry Production Ratio Update dd-Jmm-jjjj - Please add comment if changes made here (Abhi)

Usage

convertForestryProductionRatio(x)

Arguments

x

MAgPIE object to be converted

Value

A MAgPIE object containing country disaggregated data

Author(s)

Abhijeet Mishra

Examples

## Not run: 
a <- readSource("ForestryProductionRatio", convert = FALSE)

## End(Not run)

Convert FRA2015Doc data

Description

Convert FRA2015Doc data

Usage

convertFRA2015Doc(x, subtype)

Arguments

x

MAgPIE object containing original values coming from read function

subtype

The data table type, e.g.: forest_area

Value

Data as MAgPIE object

Author(s)

Abhijeet Mishra

See Also

readFRA2015Doc, readSource,

Examples

## Not run: 
a <- readSource("FRA2015Doc", "forest_area", convert = TRUE)

## End(Not run)

convertGTAP

Description

Converts GTAP data to fit to the common country list. Weighting is done by using the Imports and Exports from FAO. NOW NEW WEIGHTING

Usage

convertGTAP(x, subtype)

Arguments

x

MAgPIE object contains GTAP data

subtype

The GTAP subtype: VIWS, VIMS VXWD, VXMD, VOA, VOM

Value

Converted GTAP Data

Author(s)

Xiaoxi Wang

Examples

## Not run: 
x <- ReadSource("GTAP", "GTAP7_VIMS")

## End(Not run)

Convert data from the NIN Lancet Comission

Description

Convert data from the NIN Lancet Comission to ISO country level.

Usage

convertNIN(x, subtype)

Arguments

x

MAgPIE object containing NIN Lancet data at mixed country-region resolution

subtype

Type of NIN Lancet data that should be read. Available types are:

  • cons_data: Consumption analysis ("NIN_Lancet_cons_data.csv")

  • recommend: Food recommendations ("NIN_recommendations.csv")

Value

NIN Lancet data as MAgPIE object at ISO country level

Author(s)

Isabelle Weindl

See Also

readSource

Examples

## Not run: 
a <- readSource(type="NIN",subtype="cons_data")

## End(Not run)

Convert PYieldCoeff data to ISO country level.

Description

Convert PYieldCoeff data to ISO country level.

Usage

convertPYieldCoeff(x)

Arguments

x

MAgPIE object containing data for fixed regional resolution

Value

data as MAgPIE object disaggregated to country level

Author(s)

Isabelle Weindl

Examples

## Not run:  a <- convertPYieldCoeff(x)

Convert Sathaye Forest data

Description

Convert Sathaye Forest data on ISO country level.

Usage

convertSathayeForest(x)

Arguments

x

MAgPIE object containing Sathaye Forest data region resolution

Value

Sathaye Forest data as MAgPIE object aggregated/disaggregated to country level

Author(s)

Lavinia Baumstark

Examples

## Not run:  a <- convertSathayeForest(x)

Converts timber share Update dd-Jmm-jjjj - Please add comment if changes made here (Abhi)

Description

Converts timber share Update dd-Jmm-jjjj - Please add comment if changes made here (Abhi)

Usage

convertTimberShare(x)

Arguments

x

MAgPIE object to be converted

Value

A MAgPIE object containing country disaggregated data

Author(s)

Abhijeet Mishra

Examples

## Not run: 
a <- readSource("TimberShare", convert = FALSE)

## End(Not run)

convertWBirrigation

Description

Convert WorldBank-irrigation data on ISO country level.

Usage

convertWBirrigation(x)

Arguments

x

MAgPIE object containing WBirrigation data country-region resolution

Value

WBirrigation data as MAgPIE object aggregated to country level

Author(s)

Lavinia Baumstark

Examples

## Not run:  a <- convertWBirrigation(x)

correctBrennan2022

Description

correct data for Critical Connectivity Areas (Brennan et al. 2022).

Usage

correctBrennan2022(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

Patrick v. Jeetze

See Also

readBrennan2022

Examples

## Not run: 
readSource("Brennan2022", convert = "onlycorrect")

## End(Not run)

correctCopernicus

Description

correct Copernicus data.

Usage

correctCopernicus(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

Patrick v. Jeetze

See Also

readCopernicus

Examples

## Not run: 
readSource("Copernicus", convert = "onlycorrect")

## End(Not run)

correctDinerstein2020

Description

correct data for the Global Safety Net conservation priority areas (Dinerstein et al. 2020).

Usage

correctDinerstein2020(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

Patrick v. Jeetze

See Also

readDinerstein2020

Examples

## Not run: 
readSource("Dinerstein2020", convert = "onlycorrect")

## End(Not run)

correctGLW3

Description

Read GLW3 file

Usage

correctGLW3(x)

Arguments

x

magpie object provided by the read function

Value

Magpie objects with results on cellular level, weight, unit and description.

Author(s)

Marcos Alves

See Also

readGLW3

Examples

## Not run: 
  readSource("GLW3", subtype = "DA", convert="onlycorrect")

## End(Not run)

correctHalfEarth

Description

correct HalfEarth data

Usage

correctHalfEarth(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

Felicitas Beier

See Also

readHalfEarth

Examples

## Not run: 
readSource("HalfEarth", convert = "onlycorrect")

## End(Not run)

correctKeyBiodiversityAreas

Description

correct data for Key Biodiversity Areas.

Usage

correctKeyBiodiversityAreas(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

Patrick v. Jeetze

See Also

readKeyBiodiversityAreas

Examples

## Not run: 
readSource("KeyBiodiversityAreas", convert = "onlycorrect")

## End(Not run)

correctLUH2UrbanFuture

Description

correct LUH2v2 urban future data

Usage

correctLUH2UrbanFuture(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

Patrick v. Jeetze

See Also

readLUH2UrbanFuture

Examples

## Not run: 
readSource("LUH2UrbanFuture", convert = "onlycorrect")

## End(Not run)

correctNoon2022

Description

correct irrecoverable carbon data from Noon et al. (2022).

Usage

correctNoon2022(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

Patrick v. Jeetze

See Also

readNoon2022

Examples

## Not run: 
readSource("Noon2022", convert = "onlycorrect")

## End(Not run)

correctOzoneYieldShock

Description

correct Ozone Yield shock data

Usage

correctOzoneYieldShock(x)

Arguments

x

magpie object provided by the read function

Value

x corrected magpie object containing all ISO countries

Author(s)

Jake Tommey

Examples

## Not run: 
readSource("OzoneShock", convert="onlycorrect")

## End(Not run)

correctProtectArea

Description

Read calibrated protection area file

Usage

correctProtectArea(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

David Chen, Felicitas Beier

See Also

readProtectArea

Examples

## Not run: 
  readSource("ProtectArea", convert="onlycorrect")

## End(Not run)

correctProtectedAreaBaseline

Description

correct protected area baseline data

Usage

correctProtectedAreaBaseline(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

Patrick v. Jeetze

See Also

readProtectedAreaBaseline

Examples

## Not run: 
readSource("ProtectedAreaBaseline", convert = "onlycorrect")

## End(Not run)

correctS4Nproject_input

Description

corrects IMAGE inputs of total bioenergy (1st gen, 2nd gen and residues) demand and co2 prices

Usage

correctS4Nproject_input(x)

Arguments

x

magpie object

Value

magpie object at country-level resolution

Author(s)

Felicitas Beier

See Also

readSource

Examples

## Not run:  a <- readSource("S4Nproject_input", aggregate=FALSE)

correctZabel2014

Description

correct Zabel crop suitability data

Usage

correctZabel2014(x)

Arguments

x

magpie object provided by the read function

Value

magpie object on cellular level

Author(s)

Patrick v. Jeetze

See Also

readZabel2014

Examples

## Not run: 
readSource("Zabel2014", convert = "onlycorrect")

## End(Not run)

downloadH08evapotranspiration

Description

Download water models evapotranspiration data

Usage

downloadH08vapotranspiration(subtype = "H08:mri-esm2-0:historical")

Arguments

subtype

Switch between different inputs

Author(s)

Marcos Alves

Examples

## Not run: readSource("H08evapotranspiration",  convert="onlycorrect")

downloadSPAM

Description

download SPAM 2010 v2.0 Global Data

Usage

downloadSPAM(subtype)

Arguments

subtype

Type of SPAM data to be downloaded. Available are "harvestedArea" and "physicalArea".

Author(s)

David Hoetten


fullMAgPIE

Description

Function that produces the regional data set for running the MAgPIE model.

Usage

fullMAGPIE(rev = numeric_version("0.1"), dev = "")

Arguments

rev

data revision which should be used as input (numeric_version).

dev

For developing purposes, apply changes as per dev flag

Author(s)

Jan Philipp Dietrich, Benjamin Leon Bodirsky, Florian Humpenoeder, Edna J. Molina Bacca

See Also

readSource, getCalculations, calcOutput

Examples

## Not run: 
retrieveData("MAGPIE", rev = numeric_version("12"),
             mainfolder = "pathtowhereallfilesarestored")

## End(Not run)

readAQUASTAT

Description

Read in data based on AQUASTAT database (https://www.fao.org/aquastat/statistics/query/index.html)

Usage

readAQUASTAT(subtype = "ConsAgri")

Arguments

subtype
  • ConsAgri: 4454|Conservation agriculture area (1000 ha) 4454_conservation_agriculture_area_in_1000_ha.csv

  • ConsAgriShare: 4455|Commoditiy Balance LivestockConservation agriculture area as 4455_conservation_agriculture_area_as_share_of_ arable_land_areas.csv)

  • rf2irRatio: Ratio between rainfed and irrigated yields ( Ratio_between_rainfed_and_irrigated_yields.csv

Value

magpie objects with results on contury level

Author(s)

Kristine Karstens

Examples

## Not run: 
readSource("AQUASTAT", subtype = "ConsAgri", convert = TRUE)

## End(Not run)

readBrennan2022

Description

Reads Critical Connectivity Areas as defined in Brennan, A., Naidoo, R., Greenstreet, L., Mehrabi, Z., Ramankutty, N., & Kremen, C. (2022). Functional connectivity of the world’s protected areas. Science, 376(6597), 1101–1104. https://doi.org/10.1126/science.abl8974 Protected areas (2020) and Key Biodiversity Areas/Global Safet Net areas were masked at a spatial resolution of 10 arc seconds before aggregating the data to 0.5°.

Usage

readBrennan2022(subtype = "KBA_GSN_masked")

Arguments

subtype

Defines whether land area covered by Critical Connectivity Areas has been masked by other conservation priority data. If Key Biodiversity Areas have only been masked the option is "KBA_masked". With "KBA_GSN_masked", land area covered by the Global Safety Net (distinct species assemblages cluster) is also masked. This is useful for complementary scenario building.

Value

Returns magpie objects with the land area covered by Critical Connectivity areas that is NOT already covered by Key Biodiversity Areas or the Global Safety Net (distinct species assemblages cluster) and was unprotected in 2020.

Author(s)

Patrick v. Jeetze

Examples

## Not run: 
readSource("Brennan2022", convert = "onlycorrect")

## End(Not run)

readCopernicus

Description

Reads either information on the area on cropland covered by trees or information the cropland area that requires relocation in response of increasing semi-natural vegetation in farmed landscapes. The data was derived from high resolution land cover information (LC100) from the Copernicus Global Land Service. (https://zenodo.org/records/3939050)

Usage

readCopernicus(subtype = "CroplandTreecover")

Arguments

subtype

For cropland area covered by trees choose "CroplandTreecover". For cropland area requiring relocation in response to increasing SNV choose "SNVTargetCropland".

Value

Returns magpie objects with cropland area covered by trees or cropland area requiring relocation in order to increase SNV in farmed landscapes.

Author(s)

Patrick v. Jeetze

Examples

## Not run: 
readSource("Copernicus", subtype = "CroplandTreecover", convert = "onlycorrect")

## End(Not run)

readDinerstein2020

Description

Reads Global Safety Net data set published by Dinerstein, E., Joshi, A. R., Vynne, C., Lee, A. T. L., Pharand-Deschênes, F., França, M., Fernando, S., Birch, T., Burkart, K., Asner, G. P., & Olson, D. (2020). A “Global Safety Net” to reverse biodiversity loss and stabilize Earth’s climate. Science Advances, 6(36), eabb2824. https://doi.org/10.1126/sciadv.abb2824

Protected areas and Key Biodiversity Areas were masked at a spatial resolution of 10 arc seconds before aggregating the data to 0.5°.

Usage

readDinerstein2020(subtype = "GSN:distinct_species_assemblages")

Arguments

subtype

Defines which cluster (see Dinerstein et al. 2020) of the Global Safety Net is returned.The different subtypes for land are: "GSN:distinct_species_assemblages", "GSN:rare_phenomena", "GSN:areas_of_intactness", "GSN:climate_stabilisation_tier1" and "GSN:climate_stabilisation_tier2".

Value

Returns magpie objects with the land area covered by the Global Safety Net that is NOT already covered by Key Biodiversity Areas and was unprotected in 2020.

Author(s)

Patrick v. Jeetze

Examples

## Not run: 
readSource("Dinerstein2020", convert = "onlycorrect")

## End(Not run)

readEATLancet

Description

Read in data from the EAT-Lancet Commission

Read in data from: Food in the Anthropocene: the EAT-Lancet Commission on healthy diets from sustainable food systems, Lancet 2019 https://doi.org/10.1016/S0140-6736(18)31788-4

Usage

readEATLancet(subtype)

Arguments

subtype

Type of EAT-Lancet data that should be read. Available types are:

  • cons_data: Consumption analysis ("EAT_Lancet_cons_data.csv")

  • recommend: Food recommendations ("EAT_Lancet_recommendations.csv")

Value

magpie object containing EAT-Lancet Comission data

Author(s)

Isabelle Weindl, Jan Philipp Dietrich, Felicitas Beier

See Also

readSource

Examples

## Not run: 
a <- readSource(type = "EATLancet", subtype = "cons_data")

## End(Not run)

Read in data on food losses and waste from FAO for several commodity groups

Description

Data from Annex 4 of the following FAO study: FAO. 2011. Global food losses and food waste – Extent, causes and prevention. Rome (http://www.fao.org/3/a-i2697e.pdf)

Usage

readFAOLossesWaste(subtype)

Arguments

subtype

Steps of the food supply chain where food losses and waste occur. Available types are:

  • Consumption: consumption level

Value

magpie object of food waste percentages for several commodity groups

Author(s)

Isabelle Weindl

See Also

readSource

Examples

## Not run:  a <- readSource(type="FAOLossesWaste",subtype="Consumption")

Read ForestLossDrivers

Description

Read-in an Forest loss data (range 2001-2015 but only single annual number her) (Source:DOI: 10.1126/science.aau3445 Table 1).

Usage

readForestLossDrivers()

Value

magpie object of the Curtis et al., 2018 Data

Author(s)

Abhijeet Mishra

See Also

readSource

Examples

## Not run: 
a <- readSource("ForestLossDrivers")

## End(Not run)

Read Forestry Production Ratio

Description

Read Forestry Production Ratio

Usage

readForestryProductionRatio()

Value

magpie object of the proportion of production coming from plantations

Author(s)

Abhijeet Mishra

See Also

readSource

Examples

## Not run:  a <- readSource("ForestryProductionRatio")

Read FRA2015Doc

Description

Read-in an FRA data from 2015 (forest resource assessment).

Usage

readFRA2015Doc(subtype)

Arguments

subtype

data subtype.

Value

magpie object of the FRA 2015 data

Author(s)

Abhijeet Mishra

See Also

readSource

Examples

## Not run:  a <- readSource("FRA2015Doc","forest_area")

readGLW3

Description

Read the gridded livestock of the world 3 dataset.

Usage

readGLW3(subtype = "Da")

Arguments

subtype

Subtype of file to be opened (either Da or Aw)

Value

Magpie objects

Author(s)

Marcos Alves

Examples

## Not run: 
readSource("GLW3", subtype = "DA", convert = "onlycorrect")

## End(Not run)

readGLW4

Description

reads in Gridded Livestock of the World v4, downloaded from: https://dataverse.harvard.edu/dataverse/glw_4

Usage

readGLW4(subtype = "Da_Ct")

Arguments

subtype

Weighting method and livestock type:

  • Da: Dasymetric weighting informed by Random Forest

  • Aw: Areal weighting (distributed uniformly in each census)

    • Ch: Chicken

    • Ct: Cattle

    • Pg: Pigs

    • Sh: Sheep

    • Gt: Goats

    • Ho: Horse

    • Dk: ducks

    • Bf: Buffaloes

Value

A gridded magpie object with gridded livstock of the world

Author(s)

David M Chen


readGTAP

Description

Read BaseData and BaseView in GTAP database that has been downlodaded from the GTAP wewbsite.

Usage

readGTAP(subtype = NULL)

Arguments

subtype

Type of GTAP data that should be read. So far available are:

  • GTAP7:

    • GTAP7_VIWS: Trade - Bilateral Imports at World Prices

    • GTAP7_VIMS: Trade - Bilateral Imports at Market Prices

    • GTAP7_VXWD: Trade - Bilateral Exports at World Prices

    • GTAP7_VXMD: Trade - Bilateral Exports at Market Prices

    • GTAP7_VDFM: Intermediates - Firms' Domestic Purchases at Market Prices

    • GTAP7_VIFM: Intermediates - Firms' Imports at Market Prices

    • GTAP7_VFM: Endowments - Firms' Purchases at Market Prices

    • GTAP7_VOA: Payment received by producers (fram gtate value)

    • GTAP7_VOM: Value of output at dometic market prices

  • GTAP8:

    • GTAP8_VIWS: Trade - Bilateral Imports at World Prices

    • GTAP8_VIMS: Trade - Bilateral Imports at Market Prices

    • GTAP8_VXWD: Trade - Bilateral Exports at World Prices

    • GTAP8_VXMD: Trade - Bilateral Exports at Market Prices

    • GTAP8_VDFM: Intermediates - Firms' Domestic Purchases at Market Prices

    • GTAP8_VIFM: Intermediates - Firms' Imports at Market Prices

    • GTAP8_VFM: Endowments - Firms' Purchases at Market Prices

    • GTAP8_VOA: Payment received by producers (fram gtate value)

    • GTAP8_VOM: Value of output at dometic market prices

Value

GTAP data as a MAgPie-Object

Author(s)

Stephen Wirth, Xiaoxi Wang

Examples

## Not run: 
a <- readSource("GTAP7", "VIWS")

## End(Not run)

readH08evapotranspiration

Description

Read evapotranspiration data

Usage

readH08evapotranspiration(subtype = "H08:mri-esm2-0:historical")

Arguments

subtype

Switch between different inputs

Value

MAgPIE objects with results on cellular level.

Author(s)

Marcos Alves

See Also

readH08evapotranspiration

Examples

## Not run: 
readSource("H08evapotranspiration", subtype, convert = "onlycorrect")

## End(Not run)

readHalfEarth

Description

Read in Half Earth data set containing conservation area for biodiversity protection based on the Half-Earth approach

Usage

readHalfEarth(subtype = "GLOBIO4")

Arguments

subtype

Data source to be read from

Value

MAgPIE object containing biodiveristy protection area at cellular level

Author(s)

Felicitas Beier

Examples

## Not run: 
readSource("HalfEarth", subtype = "GLOBIO4", convert = "onlycorrect")

## End(Not run)

readKeyBiodiversityAreas

Description

Reads land area covered by for Key Biodiversity Areas (https://www.keybiodiversityareas.org/) that was unprotected in 2020. Protected areas were masked at a spatial resolution of 10 arc seconds before aggregating the data to 0.5°.

Usage

readKeyBiodiversityAreas(subtype = "unprotected")

Arguments

subtype

"unprotected" or "all"

Value

Returns magpie objects with the area covered by unprotected Key Biodiversity Areas per grid cell

Author(s)

Patrick v. Jeetze

Examples

## Not run: 
readSource("KeyBiodiversityAreas", convert = "onlycorrect")

## End(Not run)

readLUH2UrbanFuture

Description

read in gridded future urban land use datasets, from LUH2 Hurtt data

Usage

readLUH2UrbanFuture()

Value

magpie object of gridded future urban land use in Mha, 2015-2100

Author(s)

David Chen, Patrick v. Jeetze

See Also

readSource


Read in data from the NIN recommendations

Description

Read in data from the NIN recommendations

Usage

readNIN(subtype)

Arguments

subtype

Type of NIN data that should be read. Available types are:

  • cons_data: Consumption analysis ("NIN_cons_data.csv")

Value

magpie object containing NIN data

Author(s)

Isabelle Weindl, Jan Philipp Dietrich

See Also

readSource

Examples

## Not run:  a <- readSource(type="NIN",subtype="cons_data")

readNoon2022

Description

Reads irrecoverble carbon data set published by Noon, M. L., Goldstein, A., Ledezma, J. C., Roehrdanz, P. R., Cook-Patton, S. C., Spawn-Lee, S. A., Wright, T. M., Gonzalez-Roglich, M., Hole, D. G., Rockström, J., & Turner, W. R. (2022). Mapping the irrecoverable carbon in Earth’s ecosystems. Nature Sustainability, 5(1), Article 1. https://doi.org/10.1038/s41893-021-00803-6 Protected areas were masked at a spatial resolution of 10 arc seconds before aggregating the data to 0.5°.

Usage

readNoon2022(subtype = "land:IrrC_50pc")

Arguments

subtype

Defines whether carbon data or land area and related subtypes should be returned (see options below). Carbon or land subtypes need to be specified via ":" The different subtypes for land are: "IrrC_30pc", "IrrC_40pc", "IrrC_50pc", "IrrC_60pc", "IrrC_70pc", "IrrC_80pc", "IrrC_90pc", "IrrC_100pc" which corresponds to the land area that was unprotected in 2020 and is covered by the respective percentile of all irrecoverable carbon. IrrC_50pc e.g. returns all unprotected land that contains the top 50\,% of global irrecoverable carbon.

Value

Returns magpie objects with the area of unprotected irrecoverable carbon land per grid cell

Author(s)

Patrick v. Jeetze

Examples

## Not run: 
readSource("Noon2022", convert = "onlycorrect")

## End(Not run)

readOzoneYieldShock

Description

read Ozone Yield Shock Data from the EAT-Lancet deepdive on Ozone shock effects on crop yields.

Usage

readOzoneYieldShock()

Value

MAgPIE object with country level yield shock data for year 2050.

Author(s)

Jake Tommey

Examples

## Not run: 
readSource("OzoneShock", convert = "onlycorrect")

## End(Not run)

readProtectArea

Description

Read conservation priority areas (in Mha)

Usage

readProtectArea()

Value

List of magpie objects with results on cellular level

Author(s)

David Chen, Felicitas Beier

Examples

## Not run: 
readSource("ProtectArea", convert = "onlycorrect")

## End(Not run)

readProtectedAreaBaseline

Description

Reads spatial land cover information within protected areas. Land cover information for protected areas has been extracted from ESA CCI land use/land cover data (https://www.esa-landcover-cci.org/) and data from the WDPA data base (https://www.protectedplanet.net).

Usage

readProtectedAreaBaseline()

Value

Returns magpie object with the protected area separated for each land type (cropland, pasture, forest, other land) per grid cell from 1995 to 2020.

Author(s)

Patrick v. Jeetze

Examples

## Not run: 
readSource("ProtectedAreaBaseline", convert = "onlycorrect")

## End(Not run)

Read in coefficients for calculating pasture intensification

Description

Read in csv file containing coefficients of linear regression for the calculation of future pasture intensification dependent on animal numbers

Usage

readPYieldCoeff()

Value

MAgPIE object

Author(s)

Isabelle Weindl

See Also

readSource

Examples

## Not run: 
a <- readSource("PYieldCoeff")

## End(Not run)

readREMIND

Description

Reads in a reporting mif file from REMIND

Usage

readREMIND(subtype)

Arguments

subtype

A string composed of three items: unit, revision and indicator. Unit can be either "intensive" or "extensive", revision is the input data revision, and indicator is the name of thre REMIND indicator

Value

MAgPIE object with regional aggregation of REMIND H12

Author(s)

David Klein

See Also

readSource

Examples

## Not run: 
readSource("REMIND",aggregate=FALSE)

## End(Not run)

readS4Nproject_input

Description

reads in total bioenergy (1st gen, 2nd gen and residues) demand and co2 prices from IMAGE model for Sim4Nexus project

Usage

readS4Nproject_input(subtype = "co2prices")

Arguments

subtype

IMAGE input to be read in: co2prices or bioenergy

Value

magpie object at country-level resolution

Author(s)

Felicitas Beier

See Also

readSource

Examples

## Not run: 
a <- readSource("S4Nproject_input", convert = "onlycorrect", aggregate = FALSE)

## End(Not run)

Read Sathaye Forest

Description

Read-in an Sathaye Forest data .csv file as magclass object

Usage

readSathayeForest()

Value

magpie object of the Sathaye Forest data

Author(s)

Lavinia Baumstark, Felicitas Beier, Abhijeet Mishra

See Also

readSource

Examples

## Not run:  a <- readSource("SathayeForest")

readStrefler2021

Description

Reads in a reporting mif file from REMIND

Usage

readStrefler2021(subtype)

Arguments

subtype

Either "intensive" or "extensive"

Value

MAgPIE object with regional aggregation of REMIND H12

Author(s)

Florian Humpenöder

See Also

readSource

Examples

## Not run:  
readSource("Strefler2021",aggregate=FALSE)

## End(Not run)

Read Share of timber predicted to come from plantations based on FAO Brown study

Description

Read Share of timber predicted to come from plantations based on FAO Brown study

Usage

readTimberShare(subtype = "abare")

Arguments

subtype

Data subtype available is abare and brown

Value

magpie object of the proportion of production coming from plantations

Author(s)

Abhijeet Mishra

See Also

readSource

Examples

## Not run: 
a <- readSource("TimberShare")

## End(Not run)

readUrbanLandGao

Description

Read gridded urban land, from Gao O'Neill and Jones SEDAC dataset, https://sedac.ciesin.columbia.edu/data/set/ssp-1-8th-urban-land-extent-projection-base-year-ssp-2000-2100 #nolint

Usage

readUrbanLandGao()

Value

magpie object of 2000-2100 urban land in Mha, in 10 year intervals

Author(s)

David M Chen, Felicitas Beier


readWBirrigation

Description

reads in World bank irrigation data: WBirrigation data .csv file as magclass object from Jones, William I. 1995. "World Bank and Irrigation." Washington, D.C.: World Bank. Bonsch et al. (2015) "Environmental Flow Provision: Implications for Agricultural Water and Land-Use at the Global Scale": Table A1 - Investment costs for expanding irrigation infrastructure in US$ per hectare. Based on: World Bank Irrigation Investment Cost Data. William I. Jones(1991) "The World Bank and Irrigation" (World Bank Operations Evaluation Study)

Usage

readWBirrigation()

Value

magpie object of the WBirrigation data

Author(s)

Lavinia Baumstark

See Also

readSource

Examples

## Not run:  a <- readSource(type="WBirrigation")

readWHObmi

Description

Reads in data on body mass index (BMI) recommendations from WHO http://www.who.int/childgrowth/standards/bmi_for_age/en/ http://www.who.int/growthref/who2007_bmi_for_age/en/

Usage

readWHObmi()

Value

magpie object

See Also

readNCDrisc


readZabel2014

Description

Reads crop suitability data published in Zabel, F., Putzenlechner, B., & Mauser, W. (2014). Global Agricultural Land Resources – A High Resolution Suitability Evaluation and Its Perspectives until 2100 under Climate Change Conditions. PLOS ONE, 9(9), e107522. https://doi.org/10.1371/journal.pone.0107522 and extracts the share of suitable cropland per grid cell, depending on different suitability thresholds.

Usage

readZabel2014(subtype = "all_marginal:rainfed_and_irrigated")

Arguments

subtype

Defines which share of marginal land should be included (see options below) and whether suitable land under irrigated conditions ("irrigated"), under rainfed conditions ("rainfed") or suitability under rainfed conditions including currently irrigated land (rainfed_and_irrigated) should be used. Options combined via ":" The different marginal land options are:

  • "all_marginal": All marginal land (suitability index between 0-0.33) is included as suitable

  • "q33_marginal": The bottom tertile (suitability index below 0.13) of the marginal land () area is excluded.

  • "q50_marginal": The bottom half (suitability index below 0.18) of the marginal land area is excluded.

  • "q66_marginal": The first and second tertile (suitability index below 0.23) of the marginal land area are excluded.

  • "q75_marginal": The first, second and third quartiles (suitability index below 0.25) of the marginal land are are excluded

  • "no_marginal": Areas with a suitability index of 0.33 and lower are excluded.

Value

Returns magpie objects with the share of suitable cropland per grid cell

Author(s)

Patrick v. Jeetze, Felicitas Beier

Examples

## Not run: 
readSource("Zabel2014", subtype = "all_marginal:rainfed_and_irrigated", convert = "onlycorrect")

## End(Not run)

Tool: spatial_header

Description

Given a regionmapping (mapping between ISO countries and regions) the function calculates a 0.5 degree spatial header for 0.5 degree magclass objects

Usage

spatial_header(mapping)

Arguments

mapping

Either a path to a mapping or an already read-in mapping as data.frame.

Value

A vector with 59199 elements

Author(s)

Jan Philipp Dietrich

See Also

regionscode

Examples

## Not run: 
spatial_header("regionmappingMAgPIE.csv")

## End(Not run)

toolPatternScaling

Description

This tool scales time series based on the approach used in the magpiemodel yield module.

Usage

toolPatternScaling(
  scen,
  scenMean,
  refMean,
  refYear = "y2010",
  variation = "yieldCalibMAG"
)

Arguments

scen

time series of the scenario

scenMean

mean of scenario time series

refMean

mean of reference time series

refYear

Reference year

variation

'yieldCalibMAG' (default); to be implemented: 'jensPaper'

Value

scaled data in magclass format

Author(s)

Kristine Karstens