From 9c790b5cdd114ecdca0e9c273dff45a57d399c7d Mon Sep 17 00:00:00 2001 From: Alois Dirnaichner Date: Wed, 29 Sep 2021 14:55:31 +0200 Subject: [PATCH] Add flexibility in the selection of a proxy for LDV shares for complex. --- .buildlibrary | 2 +- .zenodo.json | 2 +- DESCRIPTION | 2 +- R/convertEDGETransport.R | 5 +++-- README.md | 6 +++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index f2983730..f355560f 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '14779018' +ValidationKey: '14797917' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/.zenodo.json b/.zenodo.json index 2e875dd5..ecfe6942 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "mrremind: MadRat REMIND Input Data Package", - "version": "0.78.2", + "version": "0.78.3", "description": "

The mrremind packages contains data preprocessing for the REMIND model.<\/p>", "creators": [ { diff --git a/DESCRIPTION b/DESCRIPTION index b530581b..fad069fc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mrremind Type: Package Title: MadRat REMIND Input Data Package -Version: 0.78.2 +Version: 0.78.3 Date: 2021-09-29 Authors@R: c(person("Lavinia", "Baumstark", email = "lavinia@pik-potsdam.de", role = c("aut","cre")), person("Renato", "Rodrigues", role = "aut"), diff --git a/R/convertEDGETransport.R b/R/convertEDGETransport.R index 578da003..2d4548c8 100644 --- a/R/convertEDGETransport.R +++ b/R/convertEDGETransport.R @@ -43,8 +43,9 @@ convertEDGETransport = function(x, subtype) { if (subtype %in% c("shares_LDV_transport")) { - ## only ConvCase SSP2 (ICE predominant LDV market and road market) is used as input data - x <- x[,,"gdp_SSP2.ConvCase.share_LDV_totliq", pmatch = TRUE] + ## only the first EDGE-T scenario for SSP2 is used as a proxy for the LDV shares + varname_SSP2 <- getNames(x[,, "gdp_SSP2"])[1] + x <- x[,, varname_SSP2] for (year in getYears(x, as.integer = T)){ x[,year,] <- as.vector(x[,c(2010),]) + ((0.55 - as.vector(x[,c(2010),]))/(2100-2010))*(year-2010) diff --git a/README.md b/README.md index 87109bf0..2f0bce7d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRat REMIND Input Data Package -R package **mrremind**, version **0.78.2** +R package **mrremind**, version **0.78.3** [![CRAN status](https://www.r-pkg.org/badges/version/mrremind)](https://cran.r-project.org/package=mrremind) [![R build status](https://github.com/pik-piam/mrremind/workflows/check/badge.svg)](https://github.com/pik-piam/mrremind/actions) [![codecov](https://codecov.io/gh/pik-piam/mrremind/branch/master/graph/badge.svg)](https://codecov.io/gh/pik-piam/mrremind) [![r-universe](https://pik-piam.r-universe.dev/badges/mrremind)](https://pik-piam.r-universe.dev/ui#builds) @@ -38,7 +38,7 @@ In case of questions / problems please contact Lavinia Baumstark