diff --git a/.buildlibrary b/.buildlibrary index 25258910..cb58327a 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '28886995' +ValidationKey: '28906986' 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 67c0da13..12131702 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,7 +2,7 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'mrcommons: MadRat commons Input Data Library' -version: 1.44.5 +version: 1.44.6 date-released: '2024-09-25' abstract: Provides useful functions and a common structure to all the input data required to run models like MAgPIE and REMIND of model input data. diff --git a/DESCRIPTION b/DESCRIPTION index 7fe858ec..3219c5d7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mrcommons Type: Package Title: MadRat commons Input Data Library -Version: 1.44.5 +Version: 1.44.6 Date: 2024-09-25 Authors@R: c(person("Benjamin Leon", "Bodirsky", email = "bodirsky@pik-potsdam.de", role = "aut"), person("Kristine", "Karstens", role = "aut"), diff --git a/R/calcMAgPIEReport.R b/R/calcMAgPIEReport.R index d35ed9ab..8e531d6a 100644 --- a/R/calcMAgPIEReport.R +++ b/R/calcMAgPIEReport.R @@ -4,15 +4,30 @@ calcMAgPIEReport <- function(subtype) { x <- readSource("MAgPIE", subtype = "MAgPIEReport_extensive") if (subtype == "CostTotal") { - # with transformation factor from 10E6 US$2017 to 10E12 US$2017 - x <- x[, , "Costs Without Incentives (million US$2017/yr)"] / 1000 / 1000 - d <- "Total Landuse Costs from MAgPIE excluding emission costs" - u <- "T$2017/yr" + # with transformation factor from 10E6 US$2005 to 10E12 US$2005 + x <- x[, , "Costs Without Incentives (million US$05/yr)"] / 1000 / 1000 + # convert from US$2005 -> US$2017 + x <- GDPuc::convertGDP( + gdp = x, + unit_in = "constant 2005 US$MER", + unit_out = "constant 2017 Int$PPP", + replace_NAs = "with_USA" + ) + getNames(x) <- gsub("US\\$05", "US\\$17", getNames(x)) + u <- "trillion US$2017/yr" } else if (subtype == "CostMAC") { - # with transformation factor from 10E6 US$2017 to 10E12 US$2017 - x <- x[, , "Costs Accounting|+|MACCS (million US$2017/yr)"] / 1000 / 1000 + # with transformation factor from 10E6 US$2005 to 10E12 US$2005 + x <- x[, , "Costs Accounting|+|MACCS (million US$05/yr)"] / 1000 / 1000 + # convert from US$2005 -> US$2017 + x <- GDPuc::convertGDP( + gdp = x, + unit_in = "constant 2005 US$MER", + unit_out = "constant 2017 Int$PPP", + replace_NAs = "with_USA" + ) + getNames(x) <- gsub("US\\$05", "US\\$17", getNames(x)) d <- "MAC Costs for LU emissions from MAgPIE" - u <- "T$2017/yr" + u <- "trillion US$2017/yr" } else if (subtype == "ProductionBiomass") { x <- x[, , "Demand|Bioenergy|2nd generation|++|Bioenergy crops (EJ/yr)"] / 31.536 # EJ to TWa d <- "Production of ligno-cellulosic purpose grown biomass in MAgPIE" diff --git a/README.md b/README.md index 8b88c9c3..093fe164 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRat commons Input Data Library -R package **mrcommons**, version **1.44.5** +R package **mrcommons**, version **1.44.6** [![CRAN status](https://www.r-pkg.org/badges/version/mrcommons)](https://cran.r-project.org/package=mrcommons) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3822009.svg)](https://doi.org/10.5281/zenodo.3822009) [![R build status](https://github.com/pik-piam/mrcommons/workflows/check/badge.svg)](https://github.com/pik-piam/mrcommons/actions) [![codecov](https://codecov.io/gh/pik-piam/mrcommons/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrcommons) [![r-universe](https://pik-piam.r-universe.dev/badges/mrcommons)](https://pik-piam.r-universe.dev/builds) @@ -39,7 +39,7 @@ In case of questions / problems please contact Jan Philipp Dietrich , R package version 1.44.5, . +Bodirsky B, Karstens K, Baumstark L, Weindl I, Wang X, Mishra A, Wirth S, Stevanovic M, Steinmetz N, Kreidenweis U, Rodrigues R, Popov R, Humpenoeder F, Giannousakis A, Levesque A, Klein D, Araujo E, Beier F, Oeser J, Pehl M, Leip D, Crawford M, Molina Bacca E, von Jeetze P, Martinelli E, Schreyer F, Soergel B, Sauer P, Hötten D, Hasse R, Abrahão G, Weigmann P, Dietrich J (2024). _mrcommons: MadRat commons Input Data Library_. doi:10.5281/zenodo.3822009 , R package version 1.44.6, . A BibTeX entry for LaTeX users is @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is title = {mrcommons: MadRat commons Input Data Library}, author = {Benjamin Leon Bodirsky and Kristine Karstens and Lavinia Baumstark and Isabelle Weindl and Xiaoxi Wang and Abhijeet Mishra and Stephen Wirth and Mishko Stevanovic and Nele Steinmetz and Ulrich Kreidenweis and Renato Rodrigues and Roman Popov and Florian Humpenoeder and Anastasis Giannousakis and Antoine Levesque and David Klein and Ewerton Araujo and Felicitas Beier and Julian Oeser and Michaja Pehl and Debbora Leip and Michael Crawford and Edna {Molina Bacca} and Patrick {von Jeetze} and Eleonora Martinelli and Felix Schreyer and Bjoern Soergel and Pascal Sauer and David Hötten and Robin Hasse and Gabriel Abrahão and Pascal Weigmann and Jan Philipp Dietrich}, year = {2024}, - note = {R package version 1.44.5}, + note = {R package version 1.44.6}, url = {https://github.com/pik-piam/mrcommons}, doi = {10.5281/zenodo.3822009}, }