diff --git a/.buildlibrary b/.buildlibrary index 571a122b..ee3b434c 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '219284520' +ValidationKey: '219547800' 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 4059f861..3bae91f6 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.118.0 -date-released: '2023-09-14' +version: 1.119.0 +date-released: '2023-09-20' abstract: Contains the REMIND-specific routines for data and model output manipulation. authors: - family-names: Rodrigues diff --git a/DESCRIPTION b/DESCRIPTION index d46b21c5..57d91e75 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: remind2 Title: The REMIND R package (2nd generation) -Version: 1.118.0 -Date: 2023-09-14 +Version: 1.119.0 +Date: 2023-09-20 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 21c59ca5..5374abab 100644 --- a/R/reportEmi.R +++ b/R/reportEmi.R @@ -626,30 +626,67 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, t = c(seq(200 variable_postfix <- ' (Mt CO2/yr)' mixer <- tribble( - ~variable, ~secInd37, ~all_enty1, - '+|Solids', NULL, 'fesos', - '+|Liquids', NULL, 'fehos', - '+|Gases', NULL, 'fegas', - - '++|Cement', 'cement', NULL, - 'Cement|+|Solids', 'cement', 'fesos', - 'Cement|+|Liquids', 'cement', 'fehos', - 'Cement|+|Gases', 'cement', 'fegas', - - '++|Chemicals', 'chemicals', NULL, - 'Chemicals|+|Solids', 'chemicals', 'fesos', - 'Chemicals|+|Liquids', 'chemicals', 'fehos', - 'Chemicals|+|Gases', 'chemicals', 'fegas', - - '++|Steel', 'steel', NULL, - 'Steel|+|Solids', 'steel', 'fesos', - 'Steel|+|Liquids', 'steel', 'fehos', - 'Steel|+|Gases', 'steel', 'fegas', - - '++|Other Industry', 'otherInd', NULL, - 'Other Industry|+|Solids', 'otherInd', 'fesos', - 'Other Industry|+|Liquids', 'otherInd', 'fehos', - 'Other Industry|+|Gases', 'otherInd', 'fegas') %>% + ~variable, ~secInd37, ~all_enty, ~all_enty1, + '+|Solids', NULL, NULL, 'fesos', + '+|Liquids', NULL, NULL, 'fehos', + '+|Gases', NULL, NULL, 'fegas', + + 'Solids|+|Fossil', NULL, 'sesofos', 'fesos', + 'Solids|+|Biomass', NULL, 'sesobio', 'fesos', + 'Liquids|+|Fossil', NULL, 'seliqfos', 'fehos', + 'Liquids|+|Biomass', NULL, 'seliqbio', 'fehos', + 'Liquids|+|Synfuel', NULL, 'seliqsyn', 'fehos', + 'Gases|+|Fossil', NULL, 'segafos', 'fegas', + 'Gases|+|Biomass', NULL, 'segabio', 'fegas', + 'Gases|+|Synfuel', NULL, 'segasyn', 'fegas', + + '++|Cement', 'cement', NULL, NULL, + 'Cement|+|Solids', 'cement', NULL, 'fesos', + 'Cement|Solids|+|Fossil', 'cement', 'sesofos', 'fesos', + 'Cement|Solids|+|Biomass', 'cement', 'sesobio', 'fesos', + 'Cement|+|Liquids', 'cement', NULL, 'fehos', + 'Cement|Liquids|+|Fossil', 'cement', 'seliqfos', 'fehos', + 'Cement|Liquids|+|Biomass', 'cement', 'seliqbio', 'fehos', + 'Cement|Liquids|+|Synfuel', 'cement', 'seliqsyn', 'fehos', + 'Cement|+|Gases', 'cement', NULL, 'fegas', + 'Cement|Gases|+|Fossil', 'cement', 'segafos', 'fegas', + 'Cement|Gases|+|Biomass', 'cement', 'segabio', 'fegas', + 'Cement|Gases|+|Synfuel', 'cement', 'segasyn', 'fegas', + + '++|Chemicals', 'chemicals', NULL, NULL, + 'Chemicals|+|Solids', 'chemicals', NULL, 'fesos', + 'Chemicals|Solids|+|Fossil', 'chemicals', 'sesofos', 'fesos', + 'Chemicals|Solids|+|Biomass', 'chemicals', 'sesobio', 'fesos', + 'Chemicals|+|Liquids', 'chemicals', NULL, 'fehos', + 'Chemicals|Liquids|+|Fossil', 'chemicals', 'seliqfos', 'fehos', + 'Chemicals|Liquids|+|Biomass', 'chemicals', 'seliqbio', 'fehos', + 'Chemicals|Liquids|+|Synfuel', 'chemicals', 'seliqsyn', 'fehos', + 'Chemicals|+|Gases', 'chemicals', NULL, 'fegas', + 'Chemicals|Gases|+|Fossil', 'chemicals', 'segafos', 'fegas', + 'Chemicals|Gases|+|Biomass', 'chemicals', 'segabio', 'fegas', + 'Chemicals|Gases|+|Synfuel', 'chemicals', 'segasyn', 'fegas', + + '++|Steel', 'steel', NULL, NULL, + 'Steel|+|Solids', 'steel', NULL, 'fesos', + 'Steel|Solids|+|Fossil', 'steel', 'sesofos', 'fesos', + 'Steel|Solids|+|Biomass', 'steel', 'sesobio', 'fesos', + 'Steel|+|Liquids', 'steel', NULL, 'fehos', + 'Steel|Liquids|+|Fossil', 'steel', 'seliqfos', 'fehos', + 'Steel|Liquids|+|Biomass', 'steel', 'seliqbio', 'fehos', + 'Steel|Liquids|+|Synfuel', 'steel', 'seliqsyn', 'fehos', + 'Steel|+|Gases', 'steel', NULL, 'fegas', + 'Steel|Gases|+|Fossil', 'steel', 'segafos', 'fegas', + 'Steel|Gases|+|Biomass', 'steel', 'segabio', 'fegas', + 'Steel|Gases|+|Synfuel', 'steel', 'segasyn', 'fegas', + + '++|Other Industry', 'otherInd', NULL, NULL, + 'Other Industry|+|Solids', 'otherInd', NULL, 'fesos', + 'Other Industry|Solids|+|Fossil', 'otherInd', 'sesofos', 'fesos', + 'Other Industry|+|Liquids', 'otherInd', NULL, 'fehos', + 'Other Industry|Liquids|+|Fossil', 'otherInd', 'seliqfos', 'fehos', + 'Other Industry|+|Gases', 'otherInd', NULL, 'fegas', + 'Other Industry|Gases|+|Fossil', 'otherInd', 'segafos', 'fegas' +) %>% mutate( variable = paste0(variable_prefix, .data$variable, variable_postfix)) @@ -663,14 +700,15 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, t = c(seq(200 ( dimSums(mselect(EmiIndSubSec, x[setdiff(names(x), 'variable')]), dim = 3) - dimSums( - ( mselect(vm_emiIndCCS_Sub, x[setdiff(names(x), 'variable')]) + ( mselect(pm_IndstCO2Captured, x[setdiff(names(x), 'variable')]) * p_share_CCS ), dim = 3) ) * GtC_2_MtCO2, x[['variable']]) }) %>% - mbind()) + mbind() + ) # Baseline emission before CCS, corresponds to energy carbon content out <- mbind( diff --git a/README.md b/README.md index f21c5d31..08cce3d3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The REMIND R package (2nd generation) -R package **remind2**, version **1.118.0** +R package **remind2**, version **1.119.0** [![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 (2023). _remind2: The REMIND R package (2nd generation)_. R package version 1.119.0, . 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}, year = {2023}, - note = {R package version 1.118.0}, + note = {R package version 1.119.0}, url = {https://github.com/pik-piam/remind2}, } ```