From f5d4ac6ce9b77a7bdd47ddb717cf7e833fd5253c Mon Sep 17 00:00:00 2001 From: Chen Gong <> Date: Fri, 15 Dec 2023 18:29:00 +0100 Subject: [PATCH 1/4] adding detailed FE plot --- .../compareScenarios2/cs2_01_summary.Rmd | 39 ++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/inst/markdown/compareScenarios2/cs2_01_summary.Rmd b/inst/markdown/compareScenarios2/cs2_01_summary.Rmd index b5cb78ec..75737325 100644 --- a/inst/markdown/compareScenarios2/cs2_01_summary.Rmd +++ b/inst/markdown/compareScenarios2/cs2_01_summary.Rmd @@ -152,8 +152,33 @@ items <- c( "FE|Gases", "FE|Liquids", "FE|Solids", - NULL -) + NULL) + +showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed") +``` + +## FE by carrier (detailed) + +```{r FE by carrier (detailed)} +items <- c( + "FE|Industry|Electricity", + "FE|Industry|Hydrogen", + "FE|Industry|Heat", + "FE|Industry|Gases", + "FE|Industry|Liquids", + "FE|Industry|Solids", + "FE|Buildings|Electricity", + "FE|Buildings|Hydrogen", + "FE|Buildings|Heat", + "FE|Buildings|Gases", + "FE|Buildings|Liquids", + "FE|Buildings|Solids", + "FE|Transport|Electricity", + "FE|Transport|Hydrogen", + "FE|Transport|Gases", + "FE|Transport|Liquids", + NULL) + showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed") ``` @@ -167,8 +192,8 @@ items <- c( "FE|Industry|Gases", "FE|Industry|Liquids", "FE|Industry|Solids", - NULL - ) + NULL) + showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed") ``` @@ -183,6 +208,7 @@ items <- c( "FE|Buildings|Liquids", "FE|Buildings|Solids", NULL) + showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed") ``` @@ -195,6 +221,7 @@ items <- c( "FE|Transport|Gases", "FE|Transport|Liquids", NULL) + showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed") ``` @@ -207,8 +234,8 @@ items <- c( "FE|CDR|Hydrogen", "FE|CDR|Gases", "FE|CDR|Liquids", - NULL - ) + NULL) + showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed") ``` From 494c54a8506bab5c094d1d5827bc2aabd6e67d1f Mon Sep 17 00:00:00 2001 From: Chen Gong <> Date: Fri, 15 Dec 2023 18:34:39 +0100 Subject: [PATCH 2/4] reorder --- .../compareScenarios2/cs2_01_summary.Rmd | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/inst/markdown/compareScenarios2/cs2_01_summary.Rmd b/inst/markdown/compareScenarios2/cs2_01_summary.Rmd index 75737325..7de87b24 100644 --- a/inst/markdown/compareScenarios2/cs2_01_summary.Rmd +++ b/inst/markdown/compareScenarios2/cs2_01_summary.Rmd @@ -161,22 +161,22 @@ showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed") ```{r FE by carrier (detailed)} items <- c( + "FE|Transport|Electricity", + "FE|Buildings|Electricity", "FE|Industry|Electricity", + "FE|Transport|Hydrogen", + "FE|Buildings|Hydrogen", "FE|Industry|Hydrogen", "FE|Industry|Heat", - "FE|Industry|Gases", - "FE|Industry|Liquids", - "FE|Industry|Solids", - "FE|Buildings|Electricity", - "FE|Buildings|Hydrogen", "FE|Buildings|Heat", + "FE|Transport|Gases", "FE|Buildings|Gases", + "FE|Industry|Gases", + "FE|Transport|Liquids", "FE|Buildings|Liquids", + "FE|Industry|Liquids", "FE|Buildings|Solids", - "FE|Transport|Electricity", - "FE|Transport|Hydrogen", - "FE|Transport|Gases", - "FE|Transport|Liquids", + "FE|Industry|Solids", NULL) showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed") From 29d11a4939cc55722224c2c5f1f92da6a70a3b88 Mon Sep 17 00:00:00 2001 From: Chen Gong <> Date: Tue, 9 Jan 2024 17:27:00 -0600 Subject: [PATCH 3/4] version number --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- README.md | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index cd09b8c6..b44c1664 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '222568458' +ValidationKey: '222762990' 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 92840aca..2d177af4 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.128.3 -date-released: '2024-01-04' +version: 1.129.0 +date-released: '2024-01-09' abstract: Contains the REMIND-specific routines for data and model output manipulation. authors: - family-names: Rodrigues diff --git a/DESCRIPTION b/DESCRIPTION index 8489d0fa..09e5bd9f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: remind2 Title: The REMIND R package (2nd generation) -Version: 1.128.3 -Date: 2024-01-04 +Version: 1.129.0 +Date: 2024-01-09 Authors@R: c( person("Renato", "Rodrigues", , "renato.rodrigues@pik-potsdam.de", role = c("aut", "cre")), person("Lavinia", "Baumstark", role = "aut"), diff --git a/README.md b/README.md index b4a5d2a0..d678d227 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The REMIND R package (2nd generation) -R package **remind2**, version **1.128.3** +R package **remind2**, version **1.129.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, Weigmann P (2024). _remind2: The REMIND R package (2nd generation)_. R package version 1.129.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 and Pascal Weigmann}, year = {2024}, - note = {R package version 1.128.3}, + note = {R package version 1.129.0}, url = {https://github.com/pik-piam/remind2}, } ``` From 36bc28e5ad41b142cb767d0ff2e19187f296baa2 Mon Sep 17 00:00:00 2001 From: Jakob Duerrwaechter <44020564+JakobBD@users.noreply.github.com> Date: Fri, 12 Jan 2024 15:06:09 +0100 Subject: [PATCH 4/4] Adjust LCOE reporting to renamed variable vm_costInvTeAdj (#504) * adjust LCOE reporting to variable name change * buildLibrary --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- R/reportLCOE.R | 8 ++++---- README.md | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index b44c1664..104f2f9b 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '222762990' +ValidationKey: '222825036' 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 2d177af4..57270301 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.0 -date-released: '2024-01-09' +version: 1.129.2 +date-released: '2024-01-11' abstract: Contains the REMIND-specific routines for data and model output manipulation. authors: - family-names: Rodrigues diff --git a/DESCRIPTION b/DESCRIPTION index 09e5bd9f..06810329 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: remind2 Title: The REMIND R package (2nd generation) -Version: 1.129.0 -Date: 2024-01-09 +Version: 1.129.2 +Date: 2024-01-11 Authors@R: c( person("Renato", "Rodrigues", , "renato.rodrigues@pik-potsdam.de", role = c("aut", "cre")), person("Lavinia", "Baumstark", role = "aut"), diff --git a/R/reportLCOE.R b/R/reportLCOE.R index d7c70dca..fab39872 100644 --- a/R/reportLCOE.R +++ b/R/reportLCOE.R @@ -127,8 +127,8 @@ reportLCOE <- function(gdx, output.type = "both"){ p47_taxCO2eq_AggFE <- readGDX(gdx,"p47_taxCO2eq_AggFE", restore_zeros=F, react = "silent") ## variables - v_costInvTeDir <- readGDX(gdx,name=c("v_costInvTeDir","vm_costInvTeDir","v_directteinv"),field="l",format="first_found")[,ttot,] ## Total direct Investment Cost in Timestep - v_costInvTeAdj <- readGDX(gdx,name=c("v_costInvTeAdj"),field="l",format="first_found")[,ttot,] ## total adjustment cost in period + vm_costInvTeDir <- readGDX(gdx,name=c("vm_costInvTeDir","v_costInvTeDir","v_directteinv"),field="l",format="first_found")[,ttot,] ## Total direct Investment Cost in Timestep + vm_costInvTeAdj <- readGDX(gdx,name=c("vm_costInvTeAdj","v_costInvTeAdj"),field="l",format="first_found")[,ttot,] ## total adjustment cost in period vm_capEarlyReti <- readGDX(gdx,name=c("vm_capEarlyReti"),field="l",format="first_found")[,ttot,] vm_deltaCap <- readGDX(gdx,name=c("vm_deltaCap"),field="l",format="first_found")[,ttot,] vm_demPe <- readGDX(gdx,name=c("vm_demPe","v_pedem"),field="l",restore_zeros=FALSE,format="first_found") @@ -174,13 +174,13 @@ reportLCOE <- function(gdx, output.type = "both"){ te_inv_annuity <- 1e+12 * te_annuity[,,te] * mbind( v_investcost[,ttot_before2005,te] * dimSums(vm_deltaCap[teall2rlf][,ttot_before2005,te],dim=3.2), - v_costInvTeDir[,ttot_from2005,te] + vm_costInvTeDir[,ttot_from2005,te] ) te_inv_annuity_wadj <- 1e+12 * te_annuity[,,te] * mbind( v_investcost[,ttot_before2005,te] * dimSums(vm_deltaCap[teall2rlf][,ttot_before2005,te],dim=3.2), - v_costInvTeAdj[,ttot_from2005,te] + v_costInvTeDir[,ttot_from2005,te] + vm_costInvTeAdj[,ttot_from2005,te] + vm_costInvTeDir[,ttot_from2005,te] ) # average LCOE components ---- diff --git a/README.md b/README.md index d678d227..563f92c0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The REMIND R package (2nd generation) -R package **remind2**, version **1.129.0** +R package **remind2**, version **1.129.2** [![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.2, . 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.0}, + note = {R package version 1.129.2}, url = {https://github.com/pik-piam/remind2}, } ```