Title: | madrat based MAgPIE water Input Data Library |
---|---|
Description: | Provides functions for MAgPIE cellular input data generation and stand-alone water calculations. |
Authors: | Felicitas Beier [aut, cre], Jens Heinke [aut], Kristine Karstens [aut], Benjamin Leon Bodirsky [aut], Jan Philipp Dietrich [aut] |
Maintainer: | Felicitas Beier <[email protected]> |
License: | LGPL-3 | file LICENSE |
Version: | 1.13.7 |
Built: | 2024-11-21 05:53:02 UTC |
Source: | https://github.com/pik-piam/mrwater |
Provides functions for MAgPIE cellular input data generation and stand-alone water calculations.
Maintainer: Felicitas Beier [email protected]
Authors:
Jens Heinke [email protected]
Kristine Karstens [email protected]
Benjamin Leon Bodirsky [email protected]
Jan Philipp Dietrich [email protected]
Useful links:
This function calculates actual irrigation water requirements per cell given the chosen irrigation system
calcActualIrrigWatRequirements( selectyears, iniyear, lpjml, climatetype, irrigationsystem, multicropping )
calcActualIrrigWatRequirements( selectyears, iniyear, lpjml, climatetype, irrigationsystem, multicropping )
selectyears |
Years to be returned |
iniyear |
Initialization year (for weight by cropland) |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
irrigationsystem |
Irrigation system used: system share as in initialization year, or drip, surface, sprinkler for full irrigation by selected system |
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) "total" "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) |
magpie object in cellular resolution
Felicitas Beier
calcIrrigationSystem
, calcIrrigWatRequirements
## Not run: calcOutput("ActualIrrigWatRequirements", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("ActualIrrigWatRequirements", aggregate = FALSE) ## End(Not run)
This function calculates land that is potentially available for irrigated agriculture
calcAreaPotIrrig(selectyears, comagyear, iniyear, landScen)
calcAreaPotIrrig(selectyears, comagyear, iniyear, landScen)
selectyears |
Years to be returned |
comagyear |
If NULL: total potential croparea is used; if !NULL: already irrigated area is subtracted; year specified here is the year of the initialization used for cropland area initialization in calcIrrigatedArea (e.g. NULL, 1995, 2010) |
iniyear |
Initialization year for current cropland area |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("AreaPotIrrig", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("AreaPotIrrig", aggregate = FALSE) ## End(Not run)
This function calculates water availability for MAgPIE retrieved from LPJmL
calcAvlWater( lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb"), climatetype = "GSWP3-W5E5:historical", cells = "lpjcell", stage = "harmonized2020", seasonality = "grper" )
calcAvlWater( lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb"), climatetype = "GSWP3-W5E5:historical", cells = "lpjcell", stage = "harmonized2020", seasonality = "grper" )
lpjml |
Defines LPJmL version for crop/grass and natveg specific inputs |
climatetype |
Switch between different climate scenarios |
cells |
Number of cells to be returned (select "magpiecell" for 59199 cells or "lpjcell" for 67420 cells) |
stage |
Degree of processing: raw, smoothed, harmonized, harmonized2020 |
seasonality |
grper (default): water available in growing period per year; total: total water available throughout the year; monthly: monthly water availability (for further processing, e.g. in calcEnvmtlFlow) |
magpie object in cellular resolution
Felicitas Beier, Kristine Karstens, Abhijeet Mishra
## Not run: calcOutput("AvlWater", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("AvlWater", aggregate = FALSE) ## End(Not run)
This function calculates consumptive blue water use for the whole year based on LPJmL blue water consumption of crops and the difference between rainfed and irrigated evapotranspiration of grass
calcBlueWaterConsumption( selectyears, lpjml, climatetype, fallowFactor = 0.75, areaMask, output )
calcBlueWaterConsumption( selectyears, lpjml, climatetype, fallowFactor = 0.75, areaMask, output )
selectyears |
Years to be returned |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
climatetype |
Climate model (e.g., "MRI-ESM2-0:ssp370") or historical baseline (e.g., "GSWP3-W5E5:historical") |
fallowFactor |
Factor determining water requirement reduction in off season due to fallow period between harvest of first (main) season and sowing of second (off) season |
areaMask |
Multicropping area mask to be used "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) "total" "potential:endogenous": potentially multicropped areas given temperature and productivity limits "potential:exogenous": potentially multicropped areas given GAEZ suitability classification |
output |
output to be returned by the function: combination of crop type ("crops" or "grass") and season ("main" (LPJmL growing period), "year" (entire year)), separated by ":" ("crops:main", "crops:year", "grass:main", "grass:year") |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("BlueWaterConsumption", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("BlueWaterConsumption", aggregate = FALSE) ## End(Not run)
This returns croparea as reported by FAO and LUH for the initialization year and
calcCropareaAdjusted(iniyear, dataset = "LandInG", sectoral = "kcr")
calcCropareaAdjusted(iniyear, dataset = "LandInG", sectoral = "kcr")
iniyear |
initialization year |
dataset |
LUH or LandInG Note: once migration to Toolbox data is complete, this function can be replaced with calcCropareaLandInG |
sectoral |
crops to be reported: "kcr" for MAgPIE items, and "lpj" for LPJmL items |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("CropareaAdjusted", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("CropareaAdjusted", aggregate = FALSE) ## End(Not run)
This function calculates croparea that is potentially available for irrigated agriculture per crop given a chosen cropmix
calcCropAreaPotIrrig(selectyears, comagyear, iniyear, cropmix, landScen)
calcCropAreaPotIrrig(selectyears, comagyear, iniyear, cropmix, landScen)
selectyears |
Years to be returned |
comagyear |
If NULL: total potential croparea is used; if !NULL: already irrigated area is subtracted; year specified here is the year of the initialization used for cropland area initialization in calcIrrigatedArea (e.g. NULL, 1995, 2010) |
iniyear |
Initialization year for current cropland area |
cropmix |
Cropmix for which croparea share is calculated (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops as vector) |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("CropAreaPotIrrig", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("CropAreaPotIrrig", aggregate = FALSE) ## End(Not run)
calculates irrigated and rainfed production quantities or revenue on given crop areas under selected management scenario. It can return quantities in terms of the sum of crop biomass produced in tDM or production revenue in terms of monetary revenue achieved in USD
calcCropProductionRevenue( outputtype, scenario, management, area, lpjml, climatetype, selectyears, iniyear, efrMethod, accessibilityrule, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, cropmix, comAg, transDist, fossilGW )
calcCropProductionRevenue( outputtype, scenario, management, area, lpjml, climatetype, selectyears, iniyear, efrMethod, accessibilityrule, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, cropmix, comAg, transDist, fossilGW )
outputtype |
"biomass": returns the production quantity in terms of crop biomass (in tDM) "revenue": returns the revenue in terms of price x quantity of crop production (in USD) |
scenario |
EFP and non-agricultural water use scenario separated with a "." (e.g. "on.ssp2") |
management |
management in terms of irrigation and multiple cropping practices consisting of multiple cropping scenario ("single", actMC", "potMC") and ("potential", "counterfactual") separated by ":" (e.g. "single:potential", "actMC:counterfactual") Multiple cropping practices: "single": single cropping assumed everywhere "actMC": multiple cropping as reported by LandInG data "potMC": multiple cropping practiced everywhere where it is possible Irrigation assumption: "potential": irrigation practiced where possible according to irrigation potentials or practiced according to area information (see param 'area') "counterfactual": production and revenue for counterfactual case that irrigated areas were managed under rainfed conditions |
area |
area scenario "actual": current cropland and currently irrigated areas or potentially irrigated areas following land availability defined in landScen scenario: consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years for which irrigatable area is calculated |
iniyear |
Initialization year for initial croparea |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
accessibilityrule |
Strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx). (e.g. Q75: 0.25, Q50: 0.5) |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
allocationrule |
Rule to be applied for river basin discharge allocation across cells of river basin ("optimization", "upstreamfirst", "equality") |
gainthreshold |
Threshold of yield improvement potential required (in USD per hectare) |
irrigationsystem |
Irrigation system used ("surface", "sprinkler", "drip", "initialization") |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, "hist_rainf" for historical rainfed cropmix, or selection of proxycrops) |
comAg |
If TRUE: currently already irrigated areas in initialization year are reserved for irrigation, if FALSE: no irrigation areas reserved (irrigation potential) |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("CropProductionRevenue", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("CropProductionRevenue", aggregate = FALSE) ## End(Not run)
This function calculates the yield gains per crop through irrigation or multiple cropping relative to rainfed-single system production (including negatives)
calcCropYieldGain( lpjml, climatetype, yieldgaintype, priceAgg, iniyear, selectyears, yieldcalib, multicropping )
calcCropYieldGain( lpjml, climatetype, yieldgaintype, priceAgg, iniyear, selectyears, yieldcalib, multicropping )
lpjml |
LPJmL version used for yields |
climatetype |
Climate scenarios or historical baseline "GSWP3-W5E5:historical" |
yieldgaintype |
Crop yield gain through multiple cropping under rainfed conditions "multicropping_rf", multiple cropping under irrigated conditions "multicropping_ir", irrigation under single cropping conditions "irrigation_singlecropping" irrigation and multiple cropping "irrigation_multicropping" |
priceAgg |
Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices, or "CONST" for same price for all crops |
iniyear |
initialization year for food price and cropmix area |
selectyears |
Years to be returned by the function |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
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) "total" "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) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("CropYieldGain", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("CropYieldGain", aggregate = FALSE) ## End(Not run)
This function calculates the discharge that is inaccessible to humans based on the variability of monthly flows and natural discharge.
calcDischargeInaccessible(lpjml, selectyears, climatetype, accessibilityrule)
calcDischargeInaccessible(lpjml, selectyears, climatetype, accessibilityrule)
lpjml |
LPJmL version required for respective inputs: natveg or crop |
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
accessibilityrule |
Method used: Quantile method (Q) or Coefficient of Variation (CV) combined with scalar value defining the strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx, e.g. Q75: 0.25, Q50: 0.5) or base value for exponential curve separated by : (CV:2) |
magpie object in cellular resolution representing discharge that is inaccessible to humans
Felicitas Beier, Jens Heinke
## Not run: calcOutput("DischargeInaccessible", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("DischargeInaccessible", aggregate = FALSE) ## End(Not run)
This function calculates water that is inaccessible to humans but not part of EFRs. Reason: Inacessible discharge is highly variable discharge that can also serve as high flow requirements (HFR) for EFRs. This has to be accounted in the Discharge Allocation Algorithm for the determination of potential irrigation.
calcDischargeInaccessibleAdd( selectyears = selectyears, lpjml = lpjml, climatetype = climatetype, accessibilityrule = accessibilityrule, efrMethod = efrMethod )
calcDischargeInaccessibleAdd( selectyears = selectyears, lpjml = lpjml, climatetype = climatetype, accessibilityrule = accessibilityrule, efrMethod = efrMethod )
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
accessibilityrule |
Method used: Quantile method (Q) or Coefficient of Variation (CV) combined with scalar value defining the strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx, e.g. Q75: 0.25, Q50: 0.5) or base value for exponential curve separated by : (CV:2) |
efrMethod |
EFR method used including selected strictness of EFRs (Smakhtin:good, VMF:fair) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("DischargeInaccessibleAdd", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("DischargeInaccessibleAdd", aggregate = FALSE) ## End(Not run)
calculates potentially irrigated area for different gainthresholds subject to land and water constraints
calcEconOfIrrig( scenario, output, gtrange, selectyears, iniyear, lpjml, climatetype, efrMethod, accessibilityrule, rankmethod, yieldcalib, allocationrule, irrigationsystem, landScen, cropmix, transDist, fossilGW, comAg, multicropping )
calcEconOfIrrig( scenario, output, gtrange, selectyears, iniyear, lpjml, climatetype, efrMethod, accessibilityrule, rankmethod, yieldcalib, allocationrule, irrigationsystem, landScen, cropmix, transDist, fossilGW, comAg, multicropping )
scenario |
non-agricultural water use scenario |
output |
output to be displayed: irrigated area "IrrigArea" or available water volume "wat_ag_ww" "wat_ag_wc" |
gtrange |
range of x-axis (gainthreshold) to be depicted on the curve |
selectyears |
years for which irrigatable area is calculated |
iniyear |
initialization year |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
accessibilityrule |
Method used: Quantile method (Q) or Coefficient of Variation (CV) combined with scalar value defining the strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx, e.g. Q75: 0.25, Q50: 0.5) or base value for exponential curve separated by : (CV:2) |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
allocationrule |
Rule to be applied for river basin discharge allocation across cells of river basin ("optimization", "upstreamfirst", "equality") |
irrigationsystem |
Irrigation system used ("surface", "sprinkler", "drip", "initialization") |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
comAg |
if TRUE: the currently already irrigated areas in initialization year are reserved for irrigation, if FALSE: no irrigation areas reserved (irrigation potential) |
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) "total" "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) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcEconOfIrrig(aggregate = FALSE) ## End(Not run)
## Not run: calcEconOfIrrig(aggregate = FALSE) ## End(Not run)
This function calculates grid cell specific violation of environmental flow requirements
calcEFRviolations( lpjml, selectyears, climatetype, efrMethod, transDist, accessibilityrule, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, iniyear, landScen, cropmix, comAg, multicropping, scenario, cellular = TRUE )
calcEFRviolations( lpjml, selectyears, climatetype, efrMethod, transDist, accessibilityrule, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, iniyear, landScen, cropmix, comAg, multicropping, scenario, cellular = TRUE )
lpjml |
LPJmL version used |
selectyears |
Years for which irrigatable area is calculated |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand |
accessibilityrule |
Strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx). (e.g. Q75: 0.25, Q50: 0.5) |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
allocationrule |
Rule to be applied for river basin discharge allocation across cells of river basin ("optimization", "upstreamfirst", "equality") |
gainthreshold |
Threshold of yield improvement potential required (in USD per hectare) |
irrigationsystem |
Irrigation system used ("surface", "sprinkler", "drip", "initialization") |
iniyear |
Initialization year of irrigation system |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
comAg |
If TRUE: currently already irrigated areas in initialization year are reserved for irrigation, if FALSE: no irrigation areas reserved (irrigation potential) |
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) "total" "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) |
scenario |
Combination of EFP ("on", "off") and non-ag. water use scenario ("ssp2", "ISIMIP", ...) separated by "." |
cellular |
If TRUE: cellular data returned. If FALSE: aggregated to basins |
magpie object in cellular resolution
Felicitas Beier, Benjamin Leon Bodirsky
## Not run: calcOutput("EFRviolations", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("EFRviolations", aggregate = FALSE) ## End(Not run)
This function calculates environmental flow requirements (EFR) based on EFR share calculated from LPJmL monthly discharge
calcEnvmtlFlowRequirements(lpjml, selectyears, climatetype, efrMethod)
calcEnvmtlFlowRequirements(lpjml, selectyears, climatetype, efrMethod)
lpjml |
LPJmL version used |
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
efrMethod |
EFR method used including selected strictness of EFRs (Smakhtin:good, VMF:fair) |
magpie object with EFRs, LFRs and HFRs in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("EnvmtlFlowRequirements", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("EnvmtlFlowRequirements", aggregate = FALSE) ## End(Not run)
This function calculates environmental flow requirements (EFR) that are inaccessible to humans based on EFRs and inaccessible discharge calculated from LPJmL monthly discharge
calcEnvmtlFlowRequirementsInaccess( lpjml, selectyears, climatetype, efrMethod, accessibilityrule )
calcEnvmtlFlowRequirementsInaccess( lpjml, selectyears, climatetype, efrMethod, accessibilityrule )
lpjml |
LPJmL version used |
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
efrMethod |
EFR method used including selected strictness of EFRs (Smakhtin:good, VMF:fair) |
accessibilityrule |
Method used: Quantile method (Q) or Coefficient of Variation (CV) combined with scalar value defining the strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx, e.g. Q75: 0.25, Q50: 0.5) or base value for exponential curve separated by : (CV:2) |
magpie object with EFRs, LFRs and HFRs in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("calcEnvmtlFlowRequirementsInaccess", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("calcEnvmtlFlowRequirementsInaccess", aggregate = FALSE) ## End(Not run)
This function calculates the water requirements for full irrigation per cell per crop given potentially available land
calcFullIrrigationRequirement( lpjml, climatetype, selectyears, iniyear, comagyear, irrigationsystem, landScen, cropmix, multicropping )
calcFullIrrigationRequirement( lpjml, climatetype, selectyears, iniyear, comagyear, irrigationsystem, landScen, cropmix, multicropping )
lpjml |
LPJmL version used |
climatetype |
Climate model or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years to be returned |
iniyear |
Croparea initialization year |
comagyear |
if !NULL: already irrigated area is subtracted; if NULL: total potential land area is used; year specified here is the year of the initialization used for cropland area initialization in calcIrrigatedArea |
irrigationsystem |
Irrigation system used: system share as in initialization year, or drip, surface, sprinkler for full irrigation by selected system |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
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) "total" "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) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("FullIrrigationRequirement", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("FullIrrigationRequirement", aggregate = FALSE) ## End(Not run)
Calculates evapotranspiration (ET) of grassland under irrigated and rainfed conditions based on LPJmL inputs.
calcGrassET(selectyears, lpjml, climatetype, season)
calcGrassET(selectyears, lpjml, climatetype, season)
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" |
season |
"wholeYear": grass et in the entire year (main + off season) "mainSeason": grass etP in the crop-specific growing period of LPJmL (main season) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("GrassET", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("GrassET", aggregate = FALSE) ## End(Not run)
This function determines a mean sowing date and a mean growing period for each cell in order to determine when irrigation can take place.
calcGrowingPeriod( lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb"), climatetype = "GSWP3-W5E5:historical", stage = "harmonized2020", yield_ratio = 0.1, cells = "lpjcell" )
calcGrowingPeriod( lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb"), climatetype = "GSWP3-W5E5:historical", stage = "harmonized2020", yield_ratio = 0.1, cells = "lpjcell" )
lpjml |
Defines LPJmL version for crop/grass and natveg specific inputs |
climatetype |
Switch between different climate scenarios |
stage |
Degree of processing: raw, smoothed, harmonized, harmonized2020 |
yield_ratio |
threshold for cell yield over global average. crops in cells below threshold will be ignored |
cells |
Number of cells to be returned (select "magpiecell" for 59199 cells or "lpjcell" for 67420 cells) |
magpie object in cellular resolution
Kristine Karstens, Felicitas Beier
## Not run: calcOutput("GrowingPeriod", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("GrowingPeriod", aggregate = FALSE) ## End(Not run)
calculates area reserved for irrigation based on area irrigated in initialization and available water resources
calcIrrigAreaActuallyCommitted( lpjml, climatetype, selectyears, iniyear, efrMethod, fossilGW, multicropping, transDist )
calcIrrigAreaActuallyCommitted( lpjml, climatetype, selectyears, iniyear, efrMethod, fossilGW, multicropping, transDist )
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
iniyear |
Initialization year of irrigation system |
efrMethod |
EFR method used including selected strictness of EFRs (Smakhtin:good, VMF:fair) |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
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) "total" "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) |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("IrrigAreaActuallyCommitted", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("IrrigAreaActuallyCommitted", aggregate = FALSE) ## End(Not run)
calculates area reserved for irrigation based on area irrigated in initialization year and depreciation parameter (set to 0.1)
calcIrrigAreaCommitted(selectyears, iniyear)
calcIrrigAreaCommitted(selectyears, iniyear)
selectyears |
select years |
iniyear |
initialization year |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("IrrigAreaCommitted", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("IrrigAreaCommitted", aggregate = FALSE) ## End(Not run)
calculates area that can potentially be irrigated given chosen land scenario and gainthreshold
calcIrrigatableAreaUnlimited( selectyears, iniyear, landScen, lpjml, climatetype, cropmix, yieldcalib, irrigationsystem, unit, gainthreshold, multicropping )
calcIrrigatableAreaUnlimited( selectyears, iniyear, landScen, lpjml, climatetype, cropmix, yieldcalib, irrigationsystem, unit, gainthreshold, multicropping )
selectyears |
years for which irrigatable area is calculated |
iniyear |
initialization year |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
irrigationsystem |
Irrigation system used: system share as in initialization year, or drip, surface, sprinkler for full irrigation by selected system |
unit |
Unit of yield improvement potential to be returned and level of price aggregation used, separated by ":". Unit: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices |
gainthreshold |
Threshold of yield improvement potential (in USD per hectare) |
multicropping |
Multicropping activated (TRUE) or not (FALSE) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("IrrigatableAreaUnlimited", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("IrrigatableAreaUnlimited", aggregate = FALSE) ## End(Not run)
This function returns the irrigation system share initialization
calcIrrigationSystem(datasource)
calcIrrigationSystem(datasource)
datasource |
Data source to be used: Jaegermeyr (irrigation system share based on FAO 2014, ICID 2012 and Rohwer et al. 2007) or LPJmL (dominant irrigation system per country) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("IrrigationSystem", datasource = "Jaegermeyr", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("IrrigationSystem", datasource = "Jaegermeyr", aggregate = FALSE) ## End(Not run)
This function calculates a cellranking for the river basin discharge allocation based on yield improvement potential through irrigation
calcIrrigCellranking( lpjml, climatetype, cellrankyear, iniyear, comagyear, irrigationsystem, landScen, method, cropmix, yieldcalib, multicropping )
calcIrrigCellranking( lpjml, climatetype, cellrankyear, iniyear, comagyear, irrigationsystem, landScen, method, cropmix, yieldcalib, multicropping )
lpjml |
LPJmL version used for yields |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" for yields |
cellrankyear |
Year(s) for which cell rank is calculated |
iniyear |
Initialization year for price |
comagyear |
if !NULL: already irrigated area is subtracted; if NULL: total potential land area is used; year specified here is the year of the initialization used for cropland area initialization in calcIrrigatedArea |
irrigationsystem |
Irrigation system used: system share as in initialization year, or drip, surface, sprinkler for full irrigation by selected system |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
method |
Rank and optimization method consisting of Unit according to which rank is calculated: tDM (tons per dry matter), USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices; and boolean indicating fullpotential (TRUE) or reduced potential (FALSE) |
cropmix |
Selected cropmix for which yield improvement potential is calculated (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) NULL returns all crops individually |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
multicropping |
Multicropping activated (TRUE) or not (FALSE) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("IrrigCellranking", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("IrrigCellranking", aggregate = FALSE) ## End(Not run)
This function calculates the yield gains per crop through irrigation (including negatives)
calcIrrigCropYieldGain( lpjml, climatetype, priceAgg, iniyear, selectyears, yieldcalib, multicropping )
calcIrrigCropYieldGain( lpjml, climatetype, priceAgg, iniyear, selectyears, yieldcalib, multicropping )
lpjml |
LPJmL version used for yields |
climatetype |
Climate scenarios or historical baseline "GSWP3-W5E5:historical" |
priceAgg |
Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices, or "CONST" for same price for all crops |
iniyear |
initialization year for food price and cropmix area |
selectyears |
Years to be returned by the function |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
multicropping |
Multicropping activated (TRUE) or not (FALSE) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("IrrigCropYieldGain", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("IrrigCropYieldGain", aggregate = FALSE) ## End(Not run)
This function returns the share of the irrigation area under a specific irrigation system type (surface, sprinkler, drip) per crop type
calcIrrigSystemShr(iniyear)
calcIrrigSystemShr(iniyear)
iniyear |
Year to be used for irrigation system share initialization |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("IrrigSystemShr", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("IrrigSystemShr", aggregate = FALSE) ## End(Not run)
This function calculates irrigation water requirements based on LPJmL blue water consumption of crops and considering irrigation efficiencies
calcIrrigWatRequirements(selectyears, lpjml, climatetype, multicropping)
calcIrrigWatRequirements(selectyears, lpjml, climatetype, multicropping)
selectyears |
Years to be returned |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
climatetype |
Climate model or historical baseline "GSWP3-W5E5:historical" |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("IrrigWatRequirements", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("IrrigWatRequirements", aggregate = FALSE) ## End(Not run)
This function calculates the yield improvement potential through irrigation for all grid cells given a certain crop mix
calcIrrigYieldImprovementPotential( lpjml, climatetype, unit, iniyear, selectyears, comagyear, cropmix, landScen, irrigationsystem, yieldcalib, multicropping )
calcIrrigYieldImprovementPotential( lpjml, climatetype, unit, iniyear, selectyears, comagyear, cropmix, landScen, irrigationsystem, yieldcalib, multicropping )
lpjml |
LPJmL version used for yields |
climatetype |
Climate scenarios or historical baseline "GSWP3-W5E5:historical" |
unit |
Unit of yield improvement potential to be returned and level of price aggregation used, separated by ":". Unit: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); for relative return according to area and volume. Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices |
iniyear |
initialization year for food price and cropmix area |
selectyears |
Years to be returned by the function |
comagyear |
if !NULL: already irrigated area is subtracted; if NULL: total potential land area is used; year specified here is the year of the initialization used for cropland area initialization in calcIrrigatedArea |
cropmix |
Selected cropmix for which yield improvement potential is calculated (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) NULL returns all crops individually |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
irrigationsystem |
Irrigation system used: system share as in initialization year, or drip, surface, sprinkler for full irrigation by selected system |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
multicropping |
Multicropping activated (TRUE) or not (FALSE) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("IrrigYieldImprovementPotential", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("IrrigYieldImprovementPotential", aggregate = FALSE) ## End(Not run)
Calculates difference between requested water and water that can be fulfilled in algorithm given available surface water resources for all scenarios. This information is used to derive non-renewable groundwater use.
calcMissingWater( output, lpjml, climatetype, transDistGW = 100, multicropping = "TRUE:actual:irrig_crop", selectyears, iniyear )
calcMissingWater( output, lpjml, climatetype, transDistGW = 100, multicropping = "TRUE:actual:irrig_crop", selectyears, iniyear )
output |
sector to be reported: non-agricultural sector water use ("nonAg"), (committed) agricultural water use ("comAg"), or both ("total") |
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
transDistGW |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability to determine missing water that is tagged as non-renewable groundwater |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
selectyears |
Years to be returned |
iniyear |
Initialization year |
cellular magpie object
Felicitas Beier
## Not run: calcOutput("MissingWater", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("MissingWater", aggregate = FALSE) ## End(Not run)
Calculates current non-renewable (fossil) groundwater use as negative difference between water availability from renewable sources and human water use (consumption and withdrawal). The water use in the initialization year is fixed in the future as non-renewable groundwater.
calcNonrenGroundwatUse( output, lpjml, climatetype, transDistGW = 100, multicropping = "TRUE:actual:irrig_crop", selectyears, iniyear )
calcNonrenGroundwatUse( output, lpjml, climatetype, transDistGW = 100, multicropping = "TRUE:actual:irrig_crop", selectyears, iniyear )
output |
"total": total groundwater use (non-agricultural and agricultural), "nonAg": groundwater use in non-agricultural sector (industry, domestic, electricity), "comAg": groundwater use in agricultural sector (currently irrigated area) |
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
transDistGW |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability to determine missing water that is tagged as non-renewable groundwater |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
selectyears |
Years to be returned |
iniyear |
Initialization year |
cellular magpie object
Felicitas Beier
## Not run: calcOutput("NonrenGroundwatUse", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("NonrenGroundwatUse", aggregate = FALSE) ## End(Not run)
Calculates Potentially Irrigated Areas (PIAs) per crop given available water and land
calcPotIrrigAreas( cropAggregation, lpjml, climatetype, selectyears, iniyear, efrMethod, accessibilityrule, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, landScen, cropmix, comAg, fossilGW, multicropping, transDist )
calcPotIrrigAreas( cropAggregation, lpjml, climatetype, selectyears, iniyear, efrMethod, accessibilityrule, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, landScen, cropmix, comAg, fossilGW, multicropping, transDist )
cropAggregation |
TRUE (aggregated Potentially Irrigated Areas (PIAs)), FALSE (crop-specific PIAs) |
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years for which irrigatable area is calculated |
iniyear |
Initialization year for initial croparea |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
accessibilityrule |
Strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx). (e.g. Q75: 0.25, Q50: 0.5) |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
allocationrule |
Rule to be applied for river basin discharge allocation across cells of river basin ("optimization", "upstreamfirst", "equality") |
gainthreshold |
Threshold of yield improvement potential required (in USD per hectare) |
irrigationsystem |
Irrigation system used ("surface", "sprinkler", "drip", "initialization") |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
comAg |
If TRUE: currently already irrigated areas in initialization year are reserved for irrigation, if FALSE: no irrigation areas reserved (irrigation potential) |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("PotIrrigAreas", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("PotIrrigAreas", aggregate = FALSE) ## End(Not run)
This function returns the potential water quantity (separted into withdrawal and consumption) available for different uses
calcPotWater( lpjml, selectyears, climatetype, efrMethod, accessibilityrule, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, iniyear, landScen, cropmix, comAg, fossilGW, multicropping, transDist )
calcPotWater( lpjml, selectyears, climatetype, efrMethod, accessibilityrule, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, iniyear, landScen, cropmix, comAg, fossilGW, multicropping, transDist )
lpjml |
LPJmL version used |
selectyears |
Years for which irrigatable area is calculated |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
accessibilityrule |
Strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx). (e.g. Q75: 0.25, Q50: 0.5) |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
allocationrule |
Rule to be applied for river basin discharge allocation across cells of river basin ("optimization", "upstreamfirst", "equality") |
gainthreshold |
Threshold of yield improvement potential required (in USD per hectare) |
irrigationsystem |
Irrigation system used ("surface", "sprinkler", "drip", "initialization") |
iniyear |
Initialization year of irrigation system |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
comAg |
If TRUE: currently already irrigated areas in initialization year are reserved for irrigation, if FALSE: no irrigation areas reserved (irrigation potential) |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
multicropping |
Multicropping activated (TRUE) or not (FALSE) and Multiple Cropping Suitability mask selected ("endogenous": suitability for multiple cropping determined by rules based on grass and crop productivity "exogenous": suitability for multiple cropping given by GAEZ data set), separated by ":" (e.g. TRUE:endogenous; TRUE:exogenous; FALSE) |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("PotWater", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("PotWater", aggregate = FALSE) ## End(Not run)
This function distributes surplus basin discharge after the previous river routings following certain management assumptions
calcRiverDischargeAllocation( lpjml, climatetype, selectyears, efrMethod, accessibilityrule, transDist, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, iniyear, landScen, cropmix, comAg, multicropping )
calcRiverDischargeAllocation( lpjml, climatetype, selectyears, efrMethod, accessibilityrule, transDist, rankmethod, yieldcalib, allocationrule, gainthreshold, irrigationsystem, iniyear, landScen, cropmix, comAg, multicropping )
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
accessibilityrule |
Method used: Quantile method (Q) or Coefficient of Variation (CV) combined with scalar value defining the strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx, e.g. Q75: 0.25, Q50: 0.5) or base value for exponential curve separated by : (CV:2) |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
allocationrule |
Rule to be applied for river basin discharge allocation ("optimization" or "upstreamfirst") |
gainthreshold |
Threshold of yield improvement potential (in USD per hectare) |
irrigationsystem |
Irrigation system to be used for river basin discharge allocation algorithm ("surface", "sprinkler", "drip", "initialization") |
iniyear |
Initialization year of irrigation system |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
comAg |
if TRUE: the currently already irrigated areas in initialization year are reserved for irrigation, if FALSE: no irrigation areas reserved (irrigation potential) |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("RiverDischargeAllocation", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("RiverDischargeAllocation", aggregate = FALSE) ## End(Not run)
This function calculates human uses and reserved water along the river
calcRiverHumanUseAccounting( iteration, lpjml, climatetype, selectyears, iniyear, efrMethod, multicropping, transDist, comAg, accessibilityrule, rankmethod, gainthreshold, cropmix, yieldcalib, irrigationsystem, landScen )
calcRiverHumanUseAccounting( iteration, lpjml, climatetype, selectyears, iniyear, efrMethod, multicropping, transDist, comAg, accessibilityrule, rankmethod, gainthreshold, cropmix, yieldcalib, irrigationsystem, landScen )
iteration |
Water use to be allocated in this river routing iteration (non_agriculture, committed_agriculture, committed_agriculture_fullMulticropping, potential_irrigation, |
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
iniyear |
Initialization year of irrigation system |
efrMethod |
EFR method used including selected strictness of EFRs (Smakhtin:good, VMF:fair) |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
comAg |
if TRUE: the currently already irrigated areas in initialization year are reserved for irrigation, if FALSE: no irrigation areas reserved (irrigation potential). Only relevant for iteration = potential |
accessibilityrule |
(For case of iteration = "potential_irrigation" only:) Method used: Quantile method (Q) or Coefficient of Variation (CV) combined with scalar value defining the strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx, e.g. Q75: 0.25, Q50: 0.5) or base value for exponential curve separated by : (CV:2) |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
gainthreshold |
(For case of iteration = "potential_irrigation" only:) Threshold of yield improvement potential (same unit as in rankmethod) |
cropmix |
(For case of iteration = "potential_irrigation" only:) Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
yieldcalib |
(For case of iteration = "potential_irrigation" only:) If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
irrigationsystem |
(For case of iteration = "potential_irrigation" only:) Irrigation system to be used for river basin discharge allocation algorithm ("surface", "sprinkler", "drip", "initialization") |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("RiverHumanUseAccounting", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("RiverHumanUseAccounting", aggregate = FALSE) ## End(Not run)
This function calculates natural discharge for the river routing derived from inputs from LPJmL
calcRiverNaturalFlows(selectyears, lpjml, climatetype)
calcRiverNaturalFlows(selectyears, lpjml, climatetype)
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("RiverNaturalFlows", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("RiverNaturalFlows", aggregate = FALSE) ## End(Not run)
This function collects inputs necessary for the different river routings depending on the chosen settings
calcRiverRoutingInputs( lpjml, climatetype, selectyears, iniyear, iteration, transDist, efrMethod, accessibilityrule, multicropping, comAg, rankmethod, gainthreshold, cropmix, yieldcalib, irrigationsystem, landScen )
calcRiverRoutingInputs( lpjml, climatetype, selectyears, iniyear, iteration, transDist, efrMethod, accessibilityrule, multicropping, comAg, rankmethod, gainthreshold, cropmix, yieldcalib, irrigationsystem, landScen )
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
iniyear |
Initialization year of irrigation system |
iteration |
Water use to be allocated in this river routing iteration (non_agriculture, committed_agriculture, potential_irrigation, committed_agriculture_fullMulticropping). |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
accessibilityrule |
Water accessibility rule. Available methods: Quantile method (Q) or Coefficient of Variation (CV); combined with scalar value defining the strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx, e.g. Q75: 0.25, Q50: 0.5) or base value for exponential curve separated by : (CV:2) |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
comAg |
if TRUE: the currently already irrigated areas in initialization year are reserved for irrigation, if FALSE: no irrigation areas reserved (irrigation potential). Only relevant for iteration = potential |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
gainthreshold |
Threshold of yield improvement potential (in USD per hectare) |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
irrigationsystem |
Irrigation system to be used for river basin discharge allocation algorithm ("surface", "sprinkler", "drip", "initialization") |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("RiverRoutingInputs", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("RiverRoutingInputs", aggregate = FALSE) ## End(Not run)
calculates of share of current non-agricultural and irrigation that can be fulfilled given renewable water availability of the algorithm
calcShrHumanUsesFulfilled( lpjml, climatetype, transDist, multicropping, selectyears, iniyear, efrMethod )
calcShrHumanUsesFulfilled( lpjml, climatetype, transDist, multicropping, selectyears, iniyear, efrMethod )
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
selectyears |
Years to be returned |
iniyear |
Initialization year |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
cellular magpie object
Felicitas Beier
## Not run: calcOutput("ShrHumanUsesFulfilled", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("ShrHumanUsesFulfilled", aggregate = FALSE) ## End(Not run)
This function calculates committed agricultural water uses that are used in the river routing algorithm for distributing available water across the basin
calcWaterUseActuallyCommittedAg( iteration = "committed_agriculture", lpjml, climatetype, selectyears, iniyear, multicropping, efrMethod, fossilGW, transDist )
calcWaterUseActuallyCommittedAg( iteration = "committed_agriculture", lpjml, climatetype, selectyears, iniyear, multicropping, efrMethod, fossilGW, transDist )
iteration |
Default: "committed_agriculture", Special case: "committed_agriculture_fullPotential". Special case should only be used for calculation of full multicropping potential committed agricultural area for case of Current Irrigation. |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years to be returned |
iniyear |
Year of initialization for cropland area |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("WaterUseActuallyCommittedAg", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("WaterUseActuallyCommittedAg", aggregate = FALSE) ## End(Not run)
This function calculates committed agricultural water uses that are used in the river routing algorithm for distributing available water across the basin
calcWaterUseCommittedAg( lpjml, climatetype, selectyears, iniyear, multicropping )
calcWaterUseCommittedAg( lpjml, climatetype, selectyears, iniyear, multicropping )
lpjml |
LPJmL version required for respective inputs: natveg or crop |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years to be returned |
iniyear |
Year of initialization for cropland area |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("WaterUseCommittedAg", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("WaterUseCommittedAg", aggregate = FALSE) ## End(Not run)
This function extracts non-agricultural water demand
calcWaterUseNonAg( selectyears = seq(1995, 2100, by = 5), cells = "lpjcell", datasource = "WATCH_ISIMIP_WATERGAP", usetype = "all", seasonality = "grper", harmonType = "average", lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb"), climatetype = "GSWP3-W5E5:historical" )
calcWaterUseNonAg( selectyears = seq(1995, 2100, by = 5), cells = "lpjcell", datasource = "WATCH_ISIMIP_WATERGAP", usetype = "all", seasonality = "grper", harmonType = "average", lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb"), climatetype = "GSWP3-W5E5:historical" )
selectyears |
Years to be returned |
cells |
Number of cells to be returned (select "magpiecell" for 59199 cells or "lpjcell" for 67420 cells) |
datasource |
Data source to be used (e.g. WATERGAP2020) |
usetype |
water use types (domestic, industry, electricity) and option to return withdrawals or consumption separated by ":" (e.g. "all:withdrawal") options for first argument: "total" (returns the sum over different water use types) or "all" ( returns all water use types (domestic, industry, electricity)) options for second argument: "all", "withdrawal", "consumption" |
seasonality |
grper (default): non-agricultural water demand in growing period per year; total: non-agricultural water demand throughout the year |
harmonType |
Type of time smoothing: average (average over 8-year time span around baseline year) or spline (time smoothing using spline method with 4 degrees of freedom) or NULL (no smoothing) |
lpjml |
Defines LPJmL version for crop/grass and natveg specific inputs |
climatetype |
Switch between different climate scenarios for calcGrowingPeriod |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("WaterUseNonAg", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("WaterUseNonAg", aggregate = FALSE) ## End(Not run)
This function calculates yearly runoff from runoff on land and water provided by LPJmL
calcYearlyRunoff(selectyears, lpjml, climatetype)
calcYearlyRunoff(selectyears, lpjml, climatetype)
selectyears |
Years to be returned (Note: does not affect years of harmonization or smoothing) |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("YearlyRunoff", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("YearlyRunoff", aggregate = FALSE) ## End(Not run)
reports potentially irrigated area depending on gainthreshold and land constraint only
calcYieldgainArea( rangeGT, lpjml, selectyears, iniyear, climatetype, yieldcalib, unit, irrigationsystem, landScen, cropmix, multicropping )
calcYieldgainArea( rangeGT, lpjml, selectyears, iniyear, climatetype, yieldcalib, unit, irrigationsystem, landScen, cropmix, multicropping )
rangeGT |
Range of gainthreshold for calculation of potentially irrigated areas (in USD per hectare) |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
selectyears |
Years for which irrigatable area is calculated |
iniyear |
Initialization year for cropland area |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
unit |
Unit of yield improvement potential used as threshold, consisting of unit and price aggregation level separated by ":". Unit: tDM (tons per dry matter), USD_ha (USD per hectare) for area return, or USD_m3 (USD per cubic meter) for volumetric return. Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices |
irrigationsystem |
Irrigation system used: system share as in initialization year, or drip, surface, sprinkler for full irrigation by selected system |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
multicropping |
Multicropping activated (TRUE) or not (FALSE) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcYieldgainArea(rangeGT = seq(0, 10000, by = 100), scenario = "ssp2") ## End(Not run)
## Not run: calcYieldgainArea(rangeGT = seq(0, 10000, by = 100), scenario = "ssp2") ## End(Not run)
reports yield gain potential for irrigatable area under different scenarios
calcYieldgainPotential( scenario, selectyears, iniyear, lpjml, climatetype, efrMethod, yieldcalib, irrigationsystem, accessibilityrule, rankmethod, gainthreshold, allocationrule, transDist, fossilGW, landScen, cropmix, multicropping, unlimited )
calcYieldgainPotential( scenario, selectyears, iniyear, lpjml, climatetype, efrMethod, yieldcalib, irrigationsystem, accessibilityrule, rankmethod, gainthreshold, allocationrule, transDist, fossilGW, landScen, cropmix, multicropping, unlimited )
scenario |
Non-agricultural water use and EFP scenario, separated by "." (e.g. "on.ssp2") |
selectyears |
Years for which yield gain potential is calculated |
iniyear |
Initialization year |
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
efrMethod |
EFR method used including selected strictness of EFRs (e.g. Smakhtin:good, VMF:fair) |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
irrigationsystem |
Irrigation system used ("surface", "sprinkler", "drip", "initialization") |
accessibilityrule |
Strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx). (e.g. Q75: 0.25, Q50: 0.5) |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
gainthreshold |
Threshold of yield improvement potential required (in USD per hectare) |
allocationrule |
Rule to be applied for river basin discharge allocation across cells of river basin ("optimization", "upstreamfirst", "equality") |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
unlimited |
TRUE: no water limitation to potentially irrigated area FALSE: irrigatable area limited by water availability |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("YieldgainPotential", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("YieldgainPotential", aggregate = FALSE) ## End(Not run)
This function calculates water use on selected land areas without considering water constraints
calcYieldgainWatUse( lpjml, climatetype, selectyears, iniyear, landScen, cropmix, yieldcalib, multicropping, unit, irrigationsystem, rangeGT )
calcYieldgainWatUse( lpjml, climatetype, selectyears, iniyear, landScen, cropmix, yieldcalib, multicropping, unit, irrigationsystem, rangeGT )
lpjml |
LPJmL version required for respective inputs: natveg or crop |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
selectyears |
Years to be returned |
iniyear |
Year of initialization for cropland area |
landScen |
Land availability scenario consisting of two parts separated by ":": 1. available land scenario (currCropland, currIrrig, potCropland) 2. protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). For case of no land protection select "NA" in second part of argument or do not specify second part of the argument |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
unit |
Unit of yield improvement potential to be returned and level of price aggregation used, separated by ":". Unit: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices |
irrigationsystem |
Irrigation system used: system share as in initialization year, or drip, surface, sprinkler for full irrigation by selected system |
rangeGT |
Range of gainthreshold for calculation of potentially irrigated areas (in USD per hectare) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("YieldgainWatUse", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("YieldgainWatUse", aggregate = FALSE) ## End(Not run)
This function calculates the yield improvement potential through irrigation or multiple cropping per grid cell for a given cropmix
calcYieldImprovementPotential( lpjml, climatetype, yieldgaintype, priceAgg, iniyear, selectyears, cropmix, yieldcalib, multicropping )
calcYieldImprovementPotential( lpjml, climatetype, yieldgaintype, priceAgg, iniyear, selectyears, cropmix, yieldcalib, multicropping )
lpjml |
LPJmL version used for yields |
climatetype |
Climate scenarios or historical baseline "GSWP3-W5E5:historical" |
yieldgaintype |
Crop yield gain through multiple cropping under rainfed conditions "multicropping_rf", multiple cropping under irrigated conditions "multicropping_ir", irrigation under single cropping conditions "irrigation_singlecropping" irrigation and multiple cropping "irrigation_multicropping" |
priceAgg |
Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices, or "CONST" for same price for all crops |
iniyear |
initialization year for food price and cropmix area |
selectyears |
Years to be returned by the function |
cropmix |
Selected cropmix for which yield improvement potential is calculated (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) NULL returns all crops individually |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("YieldImprovementPotential", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("YieldImprovementPotential", aggregate = FALSE) ## End(Not run)
This function returns irrigated and rainfed yields for MAgPIE crops.
calcYieldsAdjusted( lpjml, climatetype, iniyear, selectyears, yieldcalib, multicropping )
calcYieldsAdjusted( lpjml, climatetype, iniyear, selectyears, yieldcalib, multicropping )
lpjml |
LPJmL version used |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" for yields |
iniyear |
Year to be used for cropland of yield calibration |
selectyears |
Years to be returned by the function |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("YieldsAdjusted", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("YieldsAdjusted", aggregate = FALSE) ## End(Not run)
This function calculates yields per crop valued at FAO prices (in USD per hectare)
calcYieldsValued( lpjml, climatetype, priceAgg, iniyear, selectyears, yieldcalib, multicropping )
calcYieldsValued( lpjml, climatetype, priceAgg, iniyear, selectyears, yieldcalib, multicropping )
lpjml |
LPJmL version used for yields |
climatetype |
Climate scenarios or historical baseline "GSWP3-W5E5:historical" |
priceAgg |
Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices, or "CONST" for same price for all crops |
iniyear |
initialization year for food price and cropmix area |
selectyears |
Years to be returned by the function |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
magpie object in cellular resolution
Felicitas Beier
## Not run: calcOutput("YieldsValued", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("YieldsValued", aggregate = FALSE) ## End(Not run)
Read dam file (no source information available)
correctDams(x)
correctDams(x)
x |
magpie object provided by the read function |
List of magpie objects with results on cellular level, weight, unit and description.
Kristine Karstens
## Not run: readSource("Dams", convert = "onlycorrect") ## End(Not run)
## Not run: readSource("Dams", convert = "onlycorrect") ## End(Not run)
Correct ISIMIP data
correctISIMIPinputs(x)
correctISIMIPinputs(x)
x |
MAgPIE object provided by the read function |
List of magpie objects with results on cellular level, weight, unit and description.
Felicitas Beier
## Not run: readSource("ISIMIPinputs", convert="onlycorrect") ## End(Not run)
## Not run: readSource("ISIMIPinputs", convert="onlycorrect") ## End(Not run)
Correct WATERGAP data
correctWATERGAP(x)
correctWATERGAP(x)
x |
MAgPIE object provided by the read function |
List of magpie objects with results on cellular level, weight, unit and description.
Felicitas Beier
## Not run: readSource("WATERGAP", convert="onlycorrect") ## End(Not run)
## Not run: readSource("WATERGAP", convert="onlycorrect") ## End(Not run)
Function that produces output for irrigation potentials under multiple cropping on cellular resolution.
fullCURRENTIRRIGATION(yieldcalib = "TRUE:TRUE:actual:irrig_crop")
fullCURRENTIRRIGATION(yieldcalib = "TRUE:TRUE:actual:irrig_crop")
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
Felicitas Beier
Function that produces output for analysis of non-renewable groundwater resources
fullGROUNDWATER(multicropping = FALSE, rankmethod = "USD_ha:GLO:TRUE")
fullGROUNDWATER(multicropping = FALSE, rankmethod = "USD_ha:GLO:TRUE")
multicropping |
Multicropping activated (TRUE) or not (FALSE) and Multiple Cropping Suitability mask selected ("endogenous": suitability for multiple cropping determined by rules based on grass and crop productivity "exogenous": suitability for multiple cropping given by GAEZ data set), separated by ":" (e.g. TRUE:endogenous; TRUE:exogenous; FALSE) |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
Felicitas Beier
Function that produces the objects for Technical and Economic Irrigation Potentials within land and water boundaries
fullIRRIGATIONPOTENTIAL( efrMethod = "VMF:fair", accessibilityrule = "CV:2", transDist = 0, fossilGW = FALSE, allocationrule = "optimization", rankmethod = "USD_ha:GLO:TRUE", gainthreshold = 500, protectLand = "HalfEarth", yieldcalib = "TRUE:FALSE", multicropping = FALSE, cropmix = "hist_total", climatetype = "MRI-ESM2-0:ssp370", lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb") )
fullIRRIGATIONPOTENTIAL( efrMethod = "VMF:fair", accessibilityrule = "CV:2", transDist = 0, fossilGW = FALSE, allocationrule = "optimization", rankmethod = "USD_ha:GLO:TRUE", gainthreshold = 500, protectLand = "HalfEarth", yieldcalib = "TRUE:FALSE", multicropping = FALSE, cropmix = "hist_total", climatetype = "MRI-ESM2-0:ssp370", lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb") )
efrMethod |
EFR method used including selected strictness of EFRs (Smakhtin:good, VMF:fair) |
accessibilityrule |
Method used: Quantile method (Q) or Coefficient of Variation (CV) combined with scalar value defining the strictness of accessibility restriction: discharge that is exceeded x percent of the time on average throughout a year (Qx, e.g. Q75: 0.25, Q50: 0.5) or base value for exponential curve separated by : (CV:2) |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
allocationrule |
Rule to be applied for river basin discharge allocation across cells of river basin ("optimization", "upstreamfirst") |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
gainthreshold |
Threshold of yield improvement potential required for water allocation in upstreamfirst algorithm (in same unit as in rankmethod) |
protectLand |
Land protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection). |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
Felicitas Beier
Function that produces output for multiple cropping and irrigation potentials on current cropland at cellular resolution.
fullMULTICROPPING( allocationrule = "optimization", comAg = TRUE, fossilGW = TRUE, transDist = 100 )
fullMULTICROPPING( allocationrule = "optimization", comAg = TRUE, fossilGW = TRUE, transDist = 100 )
allocationrule |
Rule to be applied for river basin discharge allocation across cells of river basin ("optimization", "upstreamfirst") |
comAg |
if TRUE: the currently already irrigated areas in initialization year are reserved for irrigation, if FALSE: no irrigation areas reserved (irrigation potential) |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
Felicitas Beier
Function that produces the objects for Technical and Economic Irrigation Potentials within land and water boundaries
fullPREPROCESSING( protectLand = "HalfEarth", yieldcalib = "TRUE:TRUE:actual:irrig_crop", multicropping = "TRUE:potential:endogenous", cropmix = "hist_total", climatetype = "MRI-ESM2-0:ssp370", lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb") )
fullPREPROCESSING( protectLand = "HalfEarth", yieldcalib = "TRUE:TRUE:actual:irrig_crop", multicropping = "TRUE:potential:endogenous", cropmix = "hist_total", climatetype = "MRI-ESM2-0:ssp370", lpjml = c(natveg = "LPJmL4_for_MAgPIE_44ac93de", crop = "ggcmi_phase3_nchecks_9ca735cb") )
protectLand |
Land protection scenario (WDPA, or one of the scenarios available in calcConservationPriorities, e.g., 30by20, BH, BH_IFL, PBL_HalfEarth, or NA for no protection |
yieldcalib |
If TRUE: LPJmL yields calibrated to FAO country yield in iniyear Also needs specification of refYields, separated by ":". Options: FALSE (for single cropping analyses) or "TRUE:actual:irrig_crop" (for multiple cropping analyses) If FALSE: uncalibrated LPJmL yields are used |
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 LandInG "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) (e.g. TRUE:actual:total; TRUE:none; FALSE) |
cropmix |
Selected cropmix (options: "hist_irrig" for historical cropmix on currently irrigated area, "hist_total" for historical cropmix on total cropland, or selection of proxycrops) |
climatetype |
Switch between different climate scenarios or historical baseline "GSWP3-W5E5:historical" |
lpjml |
LPJmL version required for respective inputs: natveg or crop |
Felicitas Beier
Function that produces gridded outputs for usage in the SIMPLE model (Baldos & Hertel 2012) and the SIMPLE-G model (Baldos et al. 2020)
fullSIMPLE( transDist = 100, fossilGW = TRUE, allocationrule = "optimization", rankmethod = "USD_m3:GLO:TRUE" )
fullSIMPLE( transDist = 100, fossilGW = TRUE, allocationrule = "optimization", rankmethod = "USD_m3:GLO:TRUE" )
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
fossilGW |
If TRUE: non-renewable groundwater can be used. If FALSE: non-renewable groundwater cannot be used. |
allocationrule |
Rule to be applied for river basin discharge allocation across cells of river basin ("optimization", "upstreamfirst") |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
Felicitas Beier
Function that produces output for analysis of water transport for provision to cells in surrounding
fullTRANSPORT(multicropping, rankmethod = "USD_ha:GLO:TRUE")
fullTRANSPORT(multicropping, rankmethod = "USD_ha:GLO:TRUE")
multicropping |
Multicropping activated (TRUE) or not (FALSE) and Multiple Cropping Suitability mask selected ("endogenous": suitability for multiple cropping determined by rules based on grass and crop productivity "exogenous": suitability for multiple cropping given by GAEZ data set), separated by ":" (e.g. TRUE:endogenous; TRUE:exogenous; FALSE) |
rankmethod |
Rank and optimization method consisting of Unit according to which rank is calculated: USD_ha (USD per hectare) for relative area return, or USD_m3 (USD per cubic meter) for relative volumetric return; USD for absolute return (total profit); Price aggregation: "GLO" for global average prices, or "ISO" for country-level prices and boolean indicating fullpotential (TRUE, i.e. cell receives full irrigation requirements in total area) or reduced potential (FALSE, reduced potential of cell receives at later stage in allocation algorithm); separated by ":" |
Felicitas Beier
Read dam file (no source information available)
readDams()
readDams()
List of magpie objects with results on cellular level, weight, unit and description.
Kristine Karstens
## Not run: readSource("Dams", convert = "onlycorrect") ## End(Not run)
## Not run: readSource("Dams", convert = "onlycorrect") ## End(Not run)
Read in irrigation system type for initialization
readIrrigationSystem(subtype = "Jaegermeyr")
readIrrigationSystem(subtype = "Jaegermeyr")
subtype |
Data source to be used: Jaegermeyr (irrigation system share based on FAO 2014, ICID 2012 and Rohwer et al. 2007) or LPJmL (dominant irrigation system per country) |
MAgPIE object of at country-level
Felicitas Beier
## Not run: readSource("IrrigationSystem", convert = FALSE) ## End(Not run)
## Not run: readSource("IrrigationSystem", convert = FALSE) ## End(Not run)
Read in non-agricultural water demand data from ISIMIP inputs
readISIMIPinputs(subtype = "ISIMIP3b:water:histsoc.waterabstraction")
readISIMIPinputs(subtype = "ISIMIP3b:water:histsoc.waterabstraction")
subtype |
Data source to be read from including path separated by ":", subtype separated by "." |
MAgPIE object of non-agricultural water demand at 0.5 cellular level in mio. m^3
Felicitas Beier
## Not run: readSource("ISIMIPinputs", subtype = "ISIMIP3b:water:histsoc.waterabstraction", convert = "onlycorrect") ## End(Not run)
## Not run: readSource("ISIMIPinputs", subtype = "ISIMIP3b:water:histsoc.waterabstraction", convert = "onlycorrect") ## End(Not run)
Read in irrigation system suitability per crop type and country-level irrigation system shares from Jaegermeyr (2015)
readJaegermeyr2015(subtype)
readJaegermeyr2015(subtype)
subtype |
Data to be read in: "systemShare": irrigation system share as provided in SI of Jägermeyr et al. (2015), based on FAO 2014, ICID 2012 and Rohwer et al. 2007); "systemSuitability": biophysical and technical irrigation system suitability by crop type (CFT) as provided in Table 2 of Jägermeyr et al. (2015) based on Sauer et al. (2010) and Fischer et al. (2012). |
MAgPIE object
Felicitas Beier
## Not run: readSource("Jaegerymeyr2015", convert = FALSE) ## End(Not run)
## Not run: readSource("Jaegerymeyr2015", convert = FALSE) ## End(Not run)
read file with neighbor cell and distance information derived from LPJmL grid
readNeighborCells()
readNeighborCells()
empty magpie object with list data stored in attributes
Felicitas Beier
## Not run: readSource("NeighborCells", convert = FALSE) ## End(Not run)
## Not run: readSource("NeighborCells", convert = FALSE) ## End(Not run)
Read in non-agricultural water demand data from WATERGAP model
readWATERGAP(subtype = "WATCH_ISIMIP_WATERGAP")
readWATERGAP(subtype = "WATCH_ISIMIP_WATERGAP")
subtype |
Data source to be read from |
MAgPIE object of non-agricultural water demand at 0.5 cellular level in mio. m^3
Felicitas Beier, Abhijeet Mishra
## Not run: readSource("WATERGAP", convert = "onlycorrect") ## End(Not run)
## Not run: readSource("WATERGAP", convert = "onlycorrect") ## End(Not run)
transforms object (array) with 67420 cells to be able to be used in plotmap function
This tool function selects the required cells from object with 67420 cells to be able to plot using plotmap or plotmap2 that are applied to magpie object of size 59199 cells
toolLPJarrayToMAgPIEmap(x)
toolLPJarrayToMAgPIEmap(x)
x |
magpie object to be transformed |
magpie object with correct dimension for use in plotmap
Felicitas Beier
transforms magpie object with 67420 cells to object with 59199 cells
This tool function selects the required cells from object with 67420 cells to be able to plot using plotmap or plotmap2 that are applied to magpie object of size 59199 cells
toolLPJcell2MAgPIEcell(x)
toolLPJcell2MAgPIEcell(x)
x |
magpie object to be transformed |
magpie object with correct dimension for use in plotmap
Felicitas Beier
maps LPJ cells and coordinates
toolLPJcellCoordinates(x, type)
toolLPJcellCoordinates(x, type)
x |
magpie object for which coordinatese should be remapped |
type |
direction of transformation (coord2lpj or lpj2coord) |
magpie object with coordinates in LPJ cell ordering
Felicitas Beier
This function calculates water provision by surrounding grid cells for upstream-downstream allocation set-up
toolNeighborUpDownProvision(rs, transDist, years, scenarios, listNeighborIN)
toolNeighborUpDownProvision(rs, transDist, years, scenarios, listNeighborIN)
rs |
River structure including information on neighboring cells |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
years |
Vector of years for which neighbor allocation shall be applied |
scenarios |
Vector of scenarios for which neighbor allocation shall be applied |
listNeighborIN |
List of arrays required for the algorithm: yearlyRunoff, lakeEvap reserved flows from previous water allocation round (prevReservedWC, prevReservedWW) missing water at this stage of water allocation (missingWW, missingWC) discharge |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke
## Not run: calcOutput("RiverHumanUseAccounting", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("RiverHumanUseAccounting", aggregate = FALSE) ## End(Not run)
sum over regional aggregation chosen in region argument
toolRegionSums(x, region)
toolRegionSums(x, region)
x |
magpie object to be summed up over first dimension |
region |
regional resolution (can be country iso-code, "GLO" for global, or region name and respective mapping "EUR:H12") |
magpie object with regional sum
Felicitas Beier
This tool function allocates discharge for grid cells respecting upstream-downstream relationships and various water constraints
toolRiverDischargeAllocation( rs, c, downCells, iteration, transDist, inLIST, inoutLIST )
toolRiverDischargeAllocation( rs, c, downCells, iteration, transDist, inLIST, inoutLIST )
rs |
River structure with information on upstreamcells, downstreamcells and neighboring cells and distances |
c |
Current cell for which water shall be allocated |
downCells |
Downstream cells of c |
iteration |
Currently active iteration of river discharge allocation. Arguments: "main" for case of main river cells "neighbor" for case of neighboring cells of main river cells |
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand by surrounding cell water availability |
inLIST |
List of objects that are inputs to the function irrigGain, gainthreshold, |
inoutLIST |
List of objects that are inputs to the function and are updated by the function |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke, Jan Philipp Dietrich
This function calculates cellular discharge after reserving water uses for consumption
toolRiverDischargeUpdate(rs, runoffWOEvap, watCons)
toolRiverDischargeUpdate(rs, runoffWOEvap, watCons)
rs |
River structure |
runoffWOEvap |
Array that contains (runoff - lake evap) |
watCons |
Array that contains water reserved for consumptive use |
array in cellular resolution and all year and scenario dimensions
Felicitas Beier, Jens Heinke
## Not run: calcOutput("RiverHumanUseAccounting", aggregate = FALSE) ## End(Not run)
## Not run: calcOutput("RiverHumanUseAccounting", aggregate = FALSE) ## End(Not run)
This function calculates the cell water balance under consideration of different reserved human uses (non-agricultural, neighbor water requirements, committed-agricultural uses)
toolRiverUpDownBalance(inLIST, inoutLIST)
toolRiverUpDownBalance(inLIST, inoutLIST)
inLIST |
List of objects that are inputs to the function: previously reserved withdrawals and consumption in current cell; currently requested withdrawal in current cell |
inoutLIST |
List of objects that are inputs to the function and are updated by the function: discharge (including up- and downstream cells) currently requested consumption (including upstream cells) |
list of arrays objects in cellular resolution
Felicitas Beier, Jens Heinke
Selects cells in certain radius of current cell
toolSelectNeighborCell(transDist, rs = rs, neighborCells = neighborCells)
toolSelectNeighborCell(transDist, rs = rs, neighborCells = neighborCells)
transDist |
Water transport distance allowed to fulfill locally unfulfilled water demand |
rs |
River structure list |
neighborCells |
List of neighboring cells for all river cells |
magpie object in cellular resolution
Felicitas Beier, Jens Heinke
returns coordinates of cells that belong to chosen basin
toolSelectRiverBasin(basinname)
toolSelectRiverBasin(basinname)
basinname |
river basin name as listed in mapping file RiverBasinMapping.csv |
list of cell names
Felicitas Beier