diff --git a/R/calcGlobalEnergyMonitor.R b/R/calcGlobalEnergyMonitor.R index 61a12cb6..0ed29433 100644 --- a/R/calcGlobalEnergyMonitor.R +++ b/R/calcGlobalEnergyMonitor.R @@ -15,7 +15,8 @@ calcGlobalEnergyMonitor <- function() { # set 0s in other CHA countries than China to approximate CHA as China x[c("HKG", "MAC", "TWN"), , ] <- 0 - # sum over all statuses + # ASSUMPTION: sum over all statuses + # this means that all planned projects will be realized! x <- dimSums(x, dim = "status") return(list( diff --git a/R/calcProjectPipelines.R b/R/calcProjectPipelines.R index f7006b99..f593f786 100644 --- a/R/calcProjectPipelines.R +++ b/R/calcProjectPipelines.R @@ -80,6 +80,7 @@ calcProjectPipelines <- function(subtype) { # Discussion about Hydro assumptions # https://gitlab.pik-potsdam.de/REMIND/committed/-/issues/2 } else if (subtype == "hydro") { + # without pumped storage x <- readSource("GlobalEnergyMonitor") x <- x[, , "Hydro", pmatch = T] diff --git a/R/readGlobalEnergyMonitor.R b/R/readGlobalEnergyMonitor.R index a7e664da..56687c93 100644 --- a/R/readGlobalEnergyMonitor.R +++ b/R/readGlobalEnergyMonitor.R @@ -23,7 +23,12 @@ readGlobalEnergyMonitor <- function() { value = "Capacity (MW)", status = "Status", start = "Start year", - end = "Retired year") %>% + end = "Retired year", + # hydropower specific columns for shared projects + c1 = "Country/area 1 (hydropower only)", + c2 = "Country/area 2 (hydropower only)", + v1 = "Country/area 1 Capacity (MW) (hydropower only)", + v2 = "Country/area 2 Capacity (MW) (hydropower only)") %>% filter(status %in% c("announced", "pre-construction", "construction", "operating")) %>% # ASSUMPTION: rows with empty start year are ignored # only look at pipeline until 2030 @@ -42,14 +47,25 @@ readGlobalEnergyMonitor <- function() { d[is.na(d$end) & d$variable == tech, "start"] + lifetime[[tech]] } + # special case hydropower: some projects are divided between 2 countries + # find all of these cases and put them in 2 rows, one per country + d <- rbind( + d[is.na(d$c2), ], + d[!is.na(d$c2), ] %>% mutate(region = c1, value = as.numeric(v1)), + d[!is.na(d$c2), ] %>% mutate(region = c2, value = as.numeric(v2)) + ) %>% + select(-c1, -c2, -v1, -v2) + # use proper variable names d[d$variable == "coal", "variable"] <- "Cap|Electricity|Coal" d[d$variable == "bioenergy", "variable"] <- "Cap|Electricity|Biomass" d[d$variable == "nuclear", "variable"] <- "Cap|Electricity|Nuclear" - # pumped storage would be available as tech category if differentiation needed - d[d$variable == "hydropower", "variable"] <- "Cap|Electricity|Hydro" d[d$variable == "geothermal", "variable"] <- "Cap|Electricity|Geothermal" + # remove pumped storage, keep ca. 3 GW of "conventional and pumped storage" + d <- d[!d$tech %in% "pumped storage", ] + d[d$variable == "hydropower", "variable"] <- "Cap|Electricity|Hydro" + # separate wind into on- and offshore, "Unknown"/"blank" are all onshore offshore_tech <- c("Offshore hard mount", "Offshore floating", "Offshore mount unknown") d[d$variable == "wind" & d$tech %in% offshore_tech, "variable"] <- "Cap|Electricity|Wind|Offshore"