From a9f83aaa354a61325ce641557c184411c12cc2d0 Mon Sep 17 00:00:00 2001 From: Alois Dirnaichner Date: Wed, 29 Sep 2021 10:54:18 +0200 Subject: [PATCH] Being more flexible on the available SSP2 bunker trajectory for complex. --- .buildlibrary | 2 +- .zenodo.json | 2 +- DESCRIPTION | 4 ++-- R/readEDGETransport.R | 6 ++++-- README.md | 6 +++--- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index 0df78762..f2983730 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '14759338' +ValidationKey: '14779018' 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 07f0ee63..2e875dd5 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "mrremind: MadRat REMIND Input Data Package", - "version": "0.78.1", + "version": "0.78.2", "description": "

The mrremind packages contains data preprocessing for the REMIND model.<\/p>", "creators": [ { diff --git a/DESCRIPTION b/DESCRIPTION index aed5b3f8..b530581b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: mrremind Type: Package Title: MadRat REMIND Input Data Package -Version: 0.78.1 -Date: 2021-09-28 +Version: 0.78.2 +Date: 2021-09-29 Authors@R: c(person("Lavinia", "Baumstark", email = "lavinia@pik-potsdam.de", role = c("aut","cre")), person("Renato", "Rodrigues", role = "aut"), person("Antoine", "Levesque", role = "aut"), diff --git a/R/readEDGETransport.R b/R/readEDGETransport.R index 07ddfda4..214a6710 100644 --- a/R/readEDGETransport.R +++ b/R/readEDGETransport.R @@ -360,7 +360,7 @@ readEDGETransport <- function(subtype = "logit_exponent") { "f35_bunkers_fe" = { ## used only in transport complex. - # warning: currently assumes bunkers trajectories as fixed to "gdp_SSP2.ConvCase". Therefore bunkers are assumed unchanged in all gdp scenarios. + ## warning: currently assumes bunkers trajectories as fixed to the first trajectory found for "gdp_SSP2". Therefore bunkers are assumed unchanged in all gdp scenarios. tmp = EDGETrData_all$complexdem$iso_FEdem ## select only bunkers tmp = tmp[category == "Bunkers",] @@ -374,7 +374,9 @@ readEDGETransport <- function(subtype = "logit_exponent") { idxcols = c("GDP_scenario", "EDGE_scenario", "iso"), extrapolate = TRUE) ## create magpie object - tmp_data <- as.magpie(tmp, spatial = 3, temporal = 4, datacol = 5)[,,"gdp_SSP2.ConvCase"] + tmp_data <- as.magpie(tmp, spatial = 3, temporal = 4, datacol = 5) + ssp2_scen <- getNames(tmp_data[,, "gdp_SSP2"])[1] + tmp_data <- tmp_data[,, ssp2_scen] # for EU regions use JRC data instead JRC_reg <- c("MLT","EST","CYP","LVA","LTU","LUX","SVK","SVN","HRV","BGR","HUN","ROU","FIN","DNK","IRL","CZE","GRC","AUT","PRT","SWE","BEL","NLD","POL","ESP","ITA","GBR","FRA","DEU") JRC <- calcOutput("JRC_IDEES", subtype="Transport", aggregate = FALSE) diff --git a/README.md b/README.md index 460954fa..87109bf0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRat REMIND Input Data Package -R package **mrremind**, version **0.78.1** +R package **mrremind**, version **0.78.2** [![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