From ec4630c470a185f87878c605f7d0d7a75b1aee54 Mon Sep 17 00:00:00 2001 From: Lavinia Baumstark Date: Fri, 2 Feb 2024 10:09:24 +0100 Subject: [PATCH] adjust reporting according to https://github.com/remindmodel/remind/pull/1509 --- R/reportCosts.R | 2 +- R/reportLCOE.R | 4 ++-- R/reportPrices.R | 4 ++-- R/reportTax.R | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/reportCosts.R b/R/reportCosts.R index 4421fc43..d243456f 100644 --- a/R/reportCosts.R +++ b/R/reportCosts.R @@ -132,7 +132,7 @@ reportCosts <- function(gdx,output=NULL,regionSubsetList=NULL,t=c(seq(2005,2060, vm_demFeSector <- readGDX(gdx,name=c("vm_demFeSector"),field="l",restore_zeros=FALSE,format="first_found") demFeIndst.m <- readGDX(gdx,name=c("q37_demFeIndst"),types="equations",restore_zeros=FALSE,field="m",format="first_found") demFeBuild.m <- readGDX(gdx,name=c("q36_demFeBuild"),types="equations",restore_zeros=FALSE,field="m",format="first_found") - balFe.m <- readGDX(gdx,name=c("qm_balFe","q_balFe"),types="equations",restore_zeros=FALSE,field="m",format="first_found") + balFe.m <- readGDX(gdx,name=c("q_balFe","qm_balFe"),types="equations",restore_zeros=FALSE,field="m",format="first_found") #balFeCDR.m <- readGDX(gdx,name=c("q33_balFeCDR"),types="equations",restore_zeros=FALSE,field="m",format="first_found") #febalForUe.m <- dimReduce(febalForUe.m, dim_exclude = 2) demFeTrans.m <- readGDX(gdx,name=c("q35_demFeTrans"),types="equations",restore_zeros=FALSE,field="m",format="first_found") diff --git a/R/reportLCOE.R b/R/reportLCOE.R index fab39872..48f6b7e6 100644 --- a/R/reportLCOE.R +++ b/R/reportLCOE.R @@ -1189,8 +1189,8 @@ df.co2price.weighted <- df.pomeg.expand %>% sector.mapping <- c("build" = "buildings", "indst" = "industry", "trans" = "transport") - pm_tau_fe_tax <- readGDX(gdx, "pm_tau_fe_tax", restore_zeros = F) - pm_tau_fe_sub <- readGDX(gdx, "pm_tau_fe_sub", restore_zeros = F) + pm_tau_fe_tax <- readGDX(gdx, c("p21_tau_fe_tax","pm_tau_fe_tax"), restore_zeros = F) + pm_tau_fe_sub <- readGDX(gdx, c("p21_tau_fe_sub","pm_tau_fe_sub"), restore_zeros = F) df.taxrate <- as.quitte(pm_tau_fe_tax * 1.2 / s_twa2mwh * 1e12) %>% rename(taxrate = value) diff --git a/R/reportPrices.R b/R/reportPrices.R index ee3898d3..2f3fbfb5 100644 --- a/R/reportPrices.R +++ b/R/reportPrices.R @@ -552,8 +552,8 @@ reportPrices <- function(gdx, output=NULL, regionSubsetList=NULL, "indst.fehos", "indst.fesos", "indst.feels", "indst.feh2s", "indst.fegas", "build.fepet", "indst.fepet" ) - pm_tau_fe_tax <- readGDX(gdx, "pm_tau_fe_tax")[, YearsFrom2005, entyFe2Sector] # [tr USD2005/TWa] - pm_tau_fe_sub <- readGDX(gdx, "pm_tau_fe_sub")[, YearsFrom2005, entyFe2Sector] # [tr USD2005/TWa] + pm_tau_fe_tax <- readGDX(gdx, c("p21_tau_fe_tax","pm_tau_fe_tax"))[, YearsFrom2005, entyFe2Sector] # [tr USD2005/TWa] + pm_tau_fe_sub <- readGDX(gdx, c("p21_tau_fe_sub","pm_tau_fe_sub"))[, YearsFrom2005, entyFe2Sector] # [tr USD2005/TWa] price.tax <- (pm_tau_fe_tax + pm_tau_fe_sub) / s_twa2mwh / 3.6 * 1e12 # [USD2005/GJ] out <- mbind( diff --git a/R/reportTax.R b/R/reportTax.R index c034eaee..a9396d90 100644 --- a/R/reportTax.R +++ b/R/reportTax.R @@ -45,8 +45,8 @@ reportTax <- function(gdx,output=NULL,regionSubsetList=NULL,t=c(seq(2005,2060,5) out <- NULL ### FE taxes/subsidies per sector - fe_tax <- readGDX(gdx, name=c("pm_tau_fe_tax"), format="first_found", react = "silent")[,t,] * tdptwyr2dpgj - fe_sub <- readGDX(gdx, name=c("pm_tau_fe_sub"), format="first_found", react = "silent")[,t,] * tdptwyr2dpgj + fe_tax <- readGDX(gdx, name=c("p21_tau_fe_tax","pm_tau_fe_tax"), format="first_found", react = "silent")[,t,] * tdptwyr2dpgj + fe_sub <- readGDX(gdx, name=c("p21_tau_fe_sub","pm_tau_fe_sub"), format="first_found", react = "silent")[,t,] * tdptwyr2dpgj vm_demFeSector <- readGDX(gdx,name=c("vm_demFeSector"),field="l",format="first_found",restore_zeros=FALSE)[,t,]*TWa_2_EJ vm_demFeSector[is.na(vm_demFeSector)] <- 0