diff --git a/.buildlibrary b/.buildlibrary index 91c9f3fc..294c445b 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '232787844' +ValidationKey: '232919820' AcceptedWarnings: - .*following variables are expected in the piamInterfaces.* - Summation checks have revealed some gaps.* diff --git a/CITATION.cff b/CITATION.cff index 26455bd5..66edf6d6 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.160.4 -date-released: '2024-12-04' +version: 1.161.0 +date-released: '2024-12-05' abstract: Contains the REMIND-specific routines for data and model output manipulation. authors: - family-names: Rodrigues diff --git a/DESCRIPTION b/DESCRIPTION index 8301eca5..13d7344e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: remind2 Title: The REMIND R package (2nd generation) -Version: 1.160.4 -Date: 2024-12-04 +Version: 1.161.0 +Date: 2024-12-05 Authors@R: c( person("Renato", "Rodrigues", , "renato.rodrigues@pik-potsdam.de", role = c("aut", "cre")), person("Lavinia", "Baumstark", role = "aut"), diff --git a/R/reportSE.R b/R/reportSE.R index 2f6b10fb..57cac3af 100644 --- a/R/reportSE.R +++ b/R/reportSE.R @@ -221,7 +221,7 @@ reportSE <- function(gdx, regionSubsetList = NULL, t = c(seq(2005, 2060, 5), seq se.prod( vm_prodSe, dataoc, oc2te, entySe, "pewin", "seel", te = c(windonStr, "windoff"), name = "SE|Electricity|+|Wind (EJ/yr)"), se.prod( vm_prodSe, dataoc, oc2te, entySe, "pewin", "seel", te = windonStr, name = "SE|Electricity|Wind|+|Onshore (EJ/yr)"), se.prod( vm_prodSe, dataoc, oc2te, entySe, "pewin", "seel", te = "windoff", name = "SE|Electricity|Wind|+|Offshore (EJ/yr)"), - + se.prodLoss(vm_prodSe, dataoc, oc2te, entySe, "pewin", "seel", te = c(windonStr, "windoff"), name = "SE|Electricity|Curtailment|+|Wind (EJ/yr)"), se.prodLoss(vm_prodSe, dataoc, oc2te, entySe, "pewin", "seel", te = windonStr, name = "SE|Electricity|Curtailment|Wind|+|Onshore (EJ/yr)"), se.prodLoss(vm_prodSe, dataoc, oc2te, entySe, "pewin", "seel", te = "windoff", name = "SE|Electricity|Curtailment|Wind|+|Offshore (EJ/yr)") @@ -354,7 +354,7 @@ reportSE <- function(gdx, regionSubsetList = NULL, t = c(seq(2005, 2060, 5), seq "SE|Gases|Hydrogen|Net Imports (EJ/yr)")) } - # SE Demand Flows ---- + ## SE Demand Flows ---- # SE|Input|X|Y variables denote the demand of energy carrier X # flowing into sector/production of Y. @@ -392,7 +392,7 @@ reportSE <- function(gdx, regionSubsetList = NULL, t = c(seq(2005, 2060, 5), seq # SE electricity use ### calculation of electricity use for own consumption of energy system - vm_prodFe <- readGDX(gdx, "vm_prodFe", field = "l", restore_zeros = FALSE) + vm_prodFe <- readGDX(gdx, "vm_prodFe", field = "l", restore_zeros = FALSE) * pm_conv_TWa_EJ # all energy values are first converted to EJ vm_co2CCS <- readGDX(gdx, "vm_co2CCS", field = "l", restore_zeros = FALSE) # filter for coupled production coefficents which consume seel @@ -404,7 +404,7 @@ reportSE <- function(gdx, regionSubsetList = NULL, t = c(seq(2005, 2060, 5), seq # FE and SE production that has own consumption of electricity # calculate vm_prodSe back to TWa (was in EJ before), but prod couple coefficient is defined in TWa(input)/Twa(output) - prodOwnCons <- mbind(vm_prodFe, vm_prodSe / pm_conv_TWa_EJ)[, , getNames(CoeffOwnConsSeel_woCCS, dim = 3)] + prodOwnCons <- mbind(vm_prodFe / pm_conv_TWa_EJ, vm_prodSe / pm_conv_TWa_EJ)[, , getNames(CoeffOwnConsSeel_woCCS, dim = 3)] tmp1 <- mbind(tmp1, setNames( -pm_conv_TWa_EJ * @@ -476,7 +476,13 @@ reportSE <- function(gdx, regionSubsetList = NULL, t = c(seq(2005, 2060, 5), seq setNames(dimSums(mselect(vm_demSe, all_enty = "seel", all_enty1 = "seh2", all_te = "elh2"), dim = 3), "SE|Input|Electricity|Hydrogen|+|Standard Electrolysis (EJ/yr)"), setNames(dimSums(mselect(vm_demSe, all_enty = "seel", all_enty1 = "seh2", all_te = "elh2VRE"), dim = 3), - "SE|Input|Electricity|Hydrogen|+|VRE Storage (EJ/yr)") + "SE|Input|Electricity|Hydrogen|+|VRE Storage (EJ/yr)"), + setNames(dimSums(vm_demSe[,,"feels"] + vm_demSe[,,"feelt"], dim = 3) - + dimSums(vm_prodFe[,,"feels"] + vm_prodFe[,,"feelt"], dim = 3), + "SE|Input|Electricity|T&D losses (EJ/yr)"), + setNames(dimSums(vm_demSe[,,"feels"] * (1 - pm_eta_conv[,,"tdels"]) , dim = 3) + + dimSums(vm_demSe[,,"feelt"] * (1 - pm_eta_conv[,,"tdelt"]) , dim = 3), + "SE|Electricity|Transmission Losses (EJ/yr)") # this variable name was used before and might still be needed by some templates ) # electricity for specific H2 usages @@ -508,11 +514,20 @@ reportSE <- function(gdx, regionSubsetList = NULL, t = c(seq(2005, 2060, 5), seq p_shareElec_H2 / mselect(pm_eta_conv, all_te = "elh2"), "SE|Input|Electricity|Hydrogen|Synthetic Fuels|+|Gases (EJ/yr)")) - - # transmission losses from se2fe conversion of electricity + # other t&d losses tmp1 <- mbind(tmp1, - setNames(dimSums(vm_demSe[, , "tdels"] * (1 - pm_eta_conv[, , "tdels"]), dim = 3), - "SE|Electricity|Transmission Losses (EJ/yr)")) + setNames(dimSums(vm_demSe[,,"fegas"] + vm_demSe[,,"fegat"] - vm_prodFe[,,"fegas"] - vm_prodFe[,,"fegat"], dim = 3), + "SE|Input|Gases|T&D losses (EJ/yr)"), + setNames(dimSums(vm_demSe[,,"fehes"] - vm_prodFe[,,"fehes"], dim = 3), + "SE|Input|Heat|T&D losses (EJ/yr)"), + setNames(dimSums(vm_demSe[,,"fehos"] + vm_demSe[,,"fepet"] + vm_demSe[,,"fedie"] + - vm_prodFe[,,"fehos"] - vm_prodFe[,,"fepet"] - vm_prodFe[,,"fedie"], dim = 3), + "SE|Input|Liquids|T&D losses (EJ/yr)"), + setNames(dimSums(vm_demSe[,,"feh2s"] + vm_demSe[,,"feh2t"] - vm_prodFe[,,"feh2s"] - vm_prodFe[,,"feh2t"], dim = 3), + "SE|Input|Hydrogen|T&D losses (EJ/yr)"), + setNames(dimSums(vm_demSe[,,"fesos"] - vm_prodFe[,,"fesos"], dim = 3), + "SE|Input|Solids|T&D losses (EJ/yr)") + ) # add global values out <- mbind(tmp1, dimSums(tmp1, dim = 1)) diff --git a/README.md b/README.md index e2ef279f..3afefa24 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The REMIND R package (2nd generation) -R package **remind2**, version **1.160.4** +R package **remind2**, version **1.161.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, Duerrwaechter J, 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, Rüter T (2024). _remind2: The REMIND R package (2nd generation)_. R package version 1.161.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 Jakob Duerrwaechter 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 and Tonn Rüter}, year = {2024}, - note = {R package version 1.160.4}, + note = {R package version 1.161.0}, url = {https://github.com/pik-piam/remind2}, } ```