diff --git a/.buildlibrary b/.buildlibrary index 880e834d..a74a910f 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '15888600' +ValidationKey: '15910879' 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 5d60bb02..ec89fd4b 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "mrremind: MadRat REMIND Input Data Package", - "version": "0.84.0", + "version": "0.84.1", "description": "

The mrremind packages contains data preprocessing for the REMIND model.<\/p>", "creators": [ { diff --git a/DESCRIPTION b/DESCRIPTION index bde3fd9a..93152f9d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: mrremind Type: Package Title: MadRat REMIND Input Data Package -Version: 0.84.0 -Date: 2021-10-15 +Version: 0.84.1 +Date: 2021-10-19 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/calcEmiLULUCFCountryAcc.R b/R/calcEmiLULUCFCountryAcc.R index f8c63dd2..1595f0ab 100644 --- a/R/calcEmiLULUCFCountryAcc.R +++ b/R/calcEmiLULUCFCountryAcc.R @@ -10,16 +10,16 @@ calcEmiLULUCFCountryAcc <- function(subtype){ - if (subtype=="PRIMAPhist") { + if (subtype=="UNFCCC") { - # take PRIMAPhist LULUCF data for now - # note: these historical LULUCF emissions data correspond neither to UNFCCC (https://di.unfccc.int/detailed_data_by_party) - # nor to EEA (https://cdr.eionet.europa.eu/de/eu/mmr/art07_inventory/ghg_inventory/envxh8awg/index_html?&page=1) - primap <- readSource("PRIMAPhist","hist") + # read in UNFCCC CRF emissions data + unfccc <- readSource("UNFCCC") - # LULUCF CO2 emissions from PRIMAP hist database from 1990 to 2015, convert to Mt CO2/yr - out <- dimReduce(primap[,paste0("y",seq(1990,2015,1)),"co2_c"][,,"CAT5"]) / 12*44 + # LULUCF CO2 emissions from UNFCCC database from, convert to Mt CO2/yr + out <- collapseNames(unfccc[,,"Total LULUCF|CO2"]) / 1000 + # replace NA by 0 + out[is.na(out)] <- 0 } else { "Please define a valid subtype for this function." @@ -30,7 +30,7 @@ calcEmiLULUCFCountryAcc <- function(subtype){ list(x=out, weight=NULL, unit="Mt CO2/yr", - description="Historical LULUCF CO2 emissions data following country accounting taken from PRIMAPhist database") + description="Historical LULUCF CO2 emissions data following country accounting taken from UNFCCC database") ) } diff --git a/R/fullREMIND.R b/R/fullREMIND.R index d9a6a8dc..b03c6fff 100644 --- a/R/fullREMIND.R +++ b/R/fullREMIND.R @@ -83,7 +83,7 @@ fullREMIND <- function(rev=0) { calcOutput('GAINSEmi', subtype="emission_factors", round=5, file="ef_gains.cs4r") calcOutput('GAINSEmi', subtype="emissions_starting_values", round=5, file="f11_emiAPexsolve.cs4r") calcOutput("EmissionFactors",subtype="emission_factors", round=5, file="f11_emiFacAP.cs4r") - calcOutput("EmiLULUCFCountryAcc",subtype="PRIMAPhist", round=5, file="p_EmiLULUCFCountryAcc.cs4r") + calcOutput("EmiLULUCFCountryAcc",subtype="UNFCCC", round=5, file="p_EmiLULUCFCountryAcc.cs4r") #-------------- energy/technology parameters --------------------------------------------------------- calcOutput("PotentialHydro", round=3, file="f_maxProdGradeRegiHydro.cs3r") diff --git a/README.md b/README.md index 32cbfd2b..6ef7e9b5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRat REMIND Input Data Package -R package **mrremind**, version **0.84.0** +R package **mrremind**, version **0.84.1** [![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