From e54b0b206421ad02488b2eae196afe1967ca6b1f Mon Sep 17 00:00:00 2001 From: Felix Schreyer Date: Tue, 19 Oct 2021 14:31:52 +0200 Subject: [PATCH] switch to UNFCCC data for the input data for LULUCF emissions country accounting --- R/calcEmiLULUCFCountryAcc.R | 16 ++++++++-------- R/fullREMIND.R | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) 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")