Skip to content
Snippets Groups Projects

bugfix for keeping the right qos for subsequent coupled runs

Merged Jerome Hilaire requested to merge github/fork/giannou/develop into develop
1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
+ 5
5
@@ -14,16 +14,16 @@ path_magpie <- "/p/projects/piam/runs/coupled-magpie/"
# Paths to the files where scenarios are defined
# path_settings_remind contains the detailed configuration of the REMIND scenarios
# path_settings_coupled defines which runs will be started, coupling infos, and optinal gdx and report inforamtion that overrides path_settings_remind
# path_settings_coupled defines which runs will be started, coupling infos, and optimal gdx and report information that overrides path_settings_remind
path_settings_coupled <- paste0(path_remind,"config/scenario_config_coupled_SSPSDP.csv")
path_settings_remind <- paste0(path_remind,"config/scenario_config_SSPSDP.csv")
# You can put a prefix infront of the names of your runs, this will turn e.g. "SSP2-Base" into "prefix_SSP2-Base".
# You can put a prefix in front of the names of your runs, this will turn e.g. "SSP2-Base" into "prefix_SSP2-Base".
# This allows storing results of multiple coupled runs (which have the same scenario names) in the same MAgPIE and REMIND output folders.
prefix_runname <- "C_"
# If there are existing runs you would like to take the gdxes (REMIND) or reportings (REMIND or MAgPIE) from provide the path here and the name prefix below.
# Note: the sceanrio names of the old runs have to be identical to the runs that are to be started. If they differ please provide the names of the old scenarios in the
# Note: the scenario names of the old runs have to be identical to the runs that are to be started. If they differ please provide the names of the old scenarios in the
# file that you specified on path_settings_coupled (scenario_config_coupled_xxx.csv).
path_remind_oldruns <- paste0(path_remind,"output/")
path_magpie_oldruns <- paste0(path_magpie,"output/")
@@ -157,7 +157,7 @@ for(scen in common){
cat(paste0("Set start iteration to: ",start_iter,"\n"))
# If a gdx is provided in scenario_config_coupled.csv use it instead of any previouly found
# If a gdx is provided in scenario_config_coupled.csv use it instead of any previously found
if (!is.na(scenarios_coupled[scen, "path_gdx"])) {
settings_remind[scen, "path_gdx"] <- scenarios_coupled[scen, "path_gdx"]
cat("Using gdx specified in\n ",path_settings_coupled,"\n ",settings_remind[scen, "path_gdx"],"\n")
@@ -270,7 +270,7 @@ for(scen in common){
}
}
save(path_remind,path_magpie,cfg_rem,cfg_mag,runname,max_iterations,start_iter,n600_iterations,path_report,LU_pricing,qos,file=paste0(runname,".RData"))
save(path_remind,path_magpie,cfg_rem,cfg_mag,runname,max_iterations,start_iter,n600_iterations,path_report,LU_pricing,scenarios_coupled[sub(prefix_runname,"",runname),"qos"],file=paste0(runname,".RData"))
# Define colors for output
red <- "\033[0;31m"
Loading