diff --git a/.buildlibrary b/.buildlibrary index 2a2cb17a..55194e15 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '37340160' +ValidationKey: '37361999' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index 252d8fee..4dd7d29e 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: 'mrremind: MadRat REMIND Input Data Package' -version: 0.187.0 -date-released: '2024-09-02' +version: 0.187.1 +date-released: '2024-09-03' abstract: The mrremind packages contains data preprocessing for the REMIND model. authors: - family-names: Baumstark diff --git a/DESCRIPTION b/DESCRIPTION index 7de2f392..05c74e3b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: mrremind Title: MadRat REMIND Input Data Package -Version: 0.187.0 -Date: 2024-09-02 +Version: 0.187.1 +Date: 2024-09-03 Authors@R: c( person("Lavinia", "Baumstark", , "lavinia@pik-potsdam.de", role = c("aut", "cre")), person("Renato", "Rodrigues", role = "aut"), diff --git a/R/calcCapacityFactor.R b/R/calcCapacityFactor.R index 9be847d0..aec4225a 100644 --- a/R/calcCapacityFactor.R +++ b/R/calcCapacityFactor.R @@ -18,7 +18,8 @@ calcCapacityFactor <- function() { global <- readSource("REMIND_11Regi", subtype = "capacityFactorGlobal", convert = FALSE) # remove no longer used items - notUsed <- c("apcarelt", "aptrnelt", "apcarh2t", "apcarpet", "apcardit", "apcardiefft", "apcardieffH2t") + notUsed <- c("apcarelt", "aptrnelt", "apcarh2t", "apcarpet", "apcardit", + "apcardiefft", "apcardieffH2t", "pcc", "pco") global <- global[, , notUsed, invert = TRUE] # Set coal plant capacity factor long-term assumption to 50% (down from 60%) diff --git a/R/calcCoolingSharesAll.R b/R/calcCoolingSharesAll.R index f773aa04..23cf7107 100644 --- a/R/calcCoolingSharesAll.R +++ b/R/calcCoolingSharesAll.R @@ -1,5 +1,5 @@ #' Calculate Cooling Type Shares -#' +#' #' This function merges the output of two other functions that calculate REMIND #' input data for the shares of cooling types per electricity technology and #' REMIND region, using as initial information the Davies (2013) data per @@ -7,8 +7,8 @@ #' calculate data for the base year and for future time steps. The source data #' provide most required information but some assumptions on missing data are #' also made. -#' -#' +#' +#' #' @return MAgPIE object on cooling type shares per elecricity technology and #' REMIND region #' @author Ioanna Mouratiadou @@ -16,40 +16,43 @@ #' \code{\link{convertDaviesCooling}}, #' \code{\link{calcCoolingSharesBase}},\code{\link{calcCoolingSharesFuture}} #' @examples -#' -#' \dontrun{ -#' +#' \dontrun{ +#' #' a <- calcOutput("CoolingSharesAll") -#' #' } -#' +#' calcCoolingSharesAll <- function() { + cooloutputBase <- calcOutput("CoolingSharesBase", aggregate = FALSE) + cooloutputFuture <- calcOutput("CoolingSharesFuture", aggregate = FALSE) - cooloutputBase <- calcOutput("CoolingSharesBase", aggregate=FALSE) - cooloutputFuture <- calcOutput("CoolingSharesFuture",aggregate=FALSE) - # merge two datasets - outputAll <- mbind(cooloutputBase,cooloutputFuture) - - #assign aggregation weight - weight <- dimSums(calcOutput("IO",subtype="output",aggregate=FALSE)[,2010,c("feelb","feeli")],dim=3) - - #set weights to zero for countries that were not contained in the GCAM2ISO mapping - weight["ALA",,] <- 0 - weight["ATA",,] <- 0 - weight["BES",,] <- 0 - weight["BLM",,] <- 0 - weight["CUW",,] <- 0 - weight["GGY",,] <- 0 - weight["IMN",,] <- 0 - weight["JEY",,] <- 0 - weight["MAF",,] <- 0 - weight["PSE",,] <- 0 - weight["SSD",,] <- 0 - weight["SXM",,] <- 0 + outputAll <- mbind(cooloutputBase, cooloutputFuture) - return(list(x=outputAll, weight=weight, - unit="% of cooling type technologies", - description="Cooling shares for different cooling technologies based on Davies et al. (2013) publication and using electricity use weights (aggregated based on IEA World Energy Balances, 2014) for regional mapping" + # assign aggregation weight + weight <- dimSums(calcOutput("IO", subtype = "output", aggregate = FALSE)[, 2010, c("feelb", "feeli")], dim = 3) + + # set weights to zero for countries that were not contained in the GCAM2ISO mapping + weight["ALA", , ] <- 0 + weight["ATA", , ] <- 0 + weight["BES", , ] <- 0 + weight["BLM", , ] <- 0 + weight["CUW", , ] <- 0 + weight["GGY", , ] <- 0 + weight["IMN", , ] <- 0 + weight["JEY", , ] <- 0 + weight["MAF", , ] <- 0 + weight["PSE", , ] <- 0 + weight["SSD", , ] <- 0 + weight["SXM", , ] <- 0 + + return(list( + x = outputAll, + weight = weight, + unit = "% of cooling type technologies", + description = c( + "Cooling shares for different cooling technologies based on ", + "Davies et al. (2013) publication and using electricity use weights (aggregated ", + "based on IEA World Energy Balances, 2014) for regional mapping" + ) )) } diff --git a/R/calcCoolingSharesBase.R b/R/calcCoolingSharesBase.R index fcb2a046..07d3f511 100644 --- a/R/calcCoolingSharesBase.R +++ b/R/calcCoolingSharesBase.R @@ -1,12 +1,12 @@ #' Calculate Cooling Type Shares for the Base Year -#' +#' #' This function calculates REMIND input data for the shares of cooling types #' per electricity technology and REMIND region in 2005, using as initial #' information the Davies (2013) data per electricity technology and GCAM #' region. The source data provide most required information but some #' assumptions on missing data are also made. -#' -#' +#' +#' #' @return MAgPIE object on cooling type shares per elecricity technology and #' REMIND region #' @author Lavinia Baumstark, Ioanna Mouratiadou @@ -14,105 +14,111 @@ #' \code{\link{convertDaviesCooling}}, #' \code{\link{calcCoolingSharesAll}},\code{\link{calcCoolingSharesFuture}} #' @examples -#' -#' \dontrun{ +#' \dontrun{ #' a <- calcOutput("CoolingSharesBase") #' } -#' @importFrom readxl read_excel - - - calcCoolingSharesBase <- function() { - # read in data - data <- readSource("DaviesCooling", subtype="dataBase") - getNames(data)[grepl("^Sea",getNames(data))] <- "Sea.NA" - + data <- readSource("DaviesCooling", subtype = "dataBase") + getNames(data)[grepl("^Sea", getNames(data))] <- "Sea.NA" + # seperate data for Sea water - Sea <- data[,,"Sea"] - data <- data[,,-which(getNames(data)=="Sea.NA")] - - id <- getNames(data,dim=1) - + Sea <- data[, , "Sea"] + data <- data[, , -which(getNames(data) == "Sea.NA")] + + id <- getNames(data, dim = 1) + # calculate pond - pond <- new.magpie(getRegions(data),getYears(data),id) + pond <- new.magpie(getRegions(data), getYears(data), id) for (i in id) { - pond[,,i] <- 100 - dimSums(data[,,i],dim=3.2) + pond[, , i] <- 100 - dimSums(data[, , i], dim = 3.2) } - getNames(pond) <- paste(getNames(pond),"Pond",sep=".") - + getNames(pond) <- paste(getNames(pond), "Pond", sep = ".") + # add pond to data - data <- mbind(data,pond) - + data <- mbind(data, pond) + # calculate sea water - sea_new <- new.magpie(getRegions(data),getYears(data),id) + sea_new <- new.magpie(getRegions(data), getYears(data), id) for (i in id) { - sea_new[,,i] <- data[,,paste(i,"1-thru",sep=".")] * Sea/100 + sea_new[, , i] <- data[, , paste(i, "1-thru", sep = ".")] * Sea / 100 } - getNames(sea_new) <- paste(getNames(sea_new),"Sea",sep=".") - + getNames(sea_new) <- paste(getNames(sea_new), "Sea", sep = ".") + # correct 1-thru-data - data[,,"1-thru"] <- data[,,"1-thru"] * (1 - Sea/100) + data[, , "1-thru"] <- data[, , "1-thru"] * (1 - Sea / 100) # add sea data to data - data <- mbind(data,sea_new) - + data <- mbind(data, sea_new) + # check if all categories sum up to 100% - check <- new.magpie(getRegions(data),getYears(data),id) + check <- new.magpie(getRegions(data), getYears(data), id) for (i in id) { - check[,,i] <- dimSums(data[,,i],dim=3.2) + check[, , i] <- dimSums(data[, , i], dim = 3.2) } - if(!all(check==100)) { stop("sum of categorie XXX is not 100%")} - + if (!all(check == 100)) { + stop("sum of categorie XXX is not 100%") + } + # read in mapping to REMIND technologies - map_table <- read_excel(toolGetMapping(type = "sectoral", - name = "TechnologyMappingDavies2REMIND.xlsx", - returnPathOnly = TRUE, where = "mappingfolder")) + map_table <- toolGetMapping( + type = "sectoral", + name = "techmappingDaviesToREMIND.csv", + where = "mrremind" + ) map <- list() - map$davies <- paste(map_table$'Davies Source/Technology',map_table$'Davies Cooling',sep=".") - map$remind <- paste(map_table$'REMIND Technology',map_table$'REMIND Cooling',sep=".") - + map$davies <- paste(map_table$Davies.Source.Technology, map_table$Davies.Cooling, sep = ".") + map$remind <- paste(map_table$REMIND.Technology, map_table$REMIND.Cooling, sep = ".") + # calculate REMIND input in REMIND categories - output <- new.magpie(getRegions(data),getYears(data),map$remind) - output[,,] <- 0 - for(d in 1:length(map$davies)){ - if( !map$davies[d] == "-.-"){ - output[,,map$remind[d]] <- data[,,map$davies[d]] + output <- new.magpie(getRegions(data), getYears(data), map$remind) + output[, , ] <- 0 + for (d in 1:length(map$davies)) { + if (!map$davies[d] == "-.-") { + output[, , map$remind[d]] <- data[, , map$davies[d]] } } - + + # remove no longer used technologies pcc and pco + output <- output[, , c("pcc", "pco"), invert = TRUE] + # add assumed data - output[,,"geohdr.tower"] <- 70 - output[,,"geohdr.dry"] <- 20 - output[,,"geohdr.hybrid"] <- 10 - output[,,"hydro.default"] <- 100 - output[,,"wind.default"] <- 100 - output[,,"spv.default"] <- 100 - output[,,"csp.tower"] <- 70 - output[,,"csp.dry"] <- 20 - output[,,"csp.hybrid"] <- 10 - - outputBase <- new.magpie(getRegions(output),c(2005),getNames(output)) - outputBase[,,] <- output[,,] - - #assign aggregation weight - weight <- dimSums(calcOutput("IO",subtype="output",aggregate=FALSE)[,2010,c("feelb","feeli")],dim=3) - - #set weights to zero for countries that were not contained in the GCAM2ISO mapping - weight["ALA",,] <- 0 - weight["ATA",,] <- 0 - weight["BES",,] <- 0 - weight["BLM",,] <- 0 - weight["CUW",,] <- 0 - weight["GGY",,] <- 0 - weight["IMN",,] <- 0 - weight["JEY",,] <- 0 - weight["MAF",,] <- 0 - weight["PSE",,] <- 0 - weight["SSD",,] <- 0 - weight["SXM",,] <- 0 - - return(list(x=outputBase,weight=weight, - unit="% of cooling type technologies", - description="Cooling shares for different cooling technologies based on Davies et al. (2013) publication and using electricity use weights (aggregated based on IEA World Energy Balances, 2014) for regional mapping" + output[, , "geohdr.tower"] <- 70 + output[, , "geohdr.dry"] <- 20 + output[, , "geohdr.hybrid"] <- 10 + output[, , "hydro.default"] <- 100 + output[, , "wind.default"] <- 100 + output[, , "spv.default"] <- 100 + output[, , "csp.tower"] <- 70 + output[, , "csp.dry"] <- 20 + output[, , "csp.hybrid"] <- 10 + + outputBase <- new.magpie(getRegions(output), c(2005), getNames(output)) + outputBase[, , ] <- output[, , ] + + # assign aggregation weight + weight <- dimSums(calcOutput("IO", subtype = "output", aggregate = FALSE)[, 2010, c("feelb", "feeli")], dim = 3) + + # set weights to zero for countries that were not contained in the GCAM2ISO mapping + weight["ALA", , ] <- 0 + weight["ATA", , ] <- 0 + weight["BES", , ] <- 0 + weight["BLM", , ] <- 0 + weight["CUW", , ] <- 0 + weight["GGY", , ] <- 0 + weight["IMN", , ] <- 0 + weight["JEY", , ] <- 0 + weight["MAF", , ] <- 0 + weight["PSE", , ] <- 0 + weight["SSD", , ] <- 0 + weight["SXM", , ] <- 0 + + return(list( + x = outputBase, weight = weight, + unit = "% of cooling type technologies", + description = c( + "Cooling shares for different cooling technologies based on Davies et al. (2013) ", + "publication and using electricity use weights (aggregated based on IEA World ", + "Energy Balances, 2014) for regional mapping" + ) )) } diff --git a/R/calcCoolingSharesFuture.R b/R/calcCoolingSharesFuture.R index c2d71f96..a322e278 100644 --- a/R/calcCoolingSharesFuture.R +++ b/R/calcCoolingSharesFuture.R @@ -1,12 +1,12 @@ #' Calculate Cooling Type Shares for Future Timesteps -#' +#' #' This function calculates REMIND input data for the shares of cooling types #' per electricity technology and REMIND region in post-2020, using as initial #' information the Davies (2013) data per electricity technology and GCAM #' region. The source data provide most required information but some #' assumptions on missing data are also made. -#' -#' +#' +#' #' @return MAgPIE object on cooling type shares per elecricity technology and #' REMIND region #' @author Ioanna Mouratiadou @@ -14,103 +14,114 @@ #' \code{\link{convertDaviesCooling}}, #' \code{\link{calcCoolingSharesAll}},\code{\link{calcCoolingSharesBase}} #' @examples -#' -#' \dontrun{ +#' \dontrun{ #' a <- calcOutput("CoolingSharesFuture") -#' #' } -#' @importFrom readxl read_excel -#' +#' calcCoolingSharesFuture <- function() { - # read in data - data <- readSource("DaviesCooling", subtype="dataFuture") - getNames(data)[grepl("^Sea",getNames(data))] <- "Sea.NA" - + data <- readSource("DaviesCooling", subtype = "dataFuture") + getNames(data)[grepl("^Sea", getNames(data))] <- "Sea.NA" + # seperate data for Sea water - Sea <- data[,,"Sea"] - data <- data[,,-which(getNames(data)=="Sea.NA")] - - id <- getNames(data,dim=1) - + Sea <- data[, , "Sea"] + data <- data[, , -which(getNames(data) == "Sea.NA")] + + id <- getNames(data, dim = 1) + # calculate pond - pond <- new.magpie(getRegions(data),getYears(data),id) + pond <- new.magpie(getRegions(data), getYears(data), id) for (i in id) { - pond[,,i] <- 100 - dimSums(data[,,i],dim=3.2) + pond[, , i] <- 100 - dimSums(data[, , i], dim = 3.2) } - getNames(pond) <- paste(getNames(pond),"Pond",sep=".") - + getNames(pond) <- paste(getNames(pond), "Pond", sep = ".") + # add pond to data - data <- mbind(data,pond) - + data <- mbind(data, pond) + # calculate sea water - sea_new <- new.magpie(getRegions(data),getYears(data),id) + sea_new <- new.magpie(getRegions(data), getYears(data), id) for (i in id) { - sea_new[,,i] <- data[,,paste(i,"1-thru",sep=".")] * Sea/100 + sea_new[, , i] <- data[, , paste(i, "1-thru", sep = ".")] * Sea / 100 } - getNames(sea_new) <- paste(getNames(sea_new),"Sea",sep=".") - + getNames(sea_new) <- paste(getNames(sea_new), "Sea", sep = ".") + # correct 1-thru-data - data[,,"1-thru"] <- data[,,"1-thru"] * (1 - Sea/100) + data[, , "1-thru"] <- data[, , "1-thru"] * (1 - Sea / 100) # add sea data to data - data <- mbind(data,sea_new) - + data <- mbind(data, sea_new) + # check if all categories sum up to 100% - check <- new.magpie(getRegions(data),getYears(data),id) + check <- new.magpie(getRegions(data), getYears(data), id) for (i in id) { - check[,,i] <- dimSums(data[,,i],dim=3.2) + check[, , i] <- dimSums(data[, , i], dim = 3.2) } - if(!all(check==100)) { stop("sum of categorie XXX is not 100%")} - + if (!all(check == 100)) { + stop("sum of categorie XXX is not 100%") + } + # read in mapping to REMIND technologies - map_table <- read_excel(toolGetMapping(type = "sectoral", name = "TechnologyMappingDavies2REMIND.xlsx", - returnPathOnly = TRUE, where = "mappingfolder")) + map_table <- toolGetMapping( + type = "sectoral", + name = "techmappingDaviesToREMIND.csv", + where = "mrremind" + ) map <- list() - map$davies <- paste(map_table$'Davies Source/Technology',map_table$'Davies Cooling',sep=".") - map$remind <- paste(map_table$'REMIND Technology',map_table$'REMIND Cooling',sep=".") - + map$davies <- paste(map_table$Davies.Source.Technology, map_table$Davies.Cooling, sep = ".") + map$remind <- paste(map_table$REMIND.Technology, map_table$REMIND.Cooling, sep = ".") + + # calculate REMIND input in REMIND categories - output <- new.magpie(getRegions(data),getYears(data),map$remind) - output[,,] <- 0 - for(d in 1:length(map$davies)){ - if( !map$davies[d] == "-.-"){ - output[,,map$remind[d]] <- data[,,map$davies[d]] + output <- new.magpie(getRegions(data), getYears(data), map$remind) + output[, , ] <- 0 + for (d in 1:length(map$davies)) { + if (!map$davies[d] == "-.-") { + output[, , map$remind[d]] <- data[, , map$davies[d]] } } - + + # remove no longer used technologies pcc and pco + output <- output[, , c("pcc", "pco"), invert = TRUE] + # add assumed data - output[,,"geohdr.tower"] <- 70 - output[,,"geohdr.dry"] <- 20 - output[,,"geohdr.hybrid"] <- 10 - output[,,"hydro.default"] <- 100 - output[,,"wind.default"] <- 100 - output[,,"spv.default"] <- 100 - output[,,"csp.tower"] <- 70 - output[,,"csp.dry"] <- 20 - output[,,"csp.hybrid"] <- 10 - - outputFuture <- new.magpie(getRegions(output),c(2020),getNames(output)) - outputFuture[,,] <- output[,,] - - #assign aggregation weight - weight <- dimSums(calcOutput("IO",subtype="output",aggregate=FALSE)[,2010,c("feelb","feeli")],dim=3) - - #set weights to zero for countries that were not contained in the GCAM2ISO mapping - weight["ALA",,] <- 0 - weight["ATA",,] <- 0 - weight["BES",,] <- 0 - weight["BLM",,] <- 0 - weight["CUW",,] <- 0 - weight["GGY",,] <- 0 - weight["IMN",,] <- 0 - weight["JEY",,] <- 0 - weight["MAF",,] <- 0 - weight["PSE",,] <- 0 - weight["SSD",,] <- 0 - weight["SXM",,] <- 0 - - return(list(x=outputFuture,weight=weight, - unit="% of cooling type technologies", - description="Cooling shares for different cooling technologies based on Davies et al. (2013) publication and using electricity use weights (aggregated based on IEA World Energy Balances, 2014) for regional mapping" + output[, , "geohdr.tower"] <- 70 + output[, , "geohdr.dry"] <- 20 + output[, , "geohdr.hybrid"] <- 10 + output[, , "hydro.default"] <- 100 + output[, , "wind.default"] <- 100 + output[, , "spv.default"] <- 100 + output[, , "csp.tower"] <- 70 + output[, , "csp.dry"] <- 20 + output[, , "csp.hybrid"] <- 10 + + outputFuture <- new.magpie(getRegions(output), c(2020), getNames(output)) + outputFuture[, , ] <- output[, , ] + + # assign aggregation weight + weight <- dimSums(calcOutput("IO", subtype = "output", aggregate = FALSE)[, 2010, c("feelb", "feeli")], dim = 3) + + # set weights to zero for countries that were not contained in the GCAM2ISO mapping + weight["ALA", , ] <- 0 + weight["ATA", , ] <- 0 + weight["BES", , ] <- 0 + weight["BLM", , ] <- 0 + weight["CUW", , ] <- 0 + weight["GGY", , ] <- 0 + weight["IMN", , ] <- 0 + weight["JEY", , ] <- 0 + weight["MAF", , ] <- 0 + weight["PSE", , ] <- 0 + weight["SSD", , ] <- 0 + weight["SXM", , ] <- 0 + + return(list( + x = outputFuture, + weight = weight, + unit = "% of cooling type technologies", + description = c( + "Cooling shares for different cooling technologies based on ", + "Davies et al. (2013) publication and using electricity use weights ", + "(aggregated based on IEA World Energy Balances, 2014) for regional mapping" + ) )) } diff --git a/R/calcDiffInvestCosts.R b/R/calcDiffInvestCosts.R index ff7efd75..097f4383 100644 --- a/R/calcDiffInvestCosts.R +++ b/R/calcDiffInvestCosts.R @@ -3,18 +3,15 @@ #' @details REMIND does not have a classification of coal power plants e.g., sub-critical. Therefore, countries are given coal plant #' costs assuming what type of coal plants are expected to develop there. For other technologies, certain assumptions are taken #' to change to REMIND convention. -#' @param subtype Investment Costs, I&M Costs, and Efficiency -#' @return Magpie object with aggregated but diffrentiated investment costs for some technologies. +#' @param subtype "Invest_Costs", or "Efficiency" +#' @return Magpie object with aggregated but differentiated investment costs for some technologies. #' @author Aman Malik #' @importFrom dplyr filter calcDiffInvestCosts <- function(subtype) { if (subtype == "Invest_Costs") { x <- readSource("IEA_WEO", subtype = "Invest_Costs") - x_REN21 <- readSource("REN21", subtype = "investmentCosts") - x_IEA_PVPS <- readSource("IEA_PVPS", subtype = "CAPEX") - # x <- readSource("IEA_WEO")# reading data end of convert function x[, , ] <- as.numeric(x[, , ]) # convertng data values into numeric # Various mapping files used to get needed mappings, for e.g., South Asia @@ -58,7 +55,8 @@ calcDiffInvestCosts <- function(subtype) { ) ] <- 0 } - tech_mapping <- toolGetMapping("comparison.csv", where = "mappingfolder", type = "sectoral") %>% filter(!is.na(!!sym("tech"))) + tech_mapping <- toolGetMapping("techmappingIeaWeoPgAssumptions.csv", where = "mrremind", type = "sectoral") %>% + filter(!is.na(!!sym("tech"))) # create new magpie object with names of corresponding REMIND technologies x_new <- new.magpie(getRegions(x), names = unique(tech_mapping$tech), years = getYears(x), fill = 0) @@ -80,9 +78,10 @@ calcDiffInvestCosts <- function(subtype) { further_techs_to_map <- filter(tech_mapping, !(!!sym("tech") %in% c("pc", "spv", "hydro", "biochp"))) x_new[, , further_techs_to_map$tech] <- as.numeric(x[, , further_techs_to_map$IEA]) - x_new <- time_interpolate(x_new, c(2025, 2035), integrate_interpolated_years = T) - # overwrite investmetn costs vor renewables with data form REN21 + x_new <- time_interpolate(x_new, c(2025, 2035), integrate_interpolated_years = TRUE) + # overwrite investmetn costs vor renewables with data form REN21 + x_REN21 <- readSource("REN21", subtype = "investmentCosts") x_REN21_wa <- collapseNames(x_REN21[, , "wa"]) # use weighted average getNames(x_REN21_wa) <- gsub("hydropower", "hydro", getNames(x_REN21_wa)) getNames(x_REN21_wa) <- gsub("Solar PV", "spv", getNames(x_REN21_wa)) @@ -148,16 +147,16 @@ calcDiffInvestCosts <- function(subtype) { x_adj_iso <- toolAggregate(x_adj, regmapping) # regions which have not been manually adjusted -> replace by original IEA PVPS data + x_IEA_PVPS <- readSource("IEA_PVPS", subtype = "CAPEX") x_adj_iso[which(is.na(x_adj_iso))] <- x_IEA_PVPS[which(is.na(x_adj_iso))] + # add new 2020 values PV x_new[, "y2020", "spv"] <- x_adj_iso return(list(x = x_new, weight = x_new, unit = "USD$/KW 2015", description = "Investment costs data")) - } else if (subtype == "O&M_Costs") { - x <- readSource("IEA_WEO", subtype = "Invest_Costs") } else if (subtype == "Efficiency") { x <- readSource("IEA_WEO", subtype = "Efficiency") - x[, , ] <- as.numeric(x[, , ]) # convertng data values into numeric + x[, , ] <- as.numeric(x[, , ]) # converting data values into numeric # Various mapping files used to get needed mappings, for e.g., South Asia countries <- toolGetMapping("regionmappingREMIND.csv", where = "mappingfolder", type = "regional") @@ -200,7 +199,9 @@ calcDiffInvestCosts <- function(subtype) { ) ] <- 0 } - tech_mapping <- toolGetMapping("comparison.csv", where = "mappingfolder", type = "sectoral") %>% filter(!is.na(!!sym("tech"))) + + tech_mapping <- toolGetMapping("techmappingIeaWeoPgAssumptions.csv", where = "mrremind", type = "sectoral") %>% + filter(!is.na(!!sym("tech"))) # create new magpie object with names of corresponding REMIND technologies x_new <- new.magpie(getRegions(x), names = unique(tech_mapping$tech), years = getYears(x), fill = 0) @@ -213,12 +214,8 @@ calcDiffInvestCosts <- function(subtype) { further_techs_to_map <- filter(tech_mapping, !(!!sym("tech") %in% c("pc", "spv", "hydro", "biochp"))) x_new[, , further_techs_to_map$tech] <- as.numeric(x[, , further_techs_to_map$IEA]) - x_new <- time_interpolate(x_new, c(2025, 2035), integrate_interpolated_years = T) + x_new <- time_interpolate(x_new, c(2025, 2035), integrate_interpolated_years = TRUE) return(list(x = x_new, weight = x_new, unit = "NA", description = "Efficiency data")) } - - if (subtype == "Invest_Costs" | subtype == "O&M_Costs") { - return(list(x = x_new, weight = x_new, unit = "USD$/KW 2015", description = "Investment costs data")) - } } diff --git a/R/calcEmissionFactors.R b/R/calcEmissionFactors.R index e929b14c..55cf9ee8 100644 --- a/R/calcEmissionFactors.R +++ b/R/calcEmissionFactors.R @@ -3,7 +3,6 @@ #' @importFrom quitte as.quitte calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolution = "aggregated") { - if (!(subtype %in% c("emission_factors", "activities", "emissions"))) { stop('subtype must be in c("emission_factors", "activities", "emissions")') } @@ -20,15 +19,14 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio } allocate_min2r_ef <- function(id_ef, ip_region, ip_countryGroup, ip_year, ip_scenario) { - dummy <- id_ef[ip_region, ip_year, ip_scenario] # Get minimum values across country group tmp <- as.quitte(id_ef[ip_countryGroup, ip_year, ip_scenario]) %>% group_by(!!!syms(c("data1", "data2"))) %>% summarise(value = ifelse(all(.data$value == 0), 0, - min(.data$value[.data$value > 0], na.rm = TRUE)) - ) %>% # a value 0 is often a sign for a NA that has been replaced with 0 for small countries + min(.data$value[.data$value > 0], na.rm = TRUE) + )) %>% # a value 0 is often a sign for a NA that has been replaced with 0 for small countries ungroup() %>% as.data.frame() %>% as.quitte() %>% @@ -45,29 +43,41 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio conv_kt_per_PJ_to_Tg_per_TWa <- 1e-3 / (1e15 / (365 * 24 * 60 * 60) * 1e-12) # user-defined parameters - time <- c(seq(2005, 2055, 5), seq(2060, 2110, 10), 2130, 2150) - scenario <- c("SSP1", "SSP2", "SSP3", "SSP4", "SSP5", "FLE", "MFR", "CLE", "MFR_Transports", "GlobalEURO6", "FLE_building_transport", "SLCF_building_transport") # These are additional scenarios to the CLE and MFR + time <- c(seq(2005, 2055, 5), seq(2060, 2110, 10), 2130, 2150) - p_dagg_year <- 2005 - p_dagg_pop <- "pop_SSP2" - p_dagg_gdp <- "gdp_SSP2" + # These are additional scenarios to the CLE and MFR + scenario <- c( + "SSP1", "SSP2", "SSP3", "SSP4", "SSP5", "FLE", "MFR", "CLE", + "MFR_Transports", "GlobalEURO6", "FLE_building_transport", + "SLCF_building_transport" + ) p_countryCategories <- "useGAINSregions" # list of OECD countries # TODO: may want to place this in a mapping file or in a R library - r_oecd <- c("AUS", "AUT", "BEL", "CAN", "CHL", "CZE", "DNK", "EST", "FIN", "FRA", "DEU", "GRC", "HUN", "ISL", "IRL", "ISR", "ITA", - "JPN", "KOR", "LUX", "MEX", "NLD", "NZL", "NOR", "POL", "PRT", "SVK", "SVN", "ESP", "SWE", "CHE", "TUR", "GBR", "USA") - - # set of sectors for which no emission factor will be computed (because there is no activity reported, or not in terms of energy) - dimSector_skipEF <- c("AACID", "CEMENT", "CHEM", "CHEMBULK", "CUSM", "NACID", "PAPER", "STEEL", - "Losses_Coal", "Losses_Distribution_Use", "Losses_Vent_Flare", - "Transformations_Coal", "Transformations_HLF", "Transformations_HLF_Refinery", "Transformations_LLF", "Transformations_NatGas") - - dimSector_skipEF_edge <- c("End_Use_Industry_Bio_Trad", "End_Use_Industry_Coal", "End_Use_Industry_HLF", "End_Use_Industry_LLF", - "End_Use_Industry_NatGas", "End_Use_Residential_Bio_Mod", "End_Use_Residential_Bio_Trad", "End_Use_Residential_Coal", - "End_Use_Residential_HLF", "End_Use_Residential_LLF", "End_Use_Residential_NatGas", "End_Use_Services_Bio_Trad", - "End_Use_Services_Coal") + r_oecd <- c( + "AUS", "AUT", "BEL", "CAN", "CHL", "CZE", "DNK", "EST", "FIN", "FRA", "DEU", + "GRC", "HUN", "ISL", "IRL", "ISR", "ITA", "JPN", "KOR", "LUX", "MEX", "NLD", + "NZL", "NOR", "POL", "PRT", "SVK", "SVN", "ESP", "SWE", "CHE", "TUR", "GBR", "USA" + ) + + # set of sectors for which no emission factor will be computed + # (because there is no activity reported, or not in terms of energy) + dimSector_skipEF <- c( + "AACID", "CEMENT", "CHEM", "CHEMBULK", "CUSM", "NACID", "PAPER", "STEEL", + "Losses_Coal", "Losses_Distribution_Use", "Losses_Vent_Flare", + "Transformations_Coal", "Transformations_HLF", "Transformations_HLF_Refinery", + "Transformations_LLF", "Transformations_NatGas" + ) + + dimSector_skipEF_edge <- c( + "End_Use_Industry_Bio_Trad", "End_Use_Industry_Coal", "End_Use_Industry_HLF", + "End_Use_Industry_LLF", "End_Use_Industry_NatGas", "End_Use_Residential_Bio_Mod", + "End_Use_Residential_Bio_Trad", "End_Use_Residential_Coal", "End_Use_Residential_HLF", + "End_Use_Residential_LLF", "End_Use_Residential_NatGas", "End_Use_Services_Bio_Trad", + "End_Use_Services_Coal" + ) dimSector_skipEF_edge <- c("") #-- READ IN DATA ------------------ @@ -81,50 +91,52 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio emissions <- emissions[, c(2005, 2010, 2020, 2030, 2050), ] # read in sectoral mapping (ECLIPSE (IMAGE) <> REMIND) - map_sectors_ECLIPSE2REMIND <- read.csv(toolGetMapping(type = "sectoral", name = "mappingECLIPSEtoREMINDsectors.csv", - returnPathOnly = TRUE, where = "mappingfolder"), - stringsAsFactors = TRUE) + map_sectors_ECLIPSE2REMIND <- toolGetMapping( + type = "sectoral", name = "mappingECLIPSEtoREMINDsectors.csv", + where = "mrremind" + ) %>% + # remove no longer used technologies pcc and pco + filter(!grepl("pcc|pco", .data$remind)) # read in regional map (select ISO and GAINS codes only). This is required for the construction of the SSPs - map_regions <- read.csv2(toolGetMapping(type = "regional", name = "regionmappingGAINS.csv", returnPathOnly = TRUE, - where = "mappingfolder"), - stringsAsFactors = TRUE)[, c(2, 3)] - map_regions <- map_regions %>% + map_regions <- read.csv2( + toolGetMapping(type = "regional", name = "regionmappingGAINS.csv", returnPathOnly = TRUE, where = "mrremind"), + stringsAsFactors = TRUE + )[, c(2, 3)] + + map_regions <- map_regions %>% filter(.data$CountryCode != "ANT") %>% # Remove Netherland Antilles (not in REMIND regional mapping) filter(.data$RegionCode != "") %>% - mutate(RegionCode = gsub("\\ \\+", "\\+", - gsub("^\\s+|\\s+$", "", - gsub("[0-9]", "", .data$RegionCode)))) %>% + mutate(RegionCode = gsub( + "\\ \\+", "\\+", + gsub( + "^\\s+|\\s+$", "", + gsub("[0-9]", "", .data$RegionCode) + ) + )) %>% mutate(CountryCode = factor(.data$CountryCode)) - # read in population and GDP data. required to compute gdp per cap - pop <- calcOutput("Population", aggregate = FALSE)[, p_dagg_year, p_dagg_pop] - gdp <- calcOutput("GDP", aggregate = FALSE)[, p_dagg_year, p_dagg_gdp] - + gdp_cap <- calcOutput("GDPpc", aggregate = FALSE)[, 2005, "gdppc_SSP2"] #-- PROCESS DATA ------------------ vcat(2, ">> Process data... \n") # set of sectors for which emission factors are computed dimSector_EF <- getNames(activities)[!getNames(activities) %in% c(dimSector_skipEF, dimSector_skipEF_edge)] - # calculate gdp per capita - gdp_cap <- gdp / pop - gdp_cap[is.na(gdp_cap)] <- 0 # set NA to 0 - # Regional selections # select one country pertaining to WEU (all WEU countries should have the same EF). Used for SSP scenario rules select_weu <- paste(map_regions[which(map_regions$RegionCode == "Western Europe")[1], 1]) # Retrieve Transport names transportNames <- getNames(activities)[grepl("End_Use_Transport", getNames(activities))] - - buildingNames <- getNames(activities)[grepl("End_Use_Industry|End_Use_Residential|End_Use_Services", getNames(activities))] + buildingNames <- getNames(activities)[grepl("End_Use_Industry|End_Use_Residential|End_Use_Services", getNames(activities))] # convert SO2 emission from TgSO2 to TgS emissions[, , "SO2"] <- emissions[, , "SO2"] * conv_ktSO2_to_ktS - # define missing SLE scenario (assumed to be 3/4 of the distance between CLE and MFR, according to discussion with Zig Klimont on 18th Feb 2016) + # define missing SLE scenario (assumed to be 3/4 of the distance between CLE and MFR, + # according to discussion with Zig Klimont on 18th Feb 2016) cle <- emissions[, , "CLE"] getNames(cle) <- gsub("CLE", "MFR", getNames(cle)) sle <- cle - (cle - emissions[, , "MFR"]) * 0.75 @@ -132,38 +144,43 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio emissions <- mbind(emissions, sle) rm(cle, sle) - # calculate emission factors (only for power and end-use sectors, and not empty activities) and convert from kt/PJ to Tg/Twa - ef_eclipse <- emissions[, , dimSector_EF] / + # calculate emission factors (only for power and end-use sectors, and not empty activities) + # and convert from kt/PJ to Tg/Twa + ef_eclipse <- emissions[, , dimSector_EF] / activities[, , dimSector_EF] * conv_kt_per_PJ_to_Tg_per_TWa - getSets(ef_eclipse) <- c("region", "year", "data1", "data2", "data3") + getSets(ef_eclipse) <- c("region", "year", "data1", "data2", "data3") - # some regions/countries have NA values everywhere. Allocate EF of the region to which they belong (except for Antartica) - # NAregions <- which(sapply(getRegions(which(is.na(ef_eclipse), arr.ind = TRUE)), function(k) all(is.na(as.numeric(ef_eclipse[k,,]))))) - NAregions <- c("AIA", "ATF", "BVT", "CCK", "COK", "CXR", "ESH", "FLK", "GIB", "GLP", "GUF", - "HMD", "IOT", "MSR", "MTQ", "MYT", "NFK", "NIU", "NRU", "PCN", - "REU", "SGS", "SHN", "SJM", "SPM", "TKL", "TWN", "UMI", "VAT", "VGB", "WLF") + # some regions/countries have NA values everywhere. Allocate EF of the region to which they belong (except for Antarctica) + NAregions <- c( + "AIA", "ATF", "BVT", "CCK", "COK", "CXR", "ESH", "FLK", "GIB", "GLP", "GUF", + "HMD", "IOT", "MSR", "MTQ", "MYT", "NFK", "NIU", "NRU", "PCN", + "REU", "SGS", "SHN", "SJM", "SPM", "TKL", "TWN", "UMI", "VAT", "VGB", "WLF" + ) MissingRegions <- c("ALA", "BES", "BLM", "CUW", "GGY", "IMN", "JEY", "MAF", "PSE", "SSD", "SXM") - AssociatedGAINSregions <- c("Western Europe", "Rest Central America", "Rest Central America", "Rest Central America", "Western Europe", "Western Europe", "Western Europe", - "Rest Central America", "Middle East", "Northern Africa", "Rest Central America") - ef_eclipse["ATA", , ] <- 0 # Antartica -> 0 + AssociatedGAINSregions <- c( + "Western Europe", "Rest Central America", "Rest Central America", "Rest Central America", + "Western Europe", "Western Europe", "Western Europe", + "Rest Central America", "Middle East", "Northern Africa", "Rest Central America" + ) + ef_eclipse["ATA", , ] <- 0 # Antarctica -> 0 for (kregi in NAregions) { subsitute_region <- map_regions$CountryCode[map_regions$RegionCode == map_regions$RegionCode[map_regions$CountryCode == kregi] & !map_regions$CountryCode %in% c(NAregions, MissingRegions)][1] tmp <- ef_eclipse[subsitute_region, , ] - getRegions(tmp) <- kregi + getItems(tmp, dim = 1) <- kregi ef_eclipse[kregi, , ] <- tmp } # some regions have no population data when disaggregating. for (kregi in MissingRegions) { substitute_region <- map_regions$CountryCode[map_regions$RegionCode == AssociatedGAINSregions[which(MissingRegions == kregi)] & - !map_regions$CountryCode %in% MissingRegions][1] + !map_regions$CountryCode %in% MissingRegions][1] tmp <- ef_eclipse[substitute_region, , ] - getRegions(tmp) <- kregi + getItems(tmp, dim = 1) <- kregi ef_eclipse[kregi, , ] <- tmp } # for the remaining NAs just set EF to 0 (activity levels are 0) - ef_eclipse[is.na(ef_eclipse)] <- 0 + ef_eclipse[is.na(ef_eclipse)] <- 0 rm(NAregions, MissingRegions, AssociatedGAINSregions) # define exogenous emission data @@ -176,7 +193,7 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio scenario, function(s) { new.magpie( - getRegions(ef_eclipse), + getItems(ef_eclipse, dim = 1), c(2005, 2010, 2030, 2050, 2100), gsub("CLE", s, getNames(ef_eclipse[, , "CLE"])) ) @@ -192,7 +209,7 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio scenario, function(s) { new.magpie( - getRegions(emissions_exogenous), + getItems(emissions_exogenous, dim = 1), c(2005, 2010, 2030, 2050, 2100), gsub("CLE", s, getNames(emissions_exogenous[, , "CLE"])) ) @@ -203,13 +220,13 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio # define country categories if (p_countryCategories == "perCountry") { # low income countries (using World Bank definition < 2750 US$(2010)/Cap) - r_L <- dimnames(gdp_cap[getRegions(ef), , ])$ISO3[which(gdp_cap[getRegions(ef), , ] <= 2750)] + r_L <- dimnames(gdp_cap[getItems(ef, dim = 1), , ])$ISO3[which(gdp_cap[getItems(ef, dim = 1), , ] <= 2750)] # high and medium income countries - r_HM <- setdiff(getRegions(ef), r_L) + r_HM <- setdiff(getItems(ef, dim = 1), r_L) # High-Medium income countries with strong pollution policies in place - r_HMStrong <- c("AUS", "CAN", "USA", "JPN") # FIXME which definition??? + r_HMStrong <- c("AUS", "CAN", "USA", "JPN") # FIXME which definition??? # High-Medium income countries with lower emissions goals - r_HMRest <- setdiff(r_HM, r_HMStrong) + r_HMRest <- setdiff(r_HM, r_HMStrong) } else { # Compute mean GDP/Cap per GAINS region regionMean_gdppcap <- sapply(unique(map_regions$RegionCode), function(x) { @@ -217,88 +234,118 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio }) # low income countries (using World Bank definition < 2750 US$(2010)/Cap) - r_L <- levels(map_regions$CountryCode[map_regions$RegionCode %in% names(regionMean_gdppcap[regionMean_gdppcap <= 2750])]) + r_L <- levels(map_regions$CountryCode[map_regions$RegionCode %in% names(regionMean_gdppcap[regionMean_gdppcap <= 2750])]) # high and medium income countries - r_HM <- setdiff(getRegions(ef), r_L) + r_HM <- setdiff(getItems(ef, dim = 1), r_L) # High-Medium income countries with strong pollution policies in place - r_HMStrong <- map_regions$CountryCode[map_regions$RegionCode %in% c("Western Europe", "Japan")] # FIXME definition taken from JeS matlab script + r_HMStrong <- map_regions$CountryCode[map_regions$RegionCode %in% c("Western Europe", "Japan")] # FIXME definition taken from JeS matlab script # High-Medium income countries with lower emissions goals - r_HMRest <- setdiff(r_HM, r_HMStrong) + r_HMRest <- setdiff(r_HM, r_HMStrong) } # generate FLE and SSP scenarios # -------- Fix all scenarios to CLE in 2005 and 2010 ---------- - ef[, c(2005, 2010), ] <- ef_eclipse[, c(2005, 2010), "CLE"] + ef[, c(2005, 2010), ] <- ef_eclipse[, c(2005, 2010), "CLE"] emi[, c(2005, 2010), ] <- emissions_exogenous[, c(2005, 2010), "CLE"] # ---------------- FLE ---------------------------------------- # FLE: CLE 2010 emission factors and emissions are held constant - ef[, , "FLE"] <- setYears(ef[, 2010, "FLE"], NULL) # NULL is actually the default value, skipping afterwards + ef[, , "FLE"] <- setYears(ef[, 2010, "FLE"], NULL) # NULL is actually the default value, skipping afterwards emi[, , "FLE"] <- setYears(emi[, 2010, "FLE"], NULL) # ---------------- SSP1 --------------------------------------- # Emission factors # low income countries - ef[r_L, 2030, "SSP1"] <- ef_eclipse[r_L, 2030, "CLE"] # 2030: CLE30 - ef[r_L, 2050, "SSP1"] <- pmin(setYears(ef[r_L, 2030, "SSP1"]), - setYears(allocate_c2r_ef(ef_eclipse, r_L, select_weu, 2030, "CLE"))) # 2050: CLE30 WEU, if not higher than 2030 value - ef[r_L, 2100, "SSP1"] <- pmin(setYears(ef[r_L, 2050, "SSP1"]), setYears(ef_eclipse[r_L, 2030, "SLE"])) # 2100: SLE30, if not higher than 2050 value + ef[r_L, 2030, "SSP1"] <- ef_eclipse[r_L, 2030, "CLE"] # 2030: CLE30 + ef[r_L, 2050, "SSP1"] <- pmin( + setYears(ef[r_L, 2030, "SSP1"]), + setYears(allocate_c2r_ef(ef_eclipse, r_L, select_weu, 2030, "CLE")) + ) # 2050: CLE30 WEU, if not higher than 2030 value + + # 2100: SLE30, if not higher than 2050 value + ef[r_L, 2100, "SSP1"] <- pmin(setYears(ef[r_L, 2050, "SSP1"]), setYears(ef_eclipse[r_L, 2030, "SLE"])) # high income countries - ef[r_HM, 2030, "SSP1"] <- 0.75 * ef_eclipse[r_HM, 2030, "CLE"] # 2030: 75% of CLE30 - ef[r_HM, 2050, "SSP1"] <- pmin(setYears(ef[r_HM, 2030, "SSP1"]), setYears(ef_eclipse[r_HM, 2030, "SLE"])) # 2050: SLE30, if not higher than 2030 value - ef[r_HM, 2100, "SSP1"] <- pmin(setYears(ef[r_HM, 2050, "SSP1"]), setYears(ef_eclipse[r_HM, 2030, "MFR"])) # 2100: MFR, if not higher than 2050 value + ef[r_HM, 2030, "SSP1"] <- 0.75 * ef_eclipse[r_HM, 2030, "CLE"] # 2030: 75% of CLE30 + # 2050: SLE30, if not higher than 2030 value + ef[r_HM, 2050, "SSP1"] <- pmin(setYears(ef[r_HM, 2030, "SSP1"]), setYears(ef_eclipse[r_HM, 2030, "SLE"])) + # 2100: MFR, if not higher than 2050 value + ef[r_HM, 2100, "SSP1"] <- pmin(setYears(ef[r_HM, 2050, "SSP1"]), setYears(ef_eclipse[r_HM, 2030, "MFR"])) # Emissions # low income countries - emi[r_L, 2030, "SSP1"] <- emissions_exogenous[r_L, 2030, "CLE"] # 2030: CLE30 - emi[r_L, 2050, "SSP1"] <- pmin(setYears(emi[r_L, 2030, "SSP1"]), setYears(0.5 * emissions_exogenous[r_L, 2030, "CLE"] - + 0.5 * emissions_exogenous[r_L, 2030, "SLE"])) # 2050: CLE30 WEU, if not higher than 2030 value - emi[r_L, 2100, "SSP1"] <- pmin(setYears(emi[r_L, 2050, "SSP1"]), setYears(emissions_exogenous[r_L, 2030, "SLE"])) # 2100: SLE30, if not higher than 2050 value + emi[r_L, 2030, "SSP1"] <- emissions_exogenous[r_L, 2030, "CLE"] # 2030: CLE30 + emi[r_L, 2050, "SSP1"] <- pmin(setYears(emi[r_L, 2030, "SSP1"]), setYears(0.5 * emissions_exogenous[r_L, 2030, "CLE"] + + 0.5 * emissions_exogenous[r_L, 2030, "SLE"])) # 2050: CLE30 WEU, if not higher than 2030 value + emi[r_L, 2100, "SSP1"] <- pmin(setYears(emi[r_L, 2050, "SSP1"]), setYears(emissions_exogenous[r_L, 2030, "SLE"])) # 2100: SLE30, if not higher than 2050 value # high income countries - emi[r_HM, 2030, "SSP1"] <- 0.75 * emissions_exogenous[r_HM, 2030, "CLE"] # 2030: 75% of CLE30 - emi[r_HM, 2050, "SSP1"] <- pmin(setYears(emi[r_HM, 2030, "SSP1"]), setYears(emissions_exogenous[r_HM, 2030, "SLE"])) # 2050: SLE30, if not higher than 2030 value - emi[r_HM, 2100, "SSP1"] <- pmin(setYears(emi[r_HM, 2050, "SSP1"]), setYears(emissions_exogenous[r_HM, 2030, "MFR"])) # 2100: MFR, if not higher than 2050 value + emi[r_HM, 2030, "SSP1"] <- 0.75 * emissions_exogenous[r_HM, 2030, "CLE"] # 2030: 75% of CLE30 + emi[r_HM, 2050, "SSP1"] <- pmin(setYears(emi[r_HM, 2030, "SSP1"]), setYears(emissions_exogenous[r_HM, 2030, "SLE"])) # 2050: SLE30, if not higher than 2030 value + emi[r_HM, 2100, "SSP1"] <- pmin(setYears(emi[r_HM, 2050, "SSP1"]), setYears(emissions_exogenous[r_HM, 2030, "MFR"])) # 2100: MFR, if not higher than 2050 value # ----------------- SSP2 -------------------------------------- # Emission factors # High-Medium income countries with strong pollution policies in place - ef[r_HMStrong, 2030, "SSP2"] <- ef_eclipse[r_HMStrong, 2030, "CLE"] # 2030: CLE30 - ef[r_HMStrong, 2050, "SSP2"] <- pmin(setYears(ef[r_HMStrong, 2030, "SSP2"]), - setYears(ef_eclipse[r_HMStrong, 2030, "SLE"])) # 2050: SLE30 - ef[r_HMStrong, 2100, "SSP2"] <- pmin(setYears(ef[r_HMStrong, 2050, "SSP2"]), - setYears(allocate_min2r_ef(ef_eclipse, r_HMStrong, r_oecd, 2030, "SLE"))) # 2100: Lowest SLE30 or lower + ef[r_HMStrong, 2030, "SSP2"] <- ef_eclipse[r_HMStrong, 2030, "CLE"] # 2030: CLE30 + ef[r_HMStrong, 2050, "SSP2"] <- pmin( + setYears(ef[r_HMStrong, 2030, "SSP2"]), + setYears(ef_eclipse[r_HMStrong, 2030, "SLE"]) + ) # 2050: SLE30 + ef[r_HMStrong, 2100, "SSP2"] <- pmin( + setYears(ef[r_HMStrong, 2050, "SSP2"]), + setYears(allocate_min2r_ef(ef_eclipse, r_HMStrong, r_oecd, 2030, "SLE")) + ) # 2100: Lowest SLE30 or lower # High-Medium income countries with lower emissions goals - ef[r_HMRest, 2030, "SSP2"] <- ef_eclipse[r_HMRest, 2030, "CLE"] # 2030: CLE30 - ef[r_HMRest, 2050, "SSP2"] <- pmin(setYears(ef[r_HMRest, 2030, "SSP2"]), - setYears(allocate_min2r_ef(ef_eclipse, r_HMRest, r_HMRest, 2030, "CLE"))) # 2050: Min CLE30 - ef[r_HMRest, 2100, "SSP2"] <- pmin(setYears(ef[r_HMRest, 2050, "SSP2"]), - setYears(allocate_c2r_ef(ef_eclipse, r_HMRest, select_weu, 2030, "SLE"))) # 2100: SLE30 WEU + ef[r_HMRest, 2030, "SSP2"] <- ef_eclipse[r_HMRest, 2030, "CLE"] # 2030: CLE30 + ef[r_HMRest, 2050, "SSP2"] <- pmin( + setYears(ef[r_HMRest, 2030, "SSP2"]), + setYears(allocate_min2r_ef(ef_eclipse, r_HMRest, r_HMRest, 2030, "CLE")) + ) # 2050: Min CLE30 + ef[r_HMRest, 2100, "SSP2"] <- pmin( + setYears(ef[r_HMRest, 2050, "SSP2"]), + setYears(allocate_c2r_ef(ef_eclipse, r_HMRest, select_weu, 2030, "SLE")) + ) # 2100: SLE30 WEU # low income countries - ef[r_L, 2030, "SSP2"] <- setYears(ef_eclipse[r_L, 2020, "CLE"]) # 2030: CLE20 - ef[r_L, 2050, "SSP2"] <- pmin(setYears(ef[r_L, 2030, "SSP2"]), - setYears(allocate_min2r_ef(ef_eclipse, r_L, r_L, 2030, "CLE"))) # 2050: Min CLE30 - ef[r_L, 2100, "SSP2"] <- pmin(setYears(ef[r_L, 2050, "SSP2"]), - setYears(allocate_c2r_ef(ef_eclipse, r_L, select_weu, 2030, "CLE"))) # 2100: CLE30 WEU + ef[r_L, 2030, "SSP2"] <- setYears(ef_eclipse[r_L, 2020, "CLE"]) # 2030: CLE20 + ef[r_L, 2050, "SSP2"] <- pmin( + setYears(ef[r_L, 2030, "SSP2"]), + setYears(allocate_min2r_ef(ef_eclipse, r_L, r_L, 2030, "CLE")) + ) # 2050: Min CLE30 + ef[r_L, 2100, "SSP2"] <- pmin( + setYears(ef[r_L, 2050, "SSP2"]), + setYears(allocate_c2r_ef(ef_eclipse, r_L, select_weu, 2030, "CLE")) + ) # 2100: CLE30 WEU # Emissions # High-Medium income countries with strong pollution policies in place - emi[r_HMStrong, 2030, "SSP2"] <- emissions_exogenous[r_HMStrong, 2030, "CLE"] # 2030: CLE30 - emi[r_HMStrong, 2050, "SSP2"] <- pmin(setYears(emi[r_HMStrong, 2030, "SSP2"]), - setYears(emissions_exogenous[r_HMStrong, 2030, "SLE"])) # 2050: SLE30 - emi[r_HMStrong, 2100, "SSP2"] <- pmin(setYears(emi[r_HMStrong, 2050, "SSP2"]), - setYears(emissions_exogenous[r_HMStrong, 2030, "SLE"] * 0.8)) # 2100: Lowest SLE30 or lower -> 0.8*SLE30 + emi[r_HMStrong, 2030, "SSP2"] <- emissions_exogenous[r_HMStrong, 2030, "CLE"] # 2030: CLE30 + emi[r_HMStrong, 2050, "SSP2"] <- pmin( + setYears(emi[r_HMStrong, 2030, "SSP2"]), + setYears(emissions_exogenous[r_HMStrong, 2030, "SLE"]) + ) # 2050: SLE30 + emi[r_HMStrong, 2100, "SSP2"] <- pmin( + setYears(emi[r_HMStrong, 2050, "SSP2"]), + setYears(emissions_exogenous[r_HMStrong, 2030, "SLE"] * 0.8) + ) # 2100: Lowest SLE30 or lower -> 0.8*SLE30 # High-Medium income countries with lower emissions goals - emi[r_HMRest, 2030, "SSP2"] <- emissions_exogenous[r_HMRest, 2030, "CLE"] # 2030: CLE30 - emi[r_HMRest, 2050, "SSP2"] <- pmin(setYears(emi[r_HMRest, 2030, "SSP2"]), - setYears(emissions_exogenous[r_HMRest, 2030, "SLE"])) # 2050: Min CLE30 -> SLE30 - emi[r_HMRest, 2100, "SSP2"] <- pmin(setYears(emi[r_HMRest, 2050, "SSP2"]), - setYears(emissions_exogenous[r_HMRest, 2030, "SLE"] * 0.8)) # 2100: SLE30 WEU -> 0.8*SLE30 + emi[r_HMRest, 2030, "SSP2"] <- emissions_exogenous[r_HMRest, 2030, "CLE"] # 2030: CLE30 + emi[r_HMRest, 2050, "SSP2"] <- pmin( + setYears(emi[r_HMRest, 2030, "SSP2"]), + setYears(emissions_exogenous[r_HMRest, 2030, "SLE"]) + ) # 2050: Min CLE30 -> SLE30 + emi[r_HMRest, 2100, "SSP2"] <- pmin( + setYears(emi[r_HMRest, 2050, "SSP2"]), + setYears(emissions_exogenous[r_HMRest, 2030, "SLE"] * 0.8) + ) # 2100: SLE30 WEU -> 0.8*SLE30 # low income countries - emi[r_L, 2030, "SSP2"] <- setYears(emissions_exogenous[r_L, 2020, "CLE"]) # 2030: CLE20 - emi[r_L, 2050, "SSP2"] <- pmin(setYears(emi[r_L, 2030, "SSP2"]), - setYears(emissions_exogenous[r_L, 2030, "CLE"])) # 2050: Min CLE30 -> CLE30 - emi[r_L, 2100, "SSP2"] <- pmin(setYears(emi[r_L, 2050, "SSP2"]), - setYears(emissions_exogenous[r_L, 2030, "SLE"] * 0.95)) # 2100: CLE30 WEU -> 0.95*SLE30 + emi[r_L, 2030, "SSP2"] <- setYears(emissions_exogenous[r_L, 2020, "CLE"]) # 2030: CLE20 + emi[r_L, 2050, "SSP2"] <- pmin( + setYears(emi[r_L, 2030, "SSP2"]), + setYears(emissions_exogenous[r_L, 2030, "CLE"]) + ) # 2050: Min CLE30 -> CLE30 + emi[r_L, 2100, "SSP2"] <- pmin( + setYears(emi[r_L, 2050, "SSP2"]), + setYears(emissions_exogenous[r_L, 2030, "SLE"] * 0.95) + ) # 2100: CLE30 WEU -> 0.95*SLE30 # H-M-Strong: 2030 CLE30; 2050 SLE30; 2100 Lowest SLE30 or lower [EUR, JPN] = [3 5] # H-M-Rest: 2030 CLE30; 2050 Min CLE30; 2100 EUR SLE30 [CHN, LAM, MEA, ROW, RUS, USA] = [2 6 7 9 10 11] @@ -312,7 +359,7 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio # ----------------- SSP5 -------------------------------------- # set SSP5 to the values of SSP1 - ef[, , "SSP5"] <- ef[, , "SSP1"] + ef[, , "SSP5"] <- ef[, , "SSP1"] emi[, , "SSP5"] <- emi[, , "SSP1"] # does not really make sense... # filter all regions and sectors that are constant between 2030 and 2050 and continue to decline afterwards. Replace by linear interpolation @@ -320,10 +367,10 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio # ----------------- CLE and MFR ------------------------------- ef[, c(2005, 2010, 2030, 2050), c("CLE", "MFR")] <- ef_eclipse[, c(2005, 2010, 2030, 2050), c("CLE", "MFR")] - ef[, 2100, c("CLE", "MFR")] <- setYears(ef_eclipse[, 2050, c("CLE", "MFR")]) # for 2100, take the same values as in 2050 + ef[, 2100, c("CLE", "MFR")] <- setYears(ef_eclipse[, 2050, c("CLE", "MFR")]) # for 2100, take the same values as in 2050 emi[, c(2005, 2010, 2030, 2050), c("CLE", "MFR")] <- emissions_exogenous[, c(2005, 2010, 2030, 2050), c("CLE", "MFR")] - emi[, 2100, c("CLE", "MFR")] <- setYears(emissions_exogenous[, 2050, c("CLE", "MFR")]) # for 2100, take the same values as in 2050 + emi[, 2100, c("CLE", "MFR")] <- setYears(emissions_exogenous[, 2050, c("CLE", "MFR")]) # for 2100, take the same values as in 2050 # ---------------- Global EURO6 for Transports ----------------------------- ef[, c(2030, 2050, 2100), "GlobalEURO6"] <- ef[, c(2030, 2050, 2100), "SSP2"] @@ -339,14 +386,14 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio # ---------------- FLE_building_transport ------------------------------ ef[, c(2030, 2050, 2100), "FLE_building_transport"] <- ef[, c(2030, 2050, 2100), "SSP2"] - mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = buildingNames, data3 = "FLE_building_transport") <- mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = buildingNames, data3 = "FLE") + mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = buildingNames, data3 = "FLE_building_transport") <- mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = buildingNames, data3 = "FLE") mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = transportNames, data3 = "FLE_building_transport") <- mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = transportNames, data3 = "FLE") emi[, c(2030, 2050, 2100), "FLE_building_transport"] <- emi[, c(2030, 2050, 2100), "SSP2"] # ---------------- SLCF_building_transport ------------------------------ ef[, c(2030, 2050, 2100), "SLCF_building_transport"] <- ef[, c(2030, 2050, 2100), "SSP2"] - mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = buildingNames, data2 = c("BC", "OC"), data3 = "SLCF_building_transport") <- mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = buildingNames, data2 = c("BC", "OC"), data3 = "FLE") + mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = buildingNames, data2 = c("BC", "OC"), data3 = "SLCF_building_transport") <- mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = buildingNames, data2 = c("BC", "OC"), data3 = "FLE") mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = transportNames, data2 = c("BC", "OC"), data3 = "SLCF_building_transport") <- mselect(ef, year = c("y2030", "y2050", "y2100"), data1 = transportNames, data2 = c("BC", "OC"), data3 = "FLE") emi[, c(2030, 2050, 2100), "SLCF_building_transport"] <- emi[, c(2030, 2050, 2100), "SSP2"] @@ -355,8 +402,11 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio emiNam <- getNames(ef, TRUE)[2:3] newdim <- apply( sapply( - do.call("expand.grid", emiNam), as.character), - 1, paste, collapse = ".") + do.call("expand.grid", emiNam), as.character + ), + 1, paste, + collapse = "." + ) activities.EF <- do.call( "mbind", @@ -372,13 +422,16 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio getSets(activities.EF) <- c("region", "year", "sector.species.scenario") # ----- EFs for advanced coal and biomass technologies ------- - mapsec <- map_sectors_ECLIPSE2REMIND[map_sectors_ECLIPSE2REMIND$eclipse %in% getNames(ef, dim = 1), c(1, 3)] + mapsec <- map_sectors_ECLIPSE2REMIND %>% + filter(.data$eclipse %in% getNames(ef, dim = 1)) %>% + select(c(1, 3)) + ef <- toolAggregate(ef, mapsec, dim = 3.1) - adv_techs <- c("igcc", "igccc", "pcc", "pco", "coalgas", "bioigcc", "bioigccc", "biogas") - adv_coaltechs <- c("igcc", "igccc", "pcc", "pco") - adv_specs <- c("NOx", "SO2", "BC", "OC") - adv_factor <- c(0.85, 0.6, 0.6, 0.6) + adv_techs <- c("igcc", "igccc", "coalgas", "bioigcc", "bioigccc", "biogas") + adv_coaltechs <- c("igcc", "igccc") + adv_specs <- c("NOx", "SO2", "BC", "OC") + adv_factor <- c(0.85, 0.6, 0.6, 0.6) for (kscen in getNames(ef, dim = 6)) { for (ktech in adv_techs) { @@ -404,7 +457,7 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio # interpolate data (EFs and activities) over time. Remove y2000 from activities (this is the first time item hence -1) vcat(2, " > Interpolate data over time... \n") - ef <- time_interpolate(ef, interpolated_year = time, integrate_interpolated_years = TRUE, extrapolation_type = "constant") + ef <- time_interpolate(ef, interpolated_year = time, integrate_interpolated_years = TRUE, extrapolation_type = "constant") emi <- time_interpolate(emi, interpolated_year = time, integrate_interpolated_years = TRUE, extrapolation_type = "constant") if (subtype == "emissions") { @@ -413,13 +466,18 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio } else if (subtype == "emission_factors") { x <- ef w <- setYears(activities.EF[, 2010, dimSector_EF]) - mapsec <- map_sectors_ECLIPSE2REMIND[map_sectors_ECLIPSE2REMIND$eclipse %in% getNames(w, dim = 1), c(1, 3)] + mapsec <- map_sectors_ECLIPSE2REMIND %>% + filter(.data$eclipse %in% getNames(w, dim = 1)) %>% + select(c(1, 3)) w <- toolAggregate(w, mapsec, dim = 3.1) - } else (stop("do not know which weight to use for acrivities")) + } else { + stop("do not know which weight to use for activities") + } - return(list(x = x, - weight = w, - unit = "unit", - description = "calcECLIPSE substitute" - )) + return(list( + x = x, + weight = w, + unit = "unit", + description = "calcECLIPSE substitute" + )) } diff --git a/R/calcWaterConsCoef.R b/R/calcWaterConsCoef.R index d2e80373..9ca4ebbe 100644 --- a/R/calcWaterConsCoef.R +++ b/R/calcWaterConsCoef.R @@ -1,77 +1,91 @@ #' Calculate Water Consumption Coefficients -#' +#' #' This function calculates REMIND input data on water consumption coefficients #' per electricity technology, using as initial information the Macknick (2011) #' data per electricity technology. The source data provide most required #' information but some assumptions on missing data are also made. -#' -#' -#' @return MAgPIE object on water consumption coefficients per elecricity +#' +#' +#' @return MAgPIE object on water consumption coefficients per electricity #' technology #' @author Ioanna Mouratiadou #' @seealso \code{\link{calcOutput}}, \code{\link{readMacknickIntensities}}, #' \code{\link{calcWaterWithCoef}} #' @examples -#' -#' \dontrun{ +#' \dontrun{ #' calcOutput("WaterConsCoef") -#' #' } -#' +#' calcWaterConsCoef <- function() { - # read in data - data <- readSource("MacknickIntensities","data") - - #use data for median withdrawal - data <- collapseNames(data[,,"Water consumption median (gal/MWh)",drop=FALSE]) + data <- readSource("MacknickIntensities", "data") + + # use data for median withdrawal + data <- collapseNames(data[, , "Water consumption median (gal/MWh)", drop = FALSE]) + + # convert from gal/MWh into m3/MWh + data <- data * 0.0037854 - #convert from gal/MWh into m3/MWh - data <- data * 0.0037854 - # read in mapping to REMIND technologies - map_table <- read_excel(toolGetMapping(type = "sectoral", name = "TechnologyMappingMacknick2REMIND.xlsx", - returnPathOnly = TRUE, where = "mappingfolder")) + map_table <- toolGetMapping( + type = "sectoral", + name = "techmappingMacknickToREMIND.csv", + where = "mrremind" + ) + map <- list() - map$macknick <- paste(map_table$'Macknick Source',map_table$'Macknick Technology',map_table$'Macknick Cooling',sep=".") - map$remind <- paste(map_table$`REMIND Technology`,map_table$`REMIND Cooling`,sep=".") - + map$macknick <- paste(map_table$Macknick.Source, + map_table$Macknick.Technology, map_table$Macknick.Cooling, + sep = "." + ) + + map$remind <- paste(map_table$REMIND.Technology, map_table$REMIND.Cooling, sep = ".") + # calculate REMIND input in REMIND categories - output <- new.magpie(getRegions(data),getYears(data),map$remind) - output[,,] <- 0 - for(d in 1:length(map$macknick)){ - if( !map$macknick[d] == "-.-.-"){ - output[,,map$remind[d]] <- data[,,map$macknick[d]] + output <- new.magpie(getRegions(data), getYears(data), map$remind) + output[, , ] <- 0 + for (d in 1:length(map$macknick)) { + if (!map$macknick[d] == "-.-.-") { + output[, , map$remind[d]] <- data[, , map$macknick[d]] } } - + + # remove no longer used technologies pcc and pco + output <- output[, , c("pcc", "pco"), invert = TRUE] + # add some assumed data - assudata <- readSource("MacknickIntensities","missingAssumed") - assudata <- collapseNames(assudata[,,"Water consumption median (gal/MWh)",drop=TRUE],1) - assudata <- assudata * 0.0037854 - - # add assumed data to data (by overrighting) - output[,,getNames(assudata)] <- assudata[,,getNames(assudata)] - output[,,"ngcc.once"] <- 0.66 * output[,,"ngcc.once"] + 0.34 * output[,,"dot.once"] - output[,,"ngcc.tower"] <- 0.66 * output[,,"ngcc.tower"] + 0.34 * output[,,"dot.tower"] - output[,,"ngcc.pond"] <- 0.66 * output[,,"ngcc.pond"] + 0.34 * output[,,"dot.pond"] - output[,,"ngcc.dry"] <- 0.66 * output[,,"ngcc.dry"] + 0.34 * output[,,"dot.dry"] - output[,,"gaschp.once"] <- 0.50 * output[,,"dot.once"] - output[,,"gaschp.tower"] <- 0.50 * output[,,"dot.tower"] - output[,,"gaschp.pond"] <- 0.50 * output[,,"dot.pond"] - output[,,"gaschp.dry"] <- 0.50 * output[,,"dot.dry"] - output[,,"coalchp.once"] <- 0.50 * output[,,"pc.once"] - output[,,"coalchp.tower"] <- 0.50 * output[,,"pc.tower"] - output[,,"coalchp.pond"] <- 0.50 * output[,,"pc.pond"] - output[,,"coalchp.dry"] <- 0.50 * output[,,"pc.dry"] - output[,,"biochp.once"] <- 0.50 * output[,,"pc.once"] - output[,,"biochp.tower"] <- 0.50 * output[,,"pc.tower"] - output[,,"biochp.pond"] <- 0.50 * output[,,"pc.pond"] - output[,,"biochp.dry"] <- 0.50 * output[,,"pc.dry"] - - return(list(x=output,weight=NULL, - unit="m3/MWh", - description="Water Consumption coefficients for different electricity and cooling technologies based on Macknick et al. (2011) report", - isocountries=FALSE + assudata <- readSource("MacknickIntensities", "missingAssumed") + assudata <- assudata[, , c("pcc", "pco"), invert = TRUE] + assudata <- collapseNames(assudata[, , "Water consumption median (gal/MWh)", drop = TRUE], 1) + assudata <- assudata * 0.0037854 + + # add assumed data to data (by overwriting) + output[, , getNames(assudata)] <- assudata[, , getNames(assudata)] + output[, , "ngcc.once"] <- 0.66 * output[, , "ngcc.once"] + 0.34 * output[, , "dot.once"] + output[, , "ngcc.tower"] <- 0.66 * output[, , "ngcc.tower"] + 0.34 * output[, , "dot.tower"] + output[, , "ngcc.pond"] <- 0.66 * output[, , "ngcc.pond"] + 0.34 * output[, , "dot.pond"] + output[, , "ngcc.dry"] <- 0.66 * output[, , "ngcc.dry"] + 0.34 * output[, , "dot.dry"] + output[, , "gaschp.once"] <- 0.50 * output[, , "dot.once"] + output[, , "gaschp.tower"] <- 0.50 * output[, , "dot.tower"] + output[, , "gaschp.pond"] <- 0.50 * output[, , "dot.pond"] + output[, , "gaschp.dry"] <- 0.50 * output[, , "dot.dry"] + output[, , "coalchp.once"] <- 0.50 * output[, , "pc.once"] + output[, , "coalchp.tower"] <- 0.50 * output[, , "pc.tower"] + output[, , "coalchp.pond"] <- 0.50 * output[, , "pc.pond"] + output[, , "coalchp.dry"] <- 0.50 * output[, , "pc.dry"] + output[, , "biochp.once"] <- 0.50 * output[, , "pc.once"] + output[, , "biochp.tower"] <- 0.50 * output[, , "pc.tower"] + output[, , "biochp.pond"] <- 0.50 * output[, , "pc.pond"] + output[, , "biochp.dry"] <- 0.50 * output[, , "pc.dry"] + + return(list( + x = output, + weight = NULL, + unit = "m3/MWh", + description = c( + "Water Consumption coefficients for different electricity and cooling technologies ", + "based on Macknick et al. (2011) report" + ), + isocountries = FALSE )) } diff --git a/R/calcWaterWithCoef.R b/R/calcWaterWithCoef.R index d32c124e..4adddcc3 100644 --- a/R/calcWaterWithCoef.R +++ b/R/calcWaterWithCoef.R @@ -1,77 +1,91 @@ #' Calculate Water Withdrawal Coefficients -#' +#' #' This function calculates REMIND input data on water withdrawal coefficients #' per electricity technology, using as initial information the Macknick (2011) #' data per electricity technology. The source data provide most required #' information but some assumptions on missing data are also made. -#' -#' +#' +#' #' @return MAgPIE object on water withdrawal coefficients per elecricity #' technology #' @author Ioanna Mouratiadou #' @seealso \code{\link{calcOutput}}, \code{\link{readMacknickIntensities}}, #' \code{\link{calcWaterConsCoef}} #' @examples -#' -#' \dontrun{ +#' \dontrun{ #' calcOutput("WaterWithCoeff") -#' #' } -#' +#' calcWaterWithCoef <- function() { - # read in data - data <- readSource("MacknickIntensities","data") - - #use data for median withdrawal - data <- collapseNames(data[,,"Water withdrawal median (gal/MWh)",drop=FALSE]) + data <- readSource("MacknickIntensities", "data") + + # use data for median withdrawal + data <- collapseNames(data[, , "Water withdrawal median (gal/MWh)", drop = FALSE]) + + # convert from gal/MWh into m3/MWh + data <- data * 0.0037854 - #convert from gal/MWh into m3/MWh - data <- data * 0.0037854 - # read in mapping to REMIND technologies - map_table <- read_excel(toolGetMapping(type = "sectoral", name = "TechnologyMappingMacknick2REMIND.xlsx", - returnPathOnly = TRUE, where = "mappingfolder")) + map_table <- toolGetMapping( + type = "sectoral", + name = "techmappingMacknickToREMIND.csv", + where = "mrremind" + ) + + map <- list() - map$macknick <- paste(map_table$'Macknick Source',map_table$'Macknick Technology',map_table$'Macknick Cooling',sep=".") - map$remind <- paste(map_table$'REMIND Technology',map_table$'REMIND Cooling',sep=".") - + map$macknick <- paste(map_table$Macknick.Source, + map_table$Macknick.Technology, map_table$Macknick.Cooling, + sep = "." + ) + map$remind <- paste(map_table$REMIND.Technology, map_table$REMIND.Cooling, sep = ".") + # calculate REMIND input in REMIND categories - output <- new.magpie(getRegions(data),getYears(data),map$remind) - output[,,] <- 0 - for(d in 1:length(map$macknick)){ - if( !map$macknick[d] == "-.-.-"){ - output[,,map$remind[d]] <- data[,,map$macknick[d]] + output <- new.magpie(getRegions(data), getYears(data), map$remind) + output[, , ] <- 0 + for (d in 1:length(map$macknick)) { + if (!map$macknick[d] == "-.-.-") { + output[, , map$remind[d]] <- data[, , map$macknick[d]] } } - + + # remove no longer used technologies pcc and pco + output <- output[, , c("pcc", "pco"), invert = TRUE] + # add some assumed data - assudata <- readSource("MacknickIntensities","missingAssumed") - assudata <- collapseNames(assudata[,,"Water withdrawal median (gal/MWh)",drop=TRUE],1) - assudata <- assudata * 0.0037854 - + assudata <- readSource("MacknickIntensities", "missingAssumed") + assudata <- assudata[, , c("pcc", "pco"), invert = TRUE] + assudata <- collapseNames(assudata[, , "Water withdrawal median (gal/MWh)", drop = TRUE], 1) + assudata <- assudata * 0.0037854 + # add assumed data to data (by overrighting) - output[,,getNames(assudata)] <- assudata[,,getNames(assudata)] - output[,,"ngcc.once"] <- 0.66 * output[,,"ngcc.once"] + 0.34 * output[,,"dot.once"] - output[,,"ngcc.tower"] <- 0.66 * output[,,"ngcc.tower"] + 0.34 * output[,,"dot.tower"] - output[,,"ngcc.pond"] <- 0.66 * output[,,"ngcc.pond"] + 0.34 * output[,,"dot.pond"] - output[,,"ngcc.dry"] <- 0.66 * output[,,"ngcc.dry"] + 0.34 * output[,,"dot.dry"] - output[,,"gaschp.once"] <- 0.50 * output[,,"dot.once"] - output[,,"gaschp.tower"] <- 0.50 * output[,,"dot.tower"] - output[,,"gaschp.pond"] <- 0.50 * output[,,"dot.pond"] - output[,,"gaschp.dry"] <- 0.50 * output[,,"dot.dry"] - output[,,"coalchp.once"] <- 0.50 * output[,,"pc.once"] - output[,,"coalchp.tower"] <- 0.50 * output[,,"pc.tower"] - output[,,"coalchp.pond"] <- 0.50 * output[,,"pc.pond"] - output[,,"coalchp.dry"] <- 0.50 * output[,,"pc.dry"] - output[,,"biochp.once"] <- 0.50 * output[,,"pc.once"] - output[,,"biochp.tower"] <- 0.50 * output[,,"pc.tower"] - output[,,"biochp.pond"] <- 0.50 * output[,,"pc.pond"] - output[,,"biochp.dry"] <- 0.50 * output[,,"pc.dry"] - - return(list(x=output,weight=NULL, - unit="m3/MWh", - description="Water withdrawal coefficients for different electricity and cooling technologies based on Macknick et al. (2011) report", - isocountries=FALSE + output[, , getNames(assudata)] <- assudata[, , getNames(assudata)] + output[, , "ngcc.once"] <- 0.66 * output[, , "ngcc.once"] + 0.34 * output[, , "dot.once"] + output[, , "ngcc.tower"] <- 0.66 * output[, , "ngcc.tower"] + 0.34 * output[, , "dot.tower"] + output[, , "ngcc.pond"] <- 0.66 * output[, , "ngcc.pond"] + 0.34 * output[, , "dot.pond"] + output[, , "ngcc.dry"] <- 0.66 * output[, , "ngcc.dry"] + 0.34 * output[, , "dot.dry"] + output[, , "gaschp.once"] <- 0.50 * output[, , "dot.once"] + output[, , "gaschp.tower"] <- 0.50 * output[, , "dot.tower"] + output[, , "gaschp.pond"] <- 0.50 * output[, , "dot.pond"] + output[, , "gaschp.dry"] <- 0.50 * output[, , "dot.dry"] + output[, , "coalchp.once"] <- 0.50 * output[, , "pc.once"] + output[, , "coalchp.tower"] <- 0.50 * output[, , "pc.tower"] + output[, , "coalchp.pond"] <- 0.50 * output[, , "pc.pond"] + output[, , "coalchp.dry"] <- 0.50 * output[, , "pc.dry"] + output[, , "biochp.once"] <- 0.50 * output[, , "pc.once"] + output[, , "biochp.tower"] <- 0.50 * output[, , "pc.tower"] + output[, , "biochp.pond"] <- 0.50 * output[, , "pc.pond"] + output[, , "biochp.dry"] <- 0.50 * output[, , "pc.dry"] + + return(list( + x = output, + weight = NULL, + unit = "m3/MWh", + description = c( + "Water withdrawal coefficients for different electricity and cooling technologies ", + "based on Macknick et al. (2011) report" + ), + isocountries = FALSE )) } diff --git a/README.md b/README.md index 205a1dd1..f5f23477 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRat REMIND Input Data Package -R package **mrremind**, version **0.187.0** +R package **mrremind**, version **0.187.1** [![CRAN status](https://www.r-pkg.org/badges/version/mrremind)](https://cran.r-project.org/package=mrremind) [![R build status](https://github.com/pik-piam/mrremind/workflows/check/badge.svg)](https://github.com/pik-piam/mrremind/actions) [![codecov](https://codecov.io/gh/pik-piam/mrremind/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrremind) [![r-universe](https://pik-piam.r-universe.dev/badges/mrremind)](https://pik-piam.r-universe.dev/builds) @@ -39,7 +39,7 @@ In case of questions / problems please contact Lavinia Baumstark . +Baumstark L, Rodrigues R, Levesque A, Oeser J, Bertram C, Mouratiadou I, Malik A, Schreyer F, Soergel B, Rottoli M, Mishra A, Dirnaichner A, Pehl M, Giannousakis A, Klein D, Strefler J, Feldhaus L, Brecha R, Rauner S, Dietrich J, Bi S, Benke F, Weigmann P, Richters O, Hasse R, Fuchs S, Mandaroux R, Koch J (2024). _mrremind: MadRat REMIND Input Data Package_. R package version 0.187.1, . A BibTeX entry for LaTeX users is @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is title = {mrremind: MadRat REMIND Input Data Package}, author = {Lavinia Baumstark and Renato Rodrigues and Antoine Levesque and Julian Oeser and Christoph Bertram and Ioanna Mouratiadou and Aman Malik and Felix Schreyer and Bjoern Soergel and Marianna Rottoli and Abhijeet Mishra and Alois Dirnaichner and Michaja Pehl and Anastasis Giannousakis and David Klein and Jessica Strefler and Lukas Feldhaus and Regina Brecha and Sebastian Rauner and Jan Philipp Dietrich and Stephen Bi and Falk Benke and Pascal Weigmann and Oliver Richters and Robin Hasse and Sophie Fuchs and Rahel Mandaroux and Johannes Koch}, year = {2024}, - note = {R package version 0.187.0}, + note = {R package version 0.187.1}, url = {https://github.com/pik-piam/mrremind}, } ``` diff --git a/inst/extdata/regional/regionmappingGAINS.csv b/inst/extdata/regional/regionmappingGAINS.csv new file mode 100755 index 00000000..86437351 --- /dev/null +++ b/inst/extdata/regional/regionmappingGAINS.csv @@ -0,0 +1,251 @@ +CountryName;CountryCode;RegionCode;RegionName;;;; +Aruba ;ABW;4 Rest Central America;Rest Central America;;Aruba;ABW;LAM +Afghanistan ;AFG;25 Rest South Asia;Rest South Asia;;Afghanistan;AFG;OAS +Angola;AGO;8 Western Africa;Western Africa;Added manually by JH;Angola;AGO;AFR +Anguilla ;AIA;4 Rest Central America;Rest Central America;;Anguilla;AIA;LAM +Aland Islands;ALA;11 Western Europe;Western Europe;Added manually by JH;Aland Islands;ALA;EUR +Albania ;ALB;12 Central Europe;Central Europe;;Albania;ALB;ROW +Andorra ;AND;11 Western Europe;Western Europe;;Andorra;AND;ROW +Netherlands Antilles ;ANT;4 Rest Central America;Rest Central America;Removed afterwards in R scripts;;; +United Arab Emirates ;ARE;17 Middle East;Middle East;;United Arab Emirates;ARE;MEA +Argentina;ARG;6 Rest South America;Rest South America;;Argentina;ARG;LAM +Armenia ;ARM;16 Russia +;Russia +;;Armenia;ARM;MEA +American Samoa ;ASM;24 Oceania;Oceania;;American Samoa;ASM;OAS +Antarctica;ATA;;;Set to 0 afterwards in R scripts;Antarctica;ATA;ROW +French Southern Territories ;ATF;24 Oceania;Oceania;;French Southern Territories;ATF;OAS +Antigua and Barbuda ;ATG;4 Rest Central America;Rest Central America;;Antigua and Barbuda;ATG;LAM +Australia ;AUS;24 Oceania;Oceania;;Australia;AUS;ROW +Austria ;AUT;11 Western Europe;Western Europe;;Austria;AUT;EUR +Azerbaijan;AZE;16 Russia +;Russia +;;Azerbaijan;AZE;MEA +Burundi ;BDI;8 Western Africa;Eastern Africa;;Burundi;BDI;AFR +Belgium ;BEL;11 Western Europe;Western Europe;;Belgium;BEL;EUR +Benin ;BEN;8 Western Africa;Western Africa;;Benin;BEN;AFR +Bonaire Sint Eustatius and Saba;BES;4 Rest Central America;Rest Central America;Added manually by JH;Bonaire Sint Eustatius and Saba;BES;LAM +Burkina Faso ;BFA;8 Western Africa;Western Africa;;Burkina Faso;BFA;AFR +Bangladesh;BGD;25 Rest South Asia;Rest South Asia;;Bangladesh;BGD;OAS +Bulgaria ;BGR;12 Central Europe;Central Europe;;Bulgaria;BGR;EUR +Bahrain ;BHR;17 Middle East;Middle East;;Bahrain;BHR;MEA +Bahamas ;BHS;4 Rest Central America;Rest Central America;;Bahamas;BHS;LAM +Bosnia and Herzegovina ;BIH;12 Central Europe;Central Europe;;Bosnia and Herzegovina;BIH;ROW +Saint Barthelemy;BLM;4 Rest Central America;Rest Central America;Added manually by JH;Saint Barthelemy;BLM;LAM +Belarus ;BLR;14 Ukraine +;Ukraine +;;Belarus;BLR;ROW +Belize ;BLZ;4 Rest Central America;Rest Central America;;Belize;BLZ;LAM +Bermuda ;BMU;4 Rest Central America;Rest Central America;;Bermuda;BMU;LAM +Bolivia;BOL;6 Rest South America;Rest South America;;Bolivia Plurinational State of;BOL;LAM +Brazil ;BRA;5 Brazil;Brazil;;Brazil;BRA;LAM +Barbados ;BRB;4 Rest Central America;Rest Central America;;Barbados;BRB;LAM +Brunei Darussalam ;BRN;21 Southeastern Asia;Southeastern Asia;;Brunei Darussalam;BRN;OAS +Bhutan ;BTN;25 Rest South Asia;Rest South Asia;;Bhutan;BTN;OAS +Bouvet Island;BVT;6 Rest South America;Rest South America;;Bouvet Island;BVT;ROW +Botswana ;BWA;8 Western Africa;Rest Southern Africa;;Botswana;BWA;AFR +Central African Republic ;CAF;8 Western Africa;Western Africa;;Central African Republic;CAF;AFR +Canada ;CAN;1 Canada;Canada;;Canada;CAN;ROW +Cocos (Keeling) Islands ;CCK;24 Oceania;Oceania;;Cocos (Keeling) Islands;CCK;OAS +Switzerland;CHE;11 Western Europe;Western Europe;;Switzerland;CHE;ROW +Chile ;CHL;6 Rest South America;Rest South America;;Chile;CHL;LAM +China;CHN;20 China +;China +;;China;CHN;CHN +Côte d'Ivoire ;CIV;8 Western Africa;Western Africa;;Cote d Ivoire;CIV;AFR +Cameroon ;CMR;8 Western Africa;Western Africa;;Cameroon;CMR;AFR +Congo, the Democratic Republic of the;COD;8 Western Africa;Western Africa;;Congo the Democratic Republic of the;COD;AFR +Congo ;COG;8 Western Africa;Western Africa;;Congo;COG;AFR +Cook Islands ;COK;24 Oceania;Oceania;;Cook Islands;COK;OAS +Colombia ;COL;6 Rest South America;Rest South America;;Colombia;COL;LAM +Comoros ;COM;8 Western Africa;Eastern Africa;;Comoros;COM;AFR +Cape Verde ;CPV;8 Western Africa;Western Africa;;Cape Verde;CPV;AFR +Costa Rica ;CRI;4 Rest Central America;Rest Central America;;Costa Rica;CRI;LAM +Cuba ;CUB;4 Rest Central America;Rest Central America;;Cuba;CUB;LAM +Curacao;CUW;4 Rest Central America;Rest Central America;Added manually by JH;Curacao;CUW;LAM +Christmas Island ;CXR;24 Oceania;Oceania;;Christmas Island;CXR;OAS +Cayman Islands ;CYM;4 Rest Central America;Rest Central America;;Cayman Islands;CYM;LAM +Cyprus ;CYP;12 Central Europe;Central Europe;;Cyprus;CYP;EUR +Czech Republic ;CZE;12 Central Europe;Central Europe;;Czech Republic;CZE;EUR +Germany ;DEU;11 Western Europe;Western Europe;;Germany;DEU;EUR +Djibouti ;DJI;8 Western Africa;Eastern Africa;;Djibouti;DJI;AFR +Dominica ;DMA;4 Rest Central America;Rest Central America;;Dominica;DMA;LAM +Denmark ;DNK;11 Western Europe;Western Europe;;Denmark;DNK;EUR +Dominican Republic ;DOM;4 Rest Central America;Rest Central America;;Dominican Republic;DOM;LAM +Algeria ;DZA;7 Northern Africa;Northern Africa;;Algeria;DZA;MEA +Ecuador ;ECU;6 Rest South America;Rest South America;;Ecuador;ECU;LAM +Egypt ;EGY;7 Northern Africa;Northern Africa;;Egypt;EGY;MEA +Eritrea ;ERI;8 Western Africa;Eastern Africa;;Eritrea;ERI;AFR +Western Sahara ;ESH;7 Northern Africa;Northern Africa;;Western Sahara;ESH;MEA +Spain ;ESP;11 Western Europe;Western Europe;;Spain;ESP;EUR +Estonia ;EST;12 Central Europe;Central Europe;;Estonia;EST;EUR +Ethiopia;ETH;8 Western Africa;Eastern Africa;;Ethiopia;ETH;AFR +Finland ;FIN;11 Western Europe;Western Europe;;Finland;FIN;EUR +Fiji ;FJI;24 Oceania;Oceania;;Fiji;FJI;OAS +Falklands Islands (Malvinas);FLK;6 Rest South America;Rest South America;;Falkland Islands (Malvinas);FLK;LAM +France;FRA;11 Western Europe;Western Europe;;France;FRA;EUR +Faroe Islands;FRO;11 Western Europe;Western Europe;;Faroe Islands;FRO;EUR +Micronesia, Federated States of;FSM;24 Oceania;Oceania;;Micronesia Federated States of;FSM;OAS +Gabon;GAB;8 Western Africa;Western Africa;;Gabon;GAB;AFR +United Kingdom;GBR;11 Western Europe;Western Europe;;United Kingdom;GBR;EUR +Georgia ;GEO;16 Russia +;Russia +;;Georgia;GEO;MEA +Guernsey;GGY;11 Western Europe;Western Europe;Added manually by JH;Guernsey;GGY;ROW +Ghana ;GHA;8 Western Africa;Western Africa;;Ghana;GHA;AFR +Gibraltar ;GIB;11 Western Europe;Western Europe;;Gibraltar;GIB;EUR +Guinea ;GIN;8 Western Africa;Western Africa;;Guinea;GIN;AFR +Guadeloupe ;GLP;4 Rest Central America;Rest Central America;;Guadeloupe;GLP;LAM +Gambia ;GMB;8 Western Africa;Western Africa;;Gambia;GMB;AFR +Guinea-Bissau ;GNB;8 Western Africa;Western Africa;;Guinea-Bissau;GNB;AFR +Equatorial Guinea ;GNQ;8 Western Africa;Western Africa;;Equatorial Guinea;GNQ;AFR +Greece;GRC;11 Western Europe;Western Europe;;Greece;GRC;EUR +Grenada ;GRD;4 Rest Central America;Rest Central America;;Grenada;GRD;LAM +Greenland;GRL;11 Western Europe;Western Europe;Added manually by JH;Greenland;GRL;EUR +Guatemala ;GTM;4 Rest Central America;Rest Central America;;Guatemala;GTM;LAM +French Guiana ;GUF;4 Rest Central America;Rest South America;;French Guiana;GUF;LAM +Guam ;GUM;24 Oceania;Oceania;;Guam;GUM;OAS +Guyana ;GUY;4 Rest Central America;Rest South America;;Guyana;GUY;LAM +Hong Kong ;HKG;20 China +;China +;;Hong Kong;HKG;CHN +Heard Island and McDonald Islands ;HMD;24 Oceania;Oceania;;Heard Island and McDonald Islands;HMD;ROW +Honduras ;HND;4 Rest Central America;Rest Central America;;Honduras;HND;LAM +Croatia ;HRV;12 Central Europe;Central Europe;;Croatia;HRV;ROW +Haiti ;HTI;4 Rest Central America;Rest Central America;;Haiti;HTI;LAM +Hungary ;HUN;12 Central Europe;Central Europe;;Hungary;HUN;EUR +Indonesia ;IDN;22 Indonesia +;Indonesia +;;Indonesia;IDN;OAS +Isle of Man;IMN;11 Western Europe;Western Europe;Added manually by JH;Isle of Man;IMN;EUR +India ;IND;18 India ;India ;;India;IND;IND +British Indian Ocean Territory;IOT;25 Rest South Asia;Rest South Asia;;British Indian Ocean Territory;IOT;OAS +Ireland ;IRL;11 Western Europe;Western Europe;;Ireland;IRL;EUR +Iran, Islamic Republic of;IRN;17 Middle East;Middle East;;Iran Islamic Republic of;IRN;MEA +Iraq ;IRQ;17 Middle East;Middle East;;Iraq;IRQ;MEA +Iceland ;ISL;11 Western Europe;Western Europe;;Iceland;ISL;ROW +Israel ;ISR;17 Middle East;Middle East;;Israel;ISR;MEA +Italy;ITA;11 Western Europe;Western Europe;;Italy;ITA;EUR +Jamaica ;JAM;4 Rest Central America;Rest Central America;;Jamaica;JAM;LAM +Jersey;JEY;11 Western Europe;Western Europe;Added manually by JH;Jersey;JEY;EUR +Jordan ;JOR;17 Middle East;Middle East;;Jordan;JOR;MEA +Japan ;JPN;23 Japan;Japan;;Japan;JPN;JPN +Kazakstan ;KAZ;15 Asia-Stan;Asia-Stan;;Kazakhstan;KAZ;MEA +Kenya ;KEN;8 Western Africa;Eastern Africa;;Kenya;KEN;AFR +Kyrgyzstan;KGZ;15 Asia-Stan;Asia-Stan;;Kyrgyzstan;KGZ;MEA +Cambodia ;KHM;21 Southeastern Asia;Southeastern Asia;;Cambodia;KHM;OAS +Kiribati ;KIR;24 Oceania;Oceania;;Kiribati;KIR;OAS +Saint Kitts and Nevis ;KNA;4 Rest Central America;Rest Central America;;Saint Kitts and Nevis;KNA;LAM +Korea, Republic of;KOR;19 Korea;Korea;;Korea Republic of;KOR;OAS +Kuwait ;KWT;17 Middle East;Middle East;;Kuwait;KWT;MEA +Lao People's Democratic Republic;LAO;21 Southeastern Asia;Southeastern Asia;;Lao People's Democratic Republic;LAO;OAS +Lebanon;LBN;17 Middle East;Middle East;;Lebanon;LBN;MEA +Liberia ;LBR;8 Western Africa;Western Africa;;Liberia;LBR;AFR +Libyan Arab Jamahiriya;LBY;7 Northern Africa;Northern Africa;;Libya;LBY;MEA +Saint Lucia ;LCA;4 Rest Central America;Rest Central America;;Saint Lucia;LCA;LAM +Liechtenstein ;LIE;11 Western Europe;Western Europe;;Liechtenstein;LIE;ROW +Sri Lanka ;LKA;25 Rest South Asia;Rest South Asia;;Sri Lanka;LKA;OAS +Lesotho ;LSO;8 Western Africa;Rest Southern Africa;;Lesotho;LSO;AFR +Lithuania ;LTU;12 Central Europe;Central Europe;;Lithuania;LTU;EUR +Luxembourg ;LUX;11 Western Europe;Western Europe;;Luxembourg;LUX;EUR +Latvia ;LVA;12 Central Europe;Central Europe;;Latvia;LVA;EUR +Macau ;MAC;20 China +;China +;;Macao;MAC;CHN +Saint Martin (French part);MAF;4 Rest Central America;Rest Central America;Added manually by JH;Saint Martin (French part);MAF;ROW +Morocco ;MAR;7 Northern Africa;Northern Africa;;Morocco;MAR;MEA +Monaco ;MCO;11 Western Europe;Western Europe;;Monaco;MCO;ROW +Moldova, Republic of;MDA;14 Ukraine +;Ukraine +;;Moldova Republic of;MDA;ROW +Madagascar ;MDG;8 Western Africa;Eastern Africa;;Madagascar;MDG;AFR +Maldives ;MDV;25 Rest South Asia;Rest South Asia;;Maldives;MDV;OAS +Mexico;MEX;3 Mexico;Mexico;;Mexico;MEX;LAM +Marshall Islands ;MHL;24 Oceania;Oceania;;Marshall Islands;MHL;OAS +Macedonia, the former Yugoslav Republic of;MKD;12 Central Europe;Central Europe;;Macedonia the former Yugoslav Republic of;MKD;ROW +Mali ;MLI;8 Western Africa;Western Africa;;Mali;MLI;AFR +Malta ;MLT;12 Central Europe;Central Europe;;Malta;MLT;EUR +Myanmar ;MMR;21 Southeastern Asia;Southeastern Asia;;Myanmar;MMR;OAS +Yugoslavia ;MNE;12 Central Europe;Central Europe;;Montenegro;MNE;ROW +Mongolia ;MNG;20 China +;China +;;Mongolia;MNG;OAS +Northern Mariana Islands ;MNP;24 Oceania;Oceania;;Northern Mariana Islands;MNP;OAS +Mozambique ;MOZ;8 Western Africa;Rest Southern Africa;;Mozambique;MOZ;AFR +Mauritania ;MRT;8 Western Africa;Western Africa;;Mauritania;MRT;AFR +Montserrat ;MSR;4 Rest Central America;Rest Central America;;Montserrat;MSR;LAM +Martinique ;MTQ;4 Rest Central America;Rest Central America;;Martinique;MTQ;LAM +Mauritius ;MUS;8 Western Africa;Eastern Africa;;Mauritius;MUS;AFR +Malawi ;MWI;8 Western Africa;Rest Southern Africa;;Malawi;MWI;AFR +Malaysia ;MYS;21 Southeastern Asia;Southeastern Asia;;Malaysia;MYS;OAS +Mayotte ;MYT;8 Western Africa;Eastern Africa;;Mayotte;MYT;AFR +Namibia ;NAM;8 Western Africa;Rest Southern Africa;;Namibia;NAM;AFR +New Caledonia ;NCL;24 Oceania;Oceania;;New Caledonia;NCL;OAS +Niger ;NER;8 Western Africa;Western Africa;;Niger;NER;AFR +Norfolk Island ;NFK;24 Oceania;Oceania;;Norfolk Island;NFK;OAS +Nigeria ;NGA;8 Western Africa;Western Africa;;Nigeria;NGA;AFR +Nicaragua ;NIC;4 Rest Central America;Rest Central America;;Nicaragua;NIC;LAM +Niue ;NIU;24 Oceania;Oceania;;Niue;NIU;OAS +Netherlands ;NLD;11 Western Europe;Western Europe;;Netherlands;NLD;EUR +Norway ;NOR;11 Western Europe;Western Europe;;Norway;NOR;ROW +Nepal ;NPL;25 Rest South Asia;Rest South Asia;;Nepal;NPL;OAS +Nauru ;NRU;24 Oceania;Oceania;;Nauru;NRU;ROW +New Zealand ;NZL;24 Oceania;Oceania;;New Zealand;NZL;ROW +Oman ;OMN;17 Middle East;Middle East;;Oman;OMN;MEA +Pakistan ;PAK;25 Rest South Asia;Rest South Asia;;Pakistan;PAK;OAS +Panama ;PAN;4 Rest Central America;Rest Central America;;Panama;PAN;LAM +Pitcairn ;PCN;24 Oceania;Oceania;;Pitcairn;PCN;OAS +Peru ;PER;6 Rest South America;Rest South America;;Peru;PER;LAM +Philippines ;PHL;21 Southeastern Asia;Southeastern Asia;;Philippines;PHL;OAS +Palau ;PLW;24 Oceania;Oceania;;Palau;PLW;OAS +Papua New Guinea ;PNG;22 Indonesia +;Indonesia +;;Papua New Guinea;PNG;OAS +Poland ;POL;12 Central Europe;Central Europe;;Poland;POL;EUR +Puerto Rico ;PRI;4 Rest Central America;Rest Central America;;Puerto Rico;PRI;LAM +Korea, Democratic People's Republic of;PRK;19 Korea;Korea;;Korea Democratic People's Republic of;PRK;OAS +Portugal;PRT;11 Western Europe;Western Europe;;Portugal;PRT;EUR +Paraguay ;PRY;6 Rest South America;Rest South America;;Paraguay;PRY;LAM +Palestine, State of;PSE;17 Middle East;Middle East;Added manually by JH;Palestine State of;PSE;MEA +French Polynesia;PYF;24 Oceania;Oceania;;French Polynesia;PYF;OAS +Qatar ;QAT;17 Middle East;Middle East;;Qatar;QAT;MEA +Réunion ;REU;8 Western Africa;Eastern Africa;;Reunion;REU;AFR +Romania ;ROU;12 Central Europe;Central Europe;;Romania;ROU;EUR +Russian Federation ;RUS;16 Russia +;Russia +;;Russian Federation;RUS;RUS +Rwanda;RWA;8 Western Africa;Eastern Africa;;Rwanda;RWA;AFR +Saudi Arabia ;SAU;17 Middle East;Middle East;;Saudi Arabia;SAU;MEA +Sudan ;SDN;7 Northern Africa;Eastern Africa;;Sudan;SDN;AFR +Senegal ;SEN;8 Western Africa;Western Africa;;Senegal;SEN;AFR +Singapore ;SGP;21 Southeastern Asia;Southeastern Asia;;Singapore;SGP;OAS +South Georgia and the South Sandwich Islands;SGS;6 Rest South America;Rest South America;;South Georgia and the South Sandwich Islands;SGS;ROW +Saint Helena ;SHN;8 Western Africa;Western Africa;;Saint Helena Ascension and Tristan da Cunha;SHN;AFR +Svalbard and Jan Mayen ;SJM;11 Western Europe;Western Europe;;Svalbard and Jan Mayen;SJM;ROW +Solomon Islands ;SLB;24 Oceania;Oceania;;Solomon Islands;SLB;OAS +Sierra Leone ;SLE;8 Western Africa;Western Africa;;Sierra Leone;SLE;AFR +El Salvador ;SLV;4 Rest Central America;Rest Central America;;El Salvador;SLV;LAM +San Marino ;SMR;11 Western Europe;Western Europe;;San Marino;SMR;ROW +Somalia;SOM;8 Western Africa;Eastern Africa;;Somalia;SOM;AFR +Saint Pierre and Miquelon ;SPM;2 USA;USA;;Saint Pierre and Miquelon;SPM;ROW +Yugoslavia ;SRB;12 Central Europe;Central Europe;;Serbia;SRB;ROW +South Sudan;SSD;8 Western Africa;Western Africa;Added manually by JH;South Sudan;SSD;AFR +Sao Tome and Principe ;STP;8 Western Africa;Western Africa;;Sao Tome and Principe;STP;AFR +Suriname ;SUR;4 Rest Central America;Rest Central America;;Suriname;SUR;LAM +Slovakia;SVK;12 Central Europe;Central Europe;;Slovakia;SVK;EUR +Slovenia ;SVN;12 Central Europe;Central Europe;;Slovenia;SVN;EUR +Sweden ;SWE;11 Western Europe;Western Europe;;Sweden;SWE;EUR +Swaziland ;SWZ;8 Western Africa;Rest Southern Africa;;Swaziland;SWZ;AFR +Sint Maarten (Dutch part);SXM;4 Rest Central America;Rest Central America;Added manually by JH;Sint Maarten (Dutch part);SXM;LAM +Seychelles ;SYC;8 Western Africa;Eastern Africa;;Seychelles;SYC;AFR +Syrian Arab Republic;SYR;17 Middle East;Middle East;;Syrian Arab Republic;SYR;MEA +Turks and Caicos Islands ;TCA;4 Rest Central America;Rest Central America;;Turks and Caicos Islands;TCA;LAM +Chad ;TCD;8 Western Africa;Western Africa;;Chad;TCD;AFR +Togo;TGO;8 Western Africa;Western Africa;;Togo;TGO;AFR +Thailand ;THA;21 Southeastern Asia;Southeastern Asia;;Thailand;THA;OAS +Tajikistan ;TJK;15 Asia-Stan;Asia-Stan;;Tajikistan;TJK;MEA +Tokelau ;TKL;24 Oceania;Oceania;;Tokelau;TKL;OAS +Turkmenistan ;TKM;15 Asia-Stan;Asia-Stan;;Turkmenistan;TKM;MEA +East Timor;TLS;22 Indonesia +;Indonesia +;;Timor-Leste;TLS;OAS +Tonga ;TON;24 Oceania;Oceania;;Tonga;TON;OAS +Trinidad and Tobago ;TTO;4 Rest Central America;Rest Central America;;Trinidad and Tobago;TTO;LAM +Tunisia ;TUN;7 Northern Africa;Northern Africa;;Tunisia;TUN;MEA +Turkey ;TUR;13 Turkey;Turkey;;Turkey;TUR;ROW +Tuvalu ;TUV;24 Oceania;Oceania;;Tuvalu;TUV;OAS +Taiwan, Province of China ;TWN;20 China +;China +;;Taiwan Province of China;TWN;OAS +Tanzania, United Republic of;TZA;8 Western Africa;Rest Southern Africa;;Tanzania United Republic of;TZA;AFR +Uganda ;UGA;8 Western Africa;Eastern Africa;;Uganda;UGA;AFR +Ukraine ;UKR;14 Ukraine +;Ukraine +;;Ukraine;UKR;ROW +United States Minor Outlying Islands ;UMI;2 USA;USA;;United States Minor Outlying Islands;UMI;OAS +Uruguay ;URY;6 Rest South America;Rest South America;;Uruguay;URY;LAM +United States;USA;2 USA;USA;;United States;USA;USA +Uzbekistan ;UZB;15 Asia-Stan;Asia-Stan;;Uzbekistan;UZB;MEA +Holy See (Vatican City State);VAT;11 Western Europe;Western Europe;;Holy See (Vatican City State);VAT;ROW +Saint Vincent and the Grenadines;VCT;4 Rest Central America;Rest Central America;;Saint Vincent and the Grenadines;VCT;LAM +Venezuela ;VEN;6 Rest South America;Rest South America;;Venezuela Bolivarian Republic of;VEN;LAM +Virgin Islands, British ;VGB;4 Rest Central America;Rest Central America;;Virgin Islands British;VGB;LAM +Virgin Islands, U.S.;VIR;4 Rest Central America;Rest Central America;;Virgin Islands U.S.;VIR;LAM +Viet Nam ;VNM;21 Southeastern Asia;Southeastern Asia;;Viet Nam;VNM;OAS +Vanuatu ;VUT;24 Oceania;Oceania;;Vanuatu;VUT;OAS +Wallis and Futuna;WLF;24 Oceania;Oceania;;Wallis and Futuna;WLF;OAS +Samoa ;WSM;24 Oceania;Oceania;;Samoa;WSM;OAS +Yemen ;YEM;17 Middle East;Middle East;;Yemen;YEM;MEA +South Africa ;ZAF;10 South Africa;South Africa;;South Africa;ZAF;ROW +Zambia ;ZMB;8 Western Africa;Rest Southern Africa;;Zambia;ZMB;AFR +Zimbabwe ;ZWE;8 Western Africa;Rest Southern Africa;;Zimbabwe;ZWE;AFR diff --git a/inst/extdata/sectoral/mappingECLIPSEtoREMINDsectors.csv b/inst/extdata/sectoral/mappingECLIPSEtoREMINDsectors.csv new file mode 100755 index 00000000..f9da1287 --- /dev/null +++ b/inst/extdata/sectoral/mappingECLIPSEtoREMINDsectors.csv @@ -0,0 +1,65 @@ +"eclipse";"agg";"remind" +"AACID";"indprocess";"indprocess" +"CEMENT";"indprocess";"indprocess" +"CHEM";"solvents";"solvents" +"CHEMBULK";"indprocess";"indprocess" +"CUSM";"indprocess";"indprocess" +"End_Use_Industry_Bio_Trad";"bioind";"pebiolc.sesobio.biotr.indst" +"End_Use_Industry_Coal";"coalind";"pecoal.sesofos.coaltr.indst" +"End_Use_Industry_HLF";"fehosind";"peoil.seliqfos.refliq.indst" +"End_Use_Industry_LLF";"fehosind";"peoil.seliqfos.refliq.indst" +"End_Use_Industry_NatGas";"gasind";"pegas.segafos.gastr.indst" +"End_Use_Others_Bio_Mod";"biotrmod";"pebiolc.sesobio.biotrmod.indst" +"End_Use_Others_Bio_Trad";"bioind";"pebiolc.sesobio.biotr.indst" +"End_Use_Others_Coal";"coalind";"pecoal.sesofos.coaltr.indst" +"End_Use_Others_HLF";"fehosind";"peoil.seliqfos.refliq.indst" +"End_Use_Others_LLF";"fehosind";"peoil.seliqfos.refliq.indst" +"End_Use_Others_NatGas";"gasind";"pegas.segafos.gastr.indst" +"End_Use_Residential_Bio_Mod";"biotrmod";"pebiolc.sesobio.biotrmod.res" +"End_Use_Residential_Bio_Trad";"biores";"pebiolc.sesobio.biotr.res" +"End_Use_Residential_Coal";"coalres";"pecoal.sesofos.coaltr.res" +"End_Use_Residential_HLF";"fehosres";"peoil.seliqfos.refliq.res" +"End_Use_Residential_LLF";"fehosres";"peoil.seliqfos.refliq.res" +"End_Use_Residential_NatGas";"gasres";"pegas.segafos.gastr.res" +"End_Use_Services_Bio_Mod";"biotrmod";"pebiolc.sesobio.biotrmod.indst" +"End_Use_Services_Bio_Trad";"bioind";"pebiolc.sesobio.biotr.indst" +"End_Use_Services_Coal";"coalind";"pecoal.sesofos.coaltr.indst" +"End_Use_Services_HLF";"fehosind";"peoil.seliqfos.refliq.indst" +"End_Use_Services_LLF";"fehosind";"peoil.seliqfos.refliq.indst" +"End_Use_Services_NatGas";"gasind";"pegas.segafos.gastr.indst" +"End_Use_Transport_Air_Domestic";"fedie";"peoil.seliqfos.refliq.trans" +"End_Use_Transport_Air_LTO";"fedie";"peoil.seliqfos.refliq.trans" +"End_Use_Transport_Coal";"coalind";"pecoal.sesofos.coaltr.indst" +"End_Use_Transport_HLF";"fedie";"peoil.seliqfos.refliq.trans" +"End_Use_Transport_LLF";"fepet";"peoil.seliqfos.refliq.trans" +"End_Use_Transport_NatGas";"gasind";"pegas.segafos.gastr.indst" +"Losses_Coal";"extraction";"extraction" +"Losses_Distribution_Use";"extraction";"extraction" +"Losses_Vent_Flare";"extraction";"extraction" +"NACID";"indprocess";"indprocess" +"PAPER";"indprocess";"indprocess" +"Power_Gen_Bio_Trad";"bio_el";"pebiolc.seel.biochp.power" +"Power_Gen_Bio_Trad";"bio_el";"pebiolc.sehe.biohp.power" +"Power_Gen_Bio_Trad";"bio_el_adv";"pebiolc.seel.bioigcc.power" +"Power_Gen_Bio_Trad";"bio_el_adv";"pebiolc.seel.bioigccc.power" +"Power_Gen_Bio_Trad";"bio_el_adv";"pebiolc.segabio.biogas.power" +"Power_Gen_Coal";"coal_el";"pecoal.seel.pc.power" +"Power_Gen_Coal";"coal_el";"pecoal.seel.coalchp.power" +"Power_Gen_Coal";"coal_el";"pecoal.sehe.coalhp.power" +"Power_Gen_Coal";"coal_el_adv";"pecoal.seel.igcc.power" +"Power_Gen_Coal";"coal_el_adv";"pecoal.seel.igccc.power" +"Power_Gen_Coal";"coal_el_adv";"pecoal.seel.pcc.power" +"Power_Gen_Coal";"coal_el_adv";"pecoal.seel.pco.power" +"Power_Gen_Coal";"coal_el_adv";"pecoal.segafos.coalgas.power" +"Power_Gen_HLF";"dot";"peoil.seel.dot.power" +"Power_Gen_LLF";"dot";"peoil.seel.dot.power" +"Power_Gen_NatGas";"gas_el";"pegas.seel.ngcc.power" +"Power_Gen_NatGas";"gas_el";"pegas.seel.ngt.power" +"Power_Gen_NatGas";"gas_el";"pegas.seel.gaschp.power" +"Power_Gen_NatGas";"gas_el";"pegas.sehe.gashp.power" +"STEEL";"indprocess";"indprocess" +"Transformations_Coal";"extraction";"extraction" +"Transformations_HLF";"extraction";"extraction" +"Transformations_HLF_Refinery";"extraction";"extraction" +"Transformations_LLF";"extraction";"extraction" +"Transformations_NatGas";"extraction";"extraction" diff --git a/inst/extdata/sectoral/techmappingDaviesToREMIND.csv b/inst/extdata/sectoral/techmappingDaviesToREMIND.csv new file mode 100644 index 00000000..876e476c --- /dev/null +++ b/inst/extdata/sectoral/techmappingDaviesToREMIND.csv @@ -0,0 +1,70 @@ +"REMIND Source";"REMIND Technology";"REMIND Cooling";"Davies Source/Technology";"Davies Cooling" +"pegas";"ngcc";"tower";"Combined Cycle";"WT" +"pegas";"ngcc";"once";"Combined Cycle";"1-thru" +"pegas";"ngcc";"pond";"Combined Cycle";"Pond" +"pegas";"ngcc";"dry";"Combined Cycle";"Dry" +"pegas";"ngccc";"tower";"Combined Cycle";"WT" +"pegas";"ngccc";"once";"Combined Cycle";"1-thru" +"pegas";"ngccc";"pond";"Combined Cycle";"Pond" +"pegas";"ngccc";"dry";"Combined Cycle";"Dry" +"pegas";"ngt";"tower";"Other fossil/bio";"WT" +"pegas";"ngt";"once";"Other fossil/bio";"1-thru" +"pegas";"ngt";"pond";"Other fossil/bio";"Pond" +"pegas";"ngt";"dry";"Other fossil/bio";"Dry" +"pegas";"gaschp";"tower";"Other fossil/bio";"WT" +"pegas";"gaschp";"once";"Other fossil/bio";"1-thru" +"pegas";"gaschp";"pond";"Other fossil/bio";"Pond" +"pegas";"gaschp";"dry";"Other fossil/bio";"Dry" +"pecoal";"igcc";"tower";"Combined Cycle";"WT" +"pecoal";"igcc";"once";"Combined Cycle";"1-thru" +"pecoal";"igcc";"pond";"Combined Cycle";"Pond" +"pecoal";"igcc";"dry";"Combined Cycle";"Dry" +"pecoal";"igccc";"tower";"Combined Cycle";"WT" +"pecoal";"igccc";"once";"Combined Cycle";"1-thru" +"pecoal";"igccc";"pond";"Combined Cycle";"Pond" +"pecoal";"igccc";"dry";"Combined Cycle";"Dry" +"pecoal";"pc";"tower";"Coal";"WT" +"pecoal";"pc";"once";"Coal";"1-thru" +"pecoal";"pc";"pond";"Coal";"Pond" +"pecoal";"pc";"dry";"Coal";"Dry" +"pecoal";"pcc";"tower";"Coal";"WT" +"pecoal";"pcc";"once";"Coal";"1-thru" +"pecoal";"pcc";"pond";"Coal";"Pond" +"pecoal";"pcc";"dry";"Coal";"Dry" +"pecoal";"pco";"tower";"Coal";"WT" +"pecoal";"pco";"once";"Coal";"1-thru" +"pecoal";"pco";"pond";"Coal";"Pond" +"pecoal";"pco";"dry";"Coal";"Dry" +"pecoal";"coalchp";"tower";"Coal";"WT" +"pecoal";"coalchp";"once";"Coal";"1-thru" +"pecoal";"coalchp";"pond";"Coal";"Pond" +"pecoal";"coalchp";"dry";"Coal";"Dry" +"peoil";"dot";"tower";"Other fossil/bio";"WT" +"peoil";"dot";"once";"Other fossil/bio";"1-thru" +"peoil";"dot";"pond";"Other fossil/bio";"Pond" +"peoil";"dot";"dry";"Other fossil/bio";"Dry" +"peur";"tnrs";"tower";"Nuclear";"WT" +"peur";"tnrs";"once";"Nuclear";"1-thru" +"peur";"tnrs";"pond";"Nuclear";"Pond" +"peur";"tnrs";"dry";"Nuclear";"Dry" +"pebiolc";"biochp";"tower";"Other fossil/bio";"WT" +"pebiolc";"biochp";"once";"Other fossil/bio";"1-thru" +"pebiolc";"biochp";"pond";"Other fossil/bio";"Pond" +"pebiolc";"biochp";"dry";"Other fossil/bio";"Dry" +"pebiolc";"bioigcc";"tower";"Combined Cycle";"WT" +"pebiolc";"bioigcc";"once";"Combined Cycle";"1-thru" +"pebiolc";"bioigcc";"pond";"Combined Cycle";"Pond" +"pebiolc";"bioigcc";"dry";"Combined Cycle";"Dry" +"pebiolc";"bioigccc";"tower";"Combined Cycle";"WT" +"pebiolc";"bioigccc";"once";"Combined Cycle";"1-thru" +"pebiolc";"bioigccc";"pond";"Combined Cycle";"Pond" +"pebiolc";"bioigccc";"dry";"Combined Cycle";"Dry" +"pegeo";"geohdr";"tower";"-";"-" +"pegeo";"geohdr";"dry";"-";"-" +"pegeo";"geohdr";"hybrid";"-";"-" +"pehyd";"hydro";"default";"-";"-" +"pewin";"wind";"default";"-";"-" +"pesol";"spv";"default";"-";"-" +"pesol";"csp";"tower";"-";"-" +"pesol";"csp";"dry";"-";"-" +"pesol";"csp";"hybrid";"-";"-" diff --git a/inst/extdata/sectoral/techmappingIeaWeoPgAssumptions.csv b/inst/extdata/sectoral/techmappingIeaWeoPgAssumptions.csv new file mode 100644 index 00000000..e6c2ba2b --- /dev/null +++ b/inst/extdata/sectoral/techmappingIeaWeoPgAssumptions.csv @@ -0,0 +1,29 @@ +"IEA";"tech";"Comments" +"Steam Coal - SUBCRITICAL";"pc";"Africa, South Asia" +"Steam Coal - SUPERCRITICAL";"pc";"LAM, IND, FSU, MEA" +"Steam Coal - ULTRASUPERCRITICAL";"pc";"China, OECD/IEA" +"IGCC";"igcc"; +"CCGT";"ngcc"; +"Gas turbine";"ngt"; +"CCGT - CHP";"gaschp"; +"Fuel cell (distributed electricity generation)";"NA";"Not in REMIND" +"Coal + CCS";"NA";"pcc, no longer in REMIND" +"Oxyfuel + CCS";"NA";"pco, no longer in REMIND" +"IGCC + CCS";"igccc"; +"CCGT + CCS";"ngccc"; +"Nuclear";"tnrs"; +"Biomass Power plant";"bioigcc";"Dummy for bio-electricity plants" +"Biogas - DG Industry";"NA";" the IEA tech represents distributed generation of electricity from biogas in industry applications-not represented in REMIND" +"Biomass Cofiring";"NA";"Not in REMIND" +"Biomass CHP Medium";"biochp"; +"Biomass CHP Small";"biochp"; +"Biomass - waste incineration - CHP";"NA";"Not in REMIND" +"Geothermal";"geohdr"; +"Hydropower - large-scale";"hydro"; +"Hydropower - small-scale";"hydro"; +"Solar photovoltaics - Large scale";"spv"; +"Solar photovoltaics - Buildings";"spv"; +"Concentrating solar power";"csp"; +"Marine";"NA";"Not in REMIND" +"Wind onshore";"wind"; +"Wind offshore";"NA";"Not in REMIND" diff --git a/inst/extdata/sectoral/techmappingMacknickToREMIND.csv b/inst/extdata/sectoral/techmappingMacknickToREMIND.csv new file mode 100644 index 00000000..3b0075d3 --- /dev/null +++ b/inst/extdata/sectoral/techmappingMacknickToREMIND.csv @@ -0,0 +1,70 @@ +"REMIND Source";"REMIND Technology";"REMIND Cooling";"Macknick Source";"Macknick Technology";"Macknick Cooling" +"pegas";"ngcc";"tower";"Natural Gas";"Combined Cycle";"Tower" +"pegas";"ngcc";"once";"Natural Gas";"Combined Cycle";"Once-through" +"pegas";"ngcc";"pond";"Natural Gas";"Combined Cycle";"Pond" +"pegas";"ngcc";"dry";"Natural Gas";"Combined Cycle";"Dry" +"pegas";"ngccc";"tower";"Natural Gas";"Combined Cycle with CCS";"Tower" +"pegas";"ngccc";"once";"-";"-";"-" +"pegas";"ngccc";"pond";"-";"-";"-" +"pegas";"ngccc";"dry";"-";"-";"-" +"pegas";"ngt";"tower";"-";"-";"-" +"pegas";"ngt";"once";"-";"-";"-" +"pegas";"ngt";"pond";"-";"-";"-" +"pegas";"ngt";"dry";"-";"-";"-" +"pegas";"gaschp";"tower";"-";"-";"-" +"pegas";"gaschp";"once";"-";"-";"-" +"pegas";"gaschp";"pond";"-";"-";"-" +"pegas";"gaschp";"dry";"-";"-";"-" +"pecoal";"igcc";"tower";"Coal";"IGCC";"Tower" +"pecoal";"igcc";"once";"-";"-";"-" +"pecoal";"igcc";"pond";"-";"-";"-" +"pecoal";"igcc";"dry";"-";"-";"-" +"pecoal";"igccc";"tower";"Coal";"IGCC with CCS";"Tower" +"pecoal";"igccc";"once";"-";"-";"-" +"pecoal";"igccc";"pond";"-";"-";"-" +"pecoal";"igccc";"dry";"-";"-";"-" +"pecoal";"pc";"tower";"Coal";"Generic";"Tower" +"pecoal";"pc";"once";"Coal";"Generic";"Once-through" +"pecoal";"pc";"pond";"Coal";"Generic";"Pond" +"pecoal";"pc";"dry";"-";"-";"-" +"pecoal";"pcc";"tower";"Coal";"Supercritical with CCS";"Tower" +"pecoal";"pcc";"once";"-";"-";"-" +"pecoal";"pcc";"pond";"-";"-";"-" +"pecoal";"pcc";"dry";"-";"-";"-" +"pecoal";"pco";"tower";"Coal";"Supercritical with CCS";"Tower" +"pecoal";"pco";"once";"-";"-";"-" +"pecoal";"pco";"pond";"-";"-";"-" +"pecoal";"pco";"dry";"-";"-";"-" +"pecoal";"coalchp";"tower";"-";"-";"-" +"pecoal";"coalchp";"once";"-";"-";"-" +"pecoal";"coalchp";"pond";"-";"-";"-" +"pecoal";"coalchp";"dry";"-";"-";"-" +"peoil";"dot";"tower";"Natural Gas";"Steam";"Tower" +"peoil";"dot";"once";"Natural Gas";"Steam";"Once-through" +"peoil";"dot";"pond";"Natural Gas";"Steam";"Tower" +"peoil";"dot";"dry";"-";"-";"-" +"peur";"tnrs";"tower";"Nuclear";"Generic";"Tower" +"peur";"tnrs";"once";"Nuclear";"Generic";"Once-through" +"peur";"tnrs";"pond";"Nuclear";"Generic";"Pond" +"peur";"tnrs";"dry";"-";"-";"-" +"pebiolc";"biochp";"tower";"-";"-";"-" +"pebiolc";"biochp";"once";"-";"-";"-" +"pebiolc";"biochp";"pond";"-";"-";"-" +"pebiolc";"biochp";"dry";"-";"-";"-" +"pebiolc";"bioigcc";"tower";"Coal";"IGCC";"Tower" +"pebiolc";"bioigcc";"once";"-";"-";"-" +"pebiolc";"bioigcc";"pond";"-";"-";"-" +"pebiolc";"bioigcc";"dry";"-";"-";"-" +"pebiolc";"bioigccc";"tower";"Coal";"IGCC with CCS";"Tower" +"pebiolc";"bioigccc";"once";"-";"-";"-" +"pebiolc";"bioigccc";"pond";"-";"-";"-" +"pebiolc";"bioigccc";"dry";"-";"-";"-" +"pegeo";"geohdr";"tower";"Geothermal";"EGS";"Tower" +"pegeo";"geohdr";"dry";"Geothermal";"EGS";"Dry" +"pegeo";"geohdr";"hybrid";"Geothermal";"EGS";"Hybrid" +"pehyd";"hydro";"default";"Hydropower";"Aggregated in-stream and reservoir";"n/a" +"pewin";"wind";"default";"Wind";"Wind Turbine";"n/a" +"pesol";"spv";"default";"PV";"Utility Scale PV";"n/a" +"pesol";"csp";"tower";"CSP";"Trough";"Tower" +"pesol";"csp";"dry";"CSP";"Trough";"Dry" +"pesol";"csp";"hybrid";"CSP";"Trough";"Hybrid" diff --git a/man/calcCoolingSharesAll.Rd b/man/calcCoolingSharesAll.Rd index 3d591d84..e5c17d7a 100644 --- a/man/calcCoolingSharesAll.Rd +++ b/man/calcCoolingSharesAll.Rd @@ -20,11 +20,9 @@ provide most required information but some assumptions on missing data are also made. } \examples{ - -\dontrun{ +\dontrun{ a <- calcOutput("CoolingSharesAll") - } } diff --git a/man/calcCoolingSharesBase.Rd b/man/calcCoolingSharesBase.Rd index 8f994b3d..ca2649de 100644 --- a/man/calcCoolingSharesBase.Rd +++ b/man/calcCoolingSharesBase.Rd @@ -18,8 +18,7 @@ region. The source data provide most required information but some assumptions on missing data are also made. } \examples{ - -\dontrun{ +\dontrun{ a <- calcOutput("CoolingSharesBase") } } diff --git a/man/calcCoolingSharesFuture.Rd b/man/calcCoolingSharesFuture.Rd index 5414c33d..18254eb5 100644 --- a/man/calcCoolingSharesFuture.Rd +++ b/man/calcCoolingSharesFuture.Rd @@ -18,11 +18,10 @@ region. The source data provide most required information but some assumptions on missing data are also made. } \examples{ - -\dontrun{ +\dontrun{ a <- calcOutput("CoolingSharesFuture") - } + } \seealso{ \code{\link{calcOutput}}, \code{\link{readDaviesCooling}}, diff --git a/man/calcDiffInvestCosts.Rd b/man/calcDiffInvestCosts.Rd index 5492967d..1a12c18c 100644 --- a/man/calcDiffInvestCosts.Rd +++ b/man/calcDiffInvestCosts.Rd @@ -7,10 +7,10 @@ calcDiffInvestCosts(subtype) } \arguments{ -\item{subtype}{Investment Costs, I&M Costs, and Efficiency} +\item{subtype}{"Invest_Costs", or "Efficiency"} } \value{ -Magpie object with aggregated but diffrentiated investment costs for some technologies. +Magpie object with aggregated but differentiated investment costs for some technologies. } \description{ Disaggregated investment cost data is aggregated and technologies renamed to REMIND names diff --git a/man/calcExpertGuess.Rd b/man/calcExpertGuess.Rd new file mode 100644 index 00000000..1fe861af --- /dev/null +++ b/man/calcExpertGuess.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/calcExpertGuess.R +\name{calcExpertGuess} +\alias{calcExpertGuess} +\title{Calculate expert guesses} +\usage{ +calcExpertGuess(subtype) +} +\arguments{ +\item{subtype}{must be 'tradeConstraints' (more to come)} +} +\description{ +Calculate expert guesses +} +\author{ +Falk Benke +} diff --git a/man/calcWaterConsCoef.Rd b/man/calcWaterConsCoef.Rd index aa764ac7..5860676a 100644 --- a/man/calcWaterConsCoef.Rd +++ b/man/calcWaterConsCoef.Rd @@ -7,7 +7,7 @@ calcWaterConsCoef() } \value{ -MAgPIE object on water consumption coefficients per elecricity +MAgPIE object on water consumption coefficients per electricity technology } \description{ @@ -17,10 +17,8 @@ data per electricity technology. The source data provide most required information but some assumptions on missing data are also made. } \examples{ - -\dontrun{ +\dontrun{ calcOutput("WaterConsCoef") - } } diff --git a/man/calcWaterWithCoef.Rd b/man/calcWaterWithCoef.Rd index ef8e8d9c..cdf3eeef 100644 --- a/man/calcWaterWithCoef.Rd +++ b/man/calcWaterWithCoef.Rd @@ -17,10 +17,8 @@ data per electricity technology. The source data provide most required information but some assumptions on missing data are also made. } \examples{ - -\dontrun{ +\dontrun{ calcOutput("WaterWithCoeff") - } }