Skip to content

Commit

Permalink
Add GDP and GDPpc ISIMIP scenario definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoch94 committed Jul 13, 2023
1 parent 334373c commit 0ab2e6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/calcDriver.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ calcScenarioConstructor <- function(driver,
weight <- calcOutput("Population", scenario = scenario, extension2150 = extension2150, aggregate = FALSE)
# Give weight same names as data, so that aggregate doesn't mess up data dim
getNames(weight) <- getNames(harmonizedData$x)
# Make sure weight has the same yearly resolution as harmonizedData
# (this relates specifically to the noCovid scenario)
# Make sure weight and harmonizedData have the same yearly resolution. Sometimes x has more years than weigth,
# thus the intersect operation. Then if weight has more years than x, only years that exist in x are used.
# (this applies specifically to the noCovid and ISIMIP scenarios)
harmonizedData$x <- harmonizedData$x[, intersect(getYears(harmonizedData$x), getYears(weight)), ]
weight <- weight[, getYears(harmonizedData$x), ]
}

Expand Down
2 changes: 2 additions & 0 deletions R/toolGetScenarioDefinition.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ toolGetScenarioDefinition <- function(driver = NULL, scen = NULL, aslist = FALSE
"GDPpc", "SSPs", "WDI-MI", "SSPsOld-MI", "calibSSPs",
"GDPpc", "SDPs", "-", "-", "calibSDPs",
"GDPpc", "SSP2EU", "-", "-", "GDPoverPop",
"GDPpc", "ISIMIP", "WDI-MI", "SSPsOld-MI", "calibSSPs",
"GDPpc", "noCovid", "WDI-MI", "SSPsOld-MI", "calibNoCovid",
"GDPpc", "longCovid", "-", "-", "calibLongCovid",
"GDPpc", "shortCovid", "-", "-", "calibShortCovid",
"GDPpc", "SSPsOld", "-", "-", "GDPoverPop",
# GDP scenarios
"GDP", "SSPs", "-", "-", "GDPpcWithPop",
"GDP", "SDPs", "-", "-", "GDPpcWithPop",
"GDP", "ISIMIP", "-", "-", "GDPpcWithPop",
"GDP", "SSP2EU", "Eurostat-WDI-MI", "SSP2EU-MI", "calibSSP2EU",
"GDP", "noCovid", "-", "-", "GDPpcWithPop",
"GDP", "longCovid", "-", "-", "GDPpcWithPop",
Expand Down

0 comments on commit 0ab2e6c

Please sign in to comment.