From eaf6378fc0195f0864e65bbc31bb7d1245ae3ee4 Mon Sep 17 00:00:00 2001 From: Alois Dirnaichner Date: Wed, 29 Sep 2021 16:15:52 +0200 Subject: [PATCH] Provide a flexible read-in of complex LDV share trajectories. --- .buildlibrary | 2 +- .zenodo.json | 2 +- DESCRIPTION | 2 +- R/convertEDGE.R | 5 +++-- README.md | 6 +++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index f355560f..31bd586c 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '14797917' +ValidationKey: '14816816' 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 ecfe6942..4486f8d0 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "mrremind: MadRat REMIND Input Data Package", - "version": "0.78.3", + "version": "0.78.4", "description": "

The mrremind packages contains data preprocessing for the REMIND model.<\/p>", "creators": [ { diff --git a/DESCRIPTION b/DESCRIPTION index fad069fc..c8b151b3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mrremind Type: Package Title: MadRat REMIND Input Data Package -Version: 0.78.3 +Version: 0.78.4 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/convertEDGE.R b/R/convertEDGE.R index a94fe22a..f797e89d 100644 --- a/R/convertEDGE.R +++ b/R/convertEDGE.R @@ -202,8 +202,9 @@ convertEDGE <- function(x, subtype = "FE_stationary") { # for years after 2015 assume LDV share constant and eqaul to JRC 2015 values y2 <- getYears(share)[getYears(share, as.integer = TRUE)>2015] JRC_share[,y2,] <- JRC_share[,2015,] - #setting EU shares equal to JRC values - share[JRC_reg,getYears(JRC_share),"gdp_SSP2.ConvCase.share_LDV_totliq.shares_LDV_transport"] <- JRC_share[JRC_reg,getYears(JRC_share),] + ## setting EU shares equal to JRC values + varname_SSP2 <- getNames(share[,, "gdp_SSP2"])[1] + share[JRC_reg,getYears(JRC_share), varname_SSP2] <- JRC_share[JRC_reg,getYears(JRC_share),] # redefining LDV and non-LDV liquids feTotal <- dimSums(result[,,c("fepet","fedie")],dim=3.2) feShares <- new.magpie(cells_and_regions = getRegions(share), years = intersect(getYears(share),getYears(result)), names = getNames(result[,,c("fepet","fedie")])) diff --git a/README.md b/README.md index 2f0bce7d..8ef4c6ec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRat REMIND Input Data Package -R package **mrremind**, version **0.78.3** +R package **mrremind**, version **0.78.4** [![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