From 3ddfa02d38cc5140f7b2ba3814e80cdc3fea8fef Mon Sep 17 00:00:00 2001 From: David Klein Date: Sat, 9 Nov 2024 15:31:03 +0100 Subject: [PATCH 1/2] Bugfix: added SSP2_lowen to more subtypes where missing --- R/calcMacBaseLandUse.R | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/R/calcMacBaseLandUse.R b/R/calcMacBaseLandUse.R index 1bf9cc81..8db5d30f 100644 --- a/R/calcMacBaseLandUse.R +++ b/R/calcMacBaseLandUse.R @@ -28,7 +28,7 @@ calcMacBaseLandUse <- function(subtype) { y <- add_dimension(y, dim = 3.2, add = "c_LU_emi_scen", - nm = c("SSP1", "SSP2", "SSP3", "SSP5", "SDP", "SDP_EI", "SDP_RC", "SDP_MC", "SSP2EU")) + nm = c("SSP1", "SSP2", "SSP3", "SSP5", "SDP", "SDP_EI", "SDP_RC", "SDP_MC", "SSP2EU","SSP2_lowEn")) y <- add_dimension(y, dim = 3.3, add = "rcp", @@ -83,6 +83,11 @@ calcMacBaseLandUse <- function(subtype) { getNames(tmp) <- gsub("SSP2", "SSP3", getNames(tmp)) x <- mbind(x, tmp) + # add values for SSP2_lowEn copying the values from SSP2 + tmp <- x[,,"SSP2"] + getNames(tmp) <- gsub("SSP2", "SSP2_lowEn", getNames(tmp)) + x <- mbind(x, tmp) + # Replace CH4 and N2O LUC baseline for SSP2 and SSP1, since there is newer data from a # coupled REMIND-MAgPIE 4.0 Baseline run # Read ch4 and n2o emissions from MAgpIE Base scenario @@ -214,6 +219,11 @@ calcMacBaseLandUse <- function(subtype) { getNames(tmp) <- gsub("SSP2", "SSP3", getNames(tmp)) x <- mbind(x, tmp) + # add values for SSP2_lowEn copying the values from SSP2 + tmp <- x[,,"SSP2"] + getNames(tmp) <- gsub("SSP2", "SSP2_lowEn", getNames(tmp)) + x <- mbind(x, tmp) + } else { stop("Unkown subtype: ", subtype) } From a264aa9f455ab4eaaac079c8036bcf0a99ccbd59 Mon Sep 17 00:00:00 2001 From: David Klein Date: Sat, 9 Nov 2024 16:02:21 +0100 Subject: [PATCH 2/2] build library --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index 3a7699ab..5cd0878b 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '29291170' +ValidationKey: '29312668' 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 6d574d42..3e805a05 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: 'mrcommons: MadRat commons Input Data Library' -version: 1.46.2 -date-released: '2024-11-08' +version: 1.46.3 +date-released: '2024-11-09' 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. authors: diff --git a/DESCRIPTION b/DESCRIPTION index 22ef74ce..0a94d426 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: mrcommons Type: Package Title: MadRat commons Input Data Library -Version: 1.46.2 -Date: 2024-11-08 +Version: 1.46.3 +Date: 2024-11-09 Authors@R: c(person("Benjamin Leon", "Bodirsky", email = "bodirsky@pik-potsdam.de", role = "aut"), person("Kristine", "Karstens", role = "aut"), person("Lavinia", "Baumstark", role = "aut"),