Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pik-piam/remind2 into sma…
Browse files Browse the repository at this point in the history
…llfix
  • Loading branch information
orichters committed Jun 6, 2023
2 parents 68bfa3a + 0b3f7e2 commit f9286b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ message: If you use this software, please cite it using the metadata from this f
type: software
title: 'remind2: The REMIND R package (2nd generation)'
version: 1.111.2
date-released: '2023-05-31'
date-released: '2023-06-03'
abstract: Contains the REMIND-specific routines for data and model output manipulation.
authors:
- family-names: Rodrigues
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Package
Package: remind2
Title: The REMIND R package (2nd generation)
Version: 1.111.2
Date: 2023-05-31
Date: 2023-06-03
Authors@R: c(
person("Renato", "Rodrigues", , "renato.rodrigues@pik-potsdam.de", role = c("aut", "cre")),
person("Lavinia", "Baumstark", role = "aut"),
Expand Down
16 changes: 10 additions & 6 deletions R/reportFE.R
Original file line number Diff line number Diff line change
Expand Up @@ -1358,16 +1358,20 @@ reportFE <- function(gdx, regionSubsetList = NULL,
# some initializations required for building library with dplyr operations below
encar <- data <- value <- value_subsectors <- SSP <- Value_NonEn <- encar <- region <- period <- NULL



# read in FE industry non-energy use trajectories from industry subsectors run
df.fe_nechem <- read.csv(system.file("extdata","pm_fe_nechem.cs4r",package = "remind2"),
sep = ",", skip = 4, header = F)

# df.fe_nechem <- read.csv("./inst/extdata/pm_fe_nechem.cs4r",
# sep = ",", skip = 4, header = F)

colnames(df.fe_nechem) <- c("period", "region","SSP","encar","value_subsectors")

# rescaling non-energy use to match 2020 EU27 values for total non-energy use
df.fe_nechem <- df.fe_nechem %>%
mutate(value_subsectors = ifelse(region %in% c("DEU", "FRA", "ECE", "ECS", "ENC", "ESC", "ESW", "EWN"),
value_subsectors *
3.835 / # average between 2018-2021 = 3.835 EJ (https://ec.europa.eu/eurostat/databrowser/view/NRG_BAL_C__custom_6407922/bookmark/table?lang=en&bookmarkId=f7c8aa0e-3cf6-45d6-b85c-f2e76e90b4aa)
df.fe_nechem %>% filter(region %in% c("DEU", "FRA", "ECE", "ECS", "ENC", "ESC", "ESW", "EWN"), period == 2020, SSP == "SSP2") %>% summarize(value_subsectors = sum(value_subsectors)) %>% pull(value_subsectors), # original 2020 df.fe_nechem total non-energy use
value_subsectors)
)

vars.nechem <- c("FE|Industry|+|Liquids (EJ/yr)",
"FE|Industry|+|Gases (EJ/yr)",
"FE|Industry|+|Solids (EJ/yr)")
Expand Down

0 comments on commit f9286b0

Please sign in to comment.