Skip to content

Commit

Permalink
change unit in price variables to US017
Browse files Browse the repository at this point in the history
  • Loading branch information
fbenke-pik committed Sep 23, 2024
1 parent 13d9b96 commit b21fe34
Show file tree
Hide file tree
Showing 6 changed files with 319 additions and 319 deletions.
8 changes: 4 additions & 4 deletions R/reportCapitalStock.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ reportCapitalStock <- function(gdx,regionSubsetList=NULL,t=c(seq(2005,2060,5),se
if (tran_mod == "complex"){
LDV35 <- readGDX(gdx,name=c("LDV35"),format="first_found")
tmp <- mbind(tmp,setNames(dimSums( (vm_cap * v_investcost)[teue2rlf]
,dim=c(3.1,3.2)) * 1000, "Est Capital Stock|ESM|Transp vehic (billion US$2005)"))
,dim=c(3.1,3.2)) * 1000, "Est Capital Stock|ESM|Transp vehic (billion US$2017)"))
tmp <- mbind(tmp,setNames(dimSums( (vm_cap * v_investcost)[teall2rlf][,,LDV35]
,dim=c(3.1,3.2)) * 1000, "Est Capital Stock|ESM|Pet/EV LDV (billion US$2005)"))
,dim=c(3.1,3.2)) * 1000, "Est Capital Stock|ESM|Pet/EV LDV (billion US$2017)"))

tmp <- mbind(tmp,
setNames(
dimSums(mbind(vm_cap * v_investcost),
dim = 3) * 1000,
"Estimated Capital Stock|ESM (billion US$2005)"
"Estimated Capital Stock|ESM (billion US$2017)"
)
)

Expand Down Expand Up @@ -124,7 +124,7 @@ reportCapitalStock <- function(gdx,regionSubsetList=NULL,t=c(seq(2005,2060,5),se
eek_Ind <- setNames(vm_cesIO[,y,ppfKap_Ind],
paste0('Capital|Energy Efficiency|Industry|',
mixer[mixer$pf %in% ppfKap_Ind,][['name']],
' (billion US$2005)'))
' (billion US$2017)'))
# add industry EEK and global totals
tmp <- mbind(tmp, mbind(eek_Ind, dimSums(eek_Ind, dim = 1)))
}
Expand Down
48 changes: 24 additions & 24 deletions R/reportEmployment.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,30 @@ reportEmployment <- function(gdx, improvements, multiplier, subtype, shareManf,
reportTech <- reportTechnology(gdx)
reportTech <- collapseNames(reportTech)
var <- c(
"Tech|Electricity|Coal|Pulverised Coal w/o CC|Capital Costs (US$2005/kW)",
"Tech|Electricity|Gas|Combined Cycle w/o CC|Capital Costs (US$2005/kW)",
"Tech|Electricity|Hydro|Capital Costs (US$2005/kW)",
"Tech|Electricity|Nuclear|Capital Costs (US$2005/kW)",
"Tech|Electricity|Solar|PV|Capital Costs (US$2005/kW)",
"Tech|Electricity|Solar|CSP|Capital Costs (US$2005/kW)",
"Tech|Electricity|Wind|Onshore|Capital Costs (US$2005/kW)",
"Tech|Electricity|Wind|Offshore|Capital Costs (US$2005/kW)",
"Tech|Electricity|Biomass|Combined Heat and Power w/o CC|Capital Costs (US$2005/kW)",
"Tech|Electricity|Storage|Battery|For PV|Capital Costs (US$2005/kW)",
"Tech|Electricity|Oil|DOT|Capital Costs (US$2005/kW)",
"Tech|Electricity|Geothermal|Capital Costs (US$2005/kW)",
"Tech|Electricity|Coal|Pulverised Coal w/o CC|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Gas|Combined Cycle w/o CC|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Hydro|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Nuclear|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Solar|PV|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Solar|CSP|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Wind|Onshore|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Wind|Offshore|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Biomass|Combined Heat and Power w/o CC|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Oil|DOT|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Geothermal|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Storage|Battery|For PV|OM Cost|fixed (US$2005/kW/yr)",
"Tech|Electricity|Coal|Pulverised Coal w/o CC|Capital Costs (U$2017/kW)",
"Tech|Electricity|Gas|Combined Cycle w/o CC|Capital Costs (U$2017/kW)",
"Tech|Electricity|Hydro|Capital Costs (U$2017/kW)",
"Tech|Electricity|Nuclear|Capital Costs (U$2017/kW)",
"Tech|Electricity|Solar|PV|Capital Costs (U$2017/kW)",
"Tech|Electricity|Solar|CSP|Capital Costs (U$2017/kW)",
"Tech|Electricity|Wind|Onshore|Capital Costs (U$2017/kW)",
"Tech|Electricity|Wind|Offshore|Capital Costs (U$2017/kW)",
"Tech|Electricity|Biomass|Combined Heat and Power w/o CC|Capital Costs (U$2017/kW)",
"Tech|Electricity|Storage|Battery|For PV|Capital Costs (U$2017/kW)",
"Tech|Electricity|Oil|DOT|Capital Costs (U$2017/kW)",
"Tech|Electricity|Geothermal|Capital Costs (U$2017/kW)",
"Tech|Electricity|Coal|Pulverised Coal w/o CC|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Gas|Combined Cycle w/o CC|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Hydro|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Nuclear|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Solar|PV|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Solar|CSP|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Wind|Onshore|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Wind|Offshore|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Biomass|Combined Heat and Power w/o CC|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Oil|DOT|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Geothermal|OM Cost|fixed (U$2017/kW/yr)",
"Tech|Electricity|Storage|Battery|For PV|OM Cost|fixed (U$2017/kW/yr)",
NULL
)
# only capital costs
Expand Down
22 changes: 11 additions & 11 deletions R/reportMOFEX.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,16 @@ reportMOFEX <- function(gdx, gdx_ref = NULL, file = NULL, scenario = "default")

# Fossil Fuel Prices
peFossilPrices <- NULL
peFossilPrices <- mbind(peFossilPrices, setNames(fuel2pe.m[, , "pecoal"] / ts * tdptwyr2dpgj, "Price|Coal|Primary Level (US$2005/GJ)"))
peFossilPrices <- mbind(peFossilPrices, setNames(fuel2pe.m[, , "peoil"] / ts * tdptwyr2dpgj, "Price|Crude Oil|Primary Level (US$2005/GJ)"))
peFossilPrices <- mbind(peFossilPrices, setNames(fuel2pe.m[, , "pegas"] / ts * tdptwyr2dpgj, "Price|Natural Gas|Primary Level (US$2005/GJ)"))
# peFossilPrices <- mbind(peFossilPrices,setNames(lowpass(fuel2pe.m[,,"pegas"]/(budget.m+1e-10), fix="both", altFilter=match(2010,t)) * tdptwyr2dpgj, "Price|Natural Gas|Primary Level|Moving Avg (US$2005/GJ)"))
peFossilPrices <- mbind(peFossilPrices, setNames(fuel2pe.m[, , "pecoal"] / ts * tdptwyr2dpgj, "Price|Coal|Primary Level (US$2017/GJ)"))
peFossilPrices <- mbind(peFossilPrices, setNames(fuel2pe.m[, , "peoil"] / ts * tdptwyr2dpgj, "Price|Crude Oil|Primary Level (US$2017/GJ)"))
peFossilPrices <- mbind(peFossilPrices, setNames(fuel2pe.m[, , "pegas"] / ts * tdptwyr2dpgj, "Price|Natural Gas|Primary Level (US$2017/GJ)"))
# peFossilPrices <- mbind(peFossilPrices,setNames(lowpass(fuel2pe.m[,,"pegas"]/(budget.m+1e-10), fix="both", altFilter=match(2010,t)) * tdptwyr2dpgj, "Price|Natural Gas|Primary Level|Moving Avg (US$2017/GJ)"))
# mapping of weights for the variables for global aggregation
int2ext <- c(
"Price|Coal|Primary Level (US$2005/GJ)" = "PE|Coal (EJ/yr)",
"Price|Crude Oil|Primary Level (US$2005/GJ)" = "PE|Oil (EJ/yr)",
"Price|Natural Gas|Primary Level (US$2005/GJ)" = "PE|Gas (EJ/yr)"
# "Price|Natural Gas|Primary Level|Moving Avg (US$2005/GJ)" = "PE|Production|Net|Gas (EJ/yr)"
"Price|Coal|Primary Level (US$2017/GJ)" = "PE|Coal (EJ/yr)",
"Price|Crude Oil|Primary Level (US$2017/GJ)" = "PE|Oil (EJ/yr)",
"Price|Natural Gas|Primary Level (US$2017/GJ)" = "PE|Gas (EJ/yr)"
# "Price|Natural Gas|Primary Level|Moving Avg (US$2017/GJ)" = "PE|Production|Net|Gas (EJ/yr)"
)
map <- data.frame(region = getRegions(peFossilPrices), world = "GLO", stringsAsFactors = FALSE)
peFossilPrices_GLO <- new.magpie("GLO", getYears(peFossilPrices), magclass::getNames(peFossilPrices), fill = 0)
Expand All @@ -247,11 +247,11 @@ reportMOFEX <- function(gdx, gdx_ref = NULL, file = NULL, scenario = "default")
peFossilGloPrices <- NULL
glob_price <- new.magpie(getRegions(peQtys), getYears(peQtys), fill = 0)
for (i in getRegions(glob_price)) glob_price[i, , ] <- tradebal.m[, , "peoil"] * tdptwyr2dpgj
peFossilGloPrices <- mbind(peFossilGloPrices, setNames(glob_price, "Price|Oil|World Market (US$2005/GJ)"))
peFossilGloPrices <- mbind(peFossilGloPrices, setNames(glob_price, "Price|Oil|World Market (US$2017/GJ)"))
for (i in getRegions(glob_price)) glob_price[i, , ] <- tradebal.m[, , "pegas"] * tdptwyr2dpgj
peFossilGloPrices <- mbind(peFossilGloPrices, setNames(glob_price, "Price|Gas|World Market (US$2005/GJ)"))
peFossilGloPrices <- mbind(peFossilGloPrices, setNames(glob_price, "Price|Gas|World Market (US$2017/GJ)"))
for (i in getRegions(glob_price)) glob_price[i, , ] <- tradebal.m[, , "pecoal"] * tdptwyr2dpgj
peFossilGloPrices <- mbind(peFossilGloPrices, setNames(glob_price, "Price|Coal|World Market (US$2005/GJ)"))
peFossilGloPrices <- mbind(peFossilGloPrices, setNames(glob_price, "Price|Coal|World Market (US$2017/GJ)"))
for (i in getRegions(glob_price)) glob_price[i, , ] <- pm_pvp[, , "peoil"] * 1000
peFossilGloPrices <- mbind(peFossilGloPrices, setNames(glob_price, "PVP1|Oil (billionDpTWyr)"))
for (i in getRegions(glob_price)) glob_price[i, , ] <- pm_pvp[, , "pegas"] * 1000
Expand Down
Loading

0 comments on commit b21fe34

Please sign in to comment.