-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #602 from fbenke-pik/warnings
Remove luscale dependency
- Loading branch information
Showing
14 changed files
with
163 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Type: Package | ||
Package: mrremind | ||
Title: MadRat REMIND Input Data Package | ||
Version: 0.204.0 | ||
Version: 0.204.1 | ||
Date: 2024-12-13 | ||
Authors@R: c( | ||
person("Lavinia", "Baumstark", , "[email protected]", role = c("aut", "cre")), | ||
|
@@ -47,7 +47,6 @@ Imports: | |
edgeTransport (>= 2.9.0), | ||
GDPuc (>= 1.3.0), | ||
ggplot2, | ||
luscale, | ||
madrat (>= 3.7.1), | ||
magclass (>= 6.16.1), | ||
magrittr, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#' Calculate REMIND variables from historical IRENA capacities. | ||
#' | ||
#' @author Falk Benke | ||
#' @export | ||
calcIRENA <- function() { | ||
|
||
data <- readSource(type = "IRENA", subtype = "Capacity")[, , c( | ||
"Concentrated solar power", | ||
"Geothermal", "Renewable hydropower", | ||
"Solar photovoltaic", "Wind" | ||
)] | ||
|
||
# converting MW to GW | ||
data <- data * 1E-03 | ||
|
||
mapping <- data.frame( | ||
IRENA_techs = | ||
c("Concentrated solar power", "Geothermal", "Renewable hydropower", "Solar photovoltaic", "Wind"), | ||
REMIND_var = | ||
c( | ||
"Cap|Electricity|Solar|CSP (GW)", "Cap|Electricity|Geothermal (GW)", "Cap|Electricity|Hydro (GW)", | ||
"Cap|Electricity|Solar|PV (GW)", "Cap|Electricity|Wind (GW)" | ||
), stringsAsFactors = FALSE | ||
) | ||
|
||
data <- madrat::toolAggregate(data, mapping, dim = 3, from = "IRENA_techs", to = "REMIND_var") | ||
|
||
data <- mbind( | ||
data, | ||
setNames( | ||
data[, , "Cap|Electricity|Solar|CSP (GW)"] + data[, , "Cap|Electricity|Solar|PV (GW)"], | ||
"Cap|Electricity|Solar (GW)" | ||
) | ||
) | ||
|
||
return(list( | ||
x = data, | ||
weight = NULL, | ||
unit = "GW", | ||
description = "IRENA capacities for technologies csp, geohdr, hydro, spv, wind" | ||
)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.