diff --git a/.buildlibrary b/.buildlibrary index 104f2f9b..7b548e7b 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '222825036' +ValidationKey: '222856062' 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 57270301..dbb36836 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: 'remind2: The REMIND R package (2nd generation)' -version: 1.129.2 -date-released: '2024-01-11' +version: 1.129.3 +date-released: '2024-01-12' abstract: Contains the REMIND-specific routines for data and model output manipulation. authors: - family-names: Rodrigues diff --git a/DESCRIPTION b/DESCRIPTION index 06810329..28b810ce 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: remind2 Title: The REMIND R package (2nd generation) -Version: 1.129.2 -Date: 2024-01-11 +Version: 1.129.3 +Date: 2024-01-12 Authors@R: c( person("Renato", "Rodrigues", , "renato.rodrigues@pik-potsdam.de", role = c("aut", "cre")), person("Lavinia", "Baumstark", role = "aut"), diff --git a/R/reportEmi.R b/R/reportEmi.R index 78902f69..a34c7e88 100644 --- a/R/reportEmi.R +++ b/R/reportEmi.R @@ -173,9 +173,9 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, t = c(seq(200 # total captured CO2 vm_co2capture <- readGDX(gdx, "vm_co2capture", field = "l", restore_zeros = F)[, t, ] - v33_emi <- readGDX(gdx, "v33_emi", field = "l", restore_zeros = F, react = "silent")[, t, ] + vm_emiCdrTeDetail <- readGDX(gdx, c("vm_emiCdrTeDetail","v33_emi"), field = "l", restore_zeros = F, react = "silent")[, t, ] - if (is.null(v33_emi)) { # compatibility with the CDR module before the portfolio was added + if (is.null(vm_emiCdrTeDetail)) { # compatibility with the CDR module before the portfolio was added # captured CO2 by DAC v33_emiDAC <- readGDX(gdx, "v33_emiDAC", field = "l", restore_zeros = F, react = "silent")[, t, ] if (is.null(v33_emiDAC)) { @@ -187,8 +187,8 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, t = c(seq(200 v33_emiEW <- new.magpie(getItems(vm_co2capture, "all_regi"), getItems(vm_co2capture, "ttot"), fill = 0) } # variable used in the rest of the reporting - v33_emi <- mbind(v33_emiDAC, v33_emiEW) - v33_emi <- setNames(v33_emi, c("dac", "weathering")) + vm_emiCdrTeDetail <- mbind(v33_emiDAC, v33_emiEW) + vm_emiCdrTeDetail <- setNames(vm_emiCdrTeDetail, c("dac", "weathering")) } # stored CO2 vm_co2CCS <- readGDX(gdx, "vm_co2CCS", field = "l", restore_zeros = F)[, t, ] @@ -1110,7 +1110,7 @@ if (!is.null(vm_plasticsCarbon)) { # vm_emiTeMkt is variable in REMIND closest to energy co2 emissions (dimSums(sel_vm_emiTeMkt_co2, dim = 3) # subtract non-BECCS CCU CO2 (i.e., non-CCS part of DAC) - - (1 - p_share_CCS) * (-v33_emi[, , "dac"]) + - (1 - p_share_CCS) * (-vm_emiCdrTeDetail[, , "dac"]) # deduce co2 captured by industrial processes which is not stored but used for CCU # -> gets accounted in industrial process emissions - vm_emiIndCCS[, , "co2cement_process"]*(1-p_share_CCS)) * GtC_2_MtCO2, @@ -1160,7 +1160,7 @@ if (!is.null(vm_plasticsCarbon)) { setNames(dimSums(vm_emiMacSector[, , "co2luc"], dim = 3) * GtC_2_MtCO2, "Emi|CO2|+|Land-Use Change (Mt CO2/yr)"), # negative emissions from (non-BECCS) CDR (DACCS, EW) - setNames((v33_emi[, , "weathering"] + v33_emi[, , "dac"] * p_share_CCS) * GtC_2_MtCO2, + setNames((vm_emiCdrTeDetail[, , "weathering"] + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS) * GtC_2_MtCO2, "Emi|CO2|+|non-BECCS CDR (Mt CO2/yr)") ) @@ -1193,7 +1193,7 @@ if (!is.null(vm_plasticsCarbon)) { setNames(dimSums(vm_emiMacSector[, , "co2luc"], dim = 3) * GtC_2_MtCO2, "Emi|CO2|+|Land-Use Change (Mt CO2/yr)"), # negative emissions from (non-BECCS) CDR (DACCS, EW) - setNames((v33_emi[, , "weathering"] + v33_emi[, , "dac"] * p_share_CCS) * GtC_2_MtCO2, + setNames((vm_emiCdrTeDetail[, , "weathering"] + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS) * GtC_2_MtCO2, "Emi|CO2|+|non-BECCS CDR (Mt CO2/yr)") ) @@ -1381,7 +1381,7 @@ if (!is.null(vm_plasticsCarbon)) { setNames(dimSums(vm_emiIndCCS[, , "co2cement_process"], dim = 3) * GtC_2_MtCO2, "Carbon Management|Carbon Capture|Industry Process|+|Cement (Mt CO2/yr)"), # total co2 captured by DAC - setNames(-v33_emi[, , "dac"] * GtC_2_MtCO2, + setNames(-vm_emiCdrTeDetail[, , "dac"] * GtC_2_MtCO2, "Carbon Management|Carbon Capture|+|DAC (Mt CO2/yr)"), # total co2 captured setNames(vm_co2capture * GtC_2_MtCO2, @@ -1744,7 +1744,7 @@ if (!is.null(vm_plasticsCarbon)) { "Emi|CO2|CDR|DACCS (Mt CO2/yr)"), # total EW # total co2 captured by EW - setNames(v33_emi[, , "weathering"] * GtC_2_MtCO2, + setNames(vm_emiCdrTeDetail[, , "weathering"] * GtC_2_MtCO2, "Emi|CO2|CDR|EW (Mt CO2/yr)")) out <- mbind(out, @@ -1783,7 +1783,7 @@ if (!is.null(vm_plasticsCarbon)) { "Emi|CO2|CDR|DACCS (Mt CO2/yr)"), # total EW # total co2 captured by EW - setNames(v33_emi[, , "weathering"] * GtC_2_MtCO2, + setNames(vm_emiCdrTeDetail[, , "weathering"] * GtC_2_MtCO2, "Emi|CO2|CDR|EW (Mt CO2/yr)")) out <- mbind(out, @@ -2397,7 +2397,7 @@ if (!is.null(vm_plasticsCarbon)) { # CDR energy-related emissions (dimSums(mselect(EmiFeCarrier[, , "ETS"], emi_sectors = "CDR"), dim = 3) # Captured CO2 by non-BECCS capture technologies - + (v33_emi[, , "weathering"] + v33_emi[, , "dac"] * p_share_CCS)) * GtC_2_MtCO2, + + (vm_emiCdrTeDetail[, , "weathering"] + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS)) * GtC_2_MtCO2, "Emi|GHG|ETS|+|non-BECCS CDR (Mt CO2eq/yr)"), # Extraction diff --git a/README.md b/README.md index 563f92c0..7bac9b32 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The REMIND R package (2nd generation) -R package **remind2**, version **1.129.2** +R package **remind2**, version **1.129.3** [![CRAN status](https://www.r-pkg.org/badges/version/remind2)](https://cran.r-project.org/package=remind2) [![R build status](https://github.com/pik-piam/remind2/workflows/check/badge.svg)](https://github.com/pik-piam/remind2/actions) [![codecov](https://codecov.io/gh/pik-piam/remind2/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/remind2) [![r-universe](https://pik-piam.r-universe.dev/badges/remind2)](https://pik-piam.r-universe.dev/builds) @@ -49,7 +49,7 @@ In case of questions / problems please contact Renato Rodrigues . +Rodrigues R, Baumstark L, Benke F, Dietrich J, Dirnaichner A, Führlich P, Giannousakis A, Hasse R, Hilaire J, Klein D, Koch J, Kowalczyk K, Levesque A, Malik A, Merfort A, Merfort L, Morena-Leiva S, Pehl M, Pietzcker R, Rauner S, Richters O, Rottoli M, Schötz C, Schreyer F, Siala K, Sörgel B, Spahr M, Strefler J, Verpoort P, Weigmann P (2024). _remind2: The REMIND R package (2nd generation)_. R package version 1.129.3, . A BibTeX entry for LaTeX users is @@ -58,7 +58,7 @@ A BibTeX entry for LaTeX users is title = {remind2: The REMIND R package (2nd generation)}, author = {Renato Rodrigues and Lavinia Baumstark and Falk Benke and Jan Philipp Dietrich and Alois Dirnaichner and Pascal Führlich and Anastasis Giannousakis and Robin Hasse and Jérome Hilaire and David Klein and Johannes Koch and Katarzyna Kowalczyk and Antoine Levesque and Aman Malik and Anne Merfort and Leon Merfort and Simón Morena-Leiva and Michaja Pehl and Robert Pietzcker and Sebastian Rauner and Oliver Richters and Marianna Rottoli and Christof Schötz and Felix Schreyer and Kais Siala and Björn Sörgel and Mike Spahr and Jessica Strefler and Philipp Verpoort and Pascal Weigmann}, year = {2024}, - note = {R package version 1.129.2}, + note = {R package version 1.129.3}, url = {https://github.com/pik-piam/remind2}, } ```