diff --git a/.buildlibrary b/.buildlibrary index f0bf25ad..0d946efc 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '37702338' +ValidationKey: '37723868' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index 1e5b05b1..56ab269f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'mrwater: madrat based MAgPIE water Input Data Library' -version: 1.9.23 -date-released: '2023-09-06' +version: 1.9.24 +date-released: '2023-09-07' abstract: Provides functions for MAgPIE cellular input data generation and stand-alone water calculations. authors: diff --git a/DESCRIPTION b/DESCRIPTION index 2212e8f1..fefa3e5b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,11 @@ Type: Package Package: mrwater Title: madrat based MAgPIE water Input Data Library -Version: 1.9.23 +Version: 1.9.24 URL: https://github.com/pik-piam/mrwater, https: //doi.org/10.5281/zenodo.5801680 License: LGPL-3 | file LICENSE -Date: 2023-09-06 +Date: 2023-09-07 Authors@R: c(person("Felicitas", "Beier", email = "beier@pik-potsdam.de", role = c("aut","cre")), person("Jens", "Heinke", email = "heinke@pik-potsdam.de", role = "aut"), person("Kristine", "Karstens", email = "karstens@pik-potsdam.de", role = "aut"), diff --git a/R/fullSIMPLE.R b/R/fullSIMPLE.R index af5054a6..103e113c 100644 --- a/R/fullSIMPLE.R +++ b/R/fullSIMPLE.R @@ -61,6 +61,28 @@ fullSIMPLE <- function(transDist = 100, fossilGW = TRUE, # MAIN RESULTS # ################ + # Environmental Flow Requirements + # (share of discharge that has to be reserved for the environment) + calcOutput("EnvmtlFlowRequirementsShare", lpjml = lpjml, + climatetype = climatetype, efrMethod = efrMethod, + aggregate = FALSE, + file = "EFRshare.mz") + + # To derive the country-/basin-level transformation elasticity + # for the CET function, PIA is calculated for different thresholds + calcOutput("EconOfIrrig", scenario = ssp, output = "IrrigArea", + gtrange = seq(0, 3000, 100), + selectyears = selectyears, iniyear = iniyear, + lpjml = lpjml, climatetype = climatetype, + efrMethod = efrMethod, accessibilityrule = accessibilityrule, + rankmethod = rankmethod, yieldcalib = yieldcalib, + allocationrule = allocationrule, + irrigationsystem = irrigationsystem, cropmix = cropmix, + landScen = "currCropland:NULL", + comAg = TRUE, transDist = transDist, fossilGW = fossilGW, + multicropping = multicropping, aggregate = FALSE, + file = paste0("IrrigArea", "EconCUR.mz")) + # Current cropland area calcOutput("CropareaAdjusted", iniyear = iniyear, dataset = "Toolbox", @@ -114,6 +136,19 @@ fullSIMPLE <- function(transDist = 100, fossilGW = TRUE, transDist = transDist, fossilGW = fossilGW, aggregate = FALSE, file = "PIA_CUR.mz") + calcOutput("IrrigAreaPotential", gainthreshold = 0, + cropAggregation = TRUE, + selectyears = selectyears, iniyear = iniyear, + climatetype = climatetype, lpjml = lpjml, + accessibilityrule = accessibilityrule, efrMethod = efrMethod, + rankmethod = rankmethod, yieldcalib = yieldcalib, + allocationrule = allocationrule, + irrigationsystem = irrigationsystem, + landScen = "potCropland:NA", cropmix = cropmix, + comAg = TRUE, multicropping = multicropping, + transDist = transDist, fossilGW = fossilGW, + aggregate = FALSE, + file = "PIA_POT.mz") # Currently irrigated area calcOutput("IrrigAreaPotential", gainthreshold = 0, @@ -156,6 +191,17 @@ fullSIMPLE <- function(transDist = 100, fossilGW = TRUE, transDist = transDist, fossilGW = fossilGW, aggregate = FALSE, file = "PIWW_CUR.mz") + calcOutput("WaterUsePotential", gainthreshold = 0, + selectyears = selectyears, climatetype = climatetype, lpjml = lpjml, + accessibilityrule = accessibilityrule, efrMethod = efrMethod, + rankmethod = rankmethod, yieldcalib = yieldcalib, + allocationrule = allocationrule, + irrigationsystem = irrigationsystem, iniyear = iniyear, + landScen = "potCropland:NA", cropmix = cropmix, + comAg = TRUE, multicropping = multicropping, + transDist = transDist, fossilGW = fossilGW, + aggregate = FALSE, + file = "PIWW_POT.mz") # Current irrigation water withdrawal calcOutput("WaterUsePotential", gainthreshold = 0, diff --git a/README.md b/README.md index 90ec9f15..7f8836a1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # madrat based MAgPIE water Input Data Library -R package **mrwater**, version **1.9.23** +R package **mrwater**, version **1.9.24** [![CRAN status](https://www.r-pkg.org/badges/version/mrwater)](https://cran.r-project.org/package=mrwater) [![R build status](https://github.com/pik-piam/mrwater/workflows/check/badge.svg)](https://github.com/pik-piam/mrwater/actions) [![codecov](https://codecov.io/gh/pik-piam/mrwater/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrwater) [![r-universe](https://pik-piam.r-universe.dev/badges/mrwater)](https://pik-piam.r-universe.dev/builds) @@ -50,7 +50,7 @@ In case of questions / problems please contact Felicitas Beier . +Beier F, Heinke J, Karstens K, Bodirsky B, Dietrich J (2023). _mrwater: madrat based MAgPIE water Input Data Library_. R package version 1.9.24, . A BibTeX entry for LaTeX users is @@ -59,7 +59,7 @@ A BibTeX entry for LaTeX users is title = {mrwater: madrat based MAgPIE water Input Data Library}, author = {Felicitas Beier and Jens Heinke and Kristine Karstens and Benjamin Leon Bodirsky and Jan Philipp Dietrich}, year = {2023}, - note = {R package version 1.9.23}, + note = {R package version 1.9.24}, url = {https://github.com/pik-piam/mrwater}, } ```