diff --git a/CHANGELOG.md b/CHANGELOG.md index 089ee490a..196d60e5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - **config** changed default input data to use 2017USD - **module_documentation** all references to USD05 changed to USD17 - **scripts** REMIND coupling reads data in US$2017, not US$2005 +- **config** updated input data to rev4.113 +- **config** SHAPE scenarios start year of dietary shift changed to 2025 ### added - **62_material** added switch to turn off future material demand for bioplastic @@ -20,7 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### fixed - **11_costs** changed equation to fix bug in total water cost calculation - **29_cropland** treecover age-class growth was not working properly because ac_sub was erroneously not fixed - +- **scripts** script/output/extra/resubmit.R ## [4.8.2] - 2024-09-24 diff --git a/DESCRIPTION b/DESCRIPTION index f830cf4be..103c305a1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,14 +21,14 @@ Imports: m4fsdp, madrat, magclass (>= 6.14.0), - magpie4 (>= 2.13.3), + magpie4 (>= 2.13.9), MagpieNCGains, - magpiesets, + magpiesets (>= 0.46.1), mip, mrcommons, patchwork, piamenv (>= 0.5.5), - piamInterfaces (>= 0.20.7), + piamInterfaces (>= 0.36.1), piamutils, quitte, raster, diff --git a/config/default.cfg b/config/default.cfg index 22a4b7fc4..4874bebbd 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -22,9 +22,9 @@ cfg$model <- "main.gms" #def = "main.gms" #### input settings #### # which input data sets should be used? -cfg$input <- c(regional = "rev4.112_h12_magpie.tgz", - cellular = "rev4.112_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", - validation = "rev4.112_h12_magpie.tgz", +cfg$input <- c(regional = "rev4.113_h12_magpie.tgz", + cellular = "rev4.113_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", + validation = "rev4.113_h12_validation.tgz", additional = "additional_data_rev4.57.tgz", calibration = "calibration_H12_27Sep24.tgz") diff --git a/config/projects/scenario_config_el2.csv b/config/projects/scenario_config_el2.csv index d8dc50c83..ab91616c0 100644 --- a/config/projects/scenario_config_el2.csv +++ b/config/projects/scenario_config_el2.csv @@ -19,5 +19,5 @@ gms$s15_exo_alcohol;1;1;1 gms$s15_alc_scen;0;0;0 gms$factor_costs;sticky_labor;sticky_labor;sticky_labor gms$c70_feed_scen;ssp1;ssp2;ssp2 -input['cellular'];rev4.112EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz;; +input['cellular'];rev4.113EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz;; magicc_emis_scen;REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif;REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif;REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif diff --git a/config/projects/scenario_config_fsec.csv b/config/projects/scenario_config_fsec.csv index 551e558a5..699197618 100644 --- a/config/projects/scenario_config_fsec.csv +++ b/config/projects/scenario_config_fsec.csv @@ -76,9 +76,9 @@ gms$s62_max_dem_bioplastic;0;;;;400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c70_fac_req_regr;reg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c70_feed_scen;;;;;;;;;;;;;;;;;;ssp1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c73_build_demand;;;;;;;;;;;;;;;;;;;;;;;;50pc;;;;;;;;;;;;;;;;;;;;;;;;;;; -input['cellular'];rev4.112_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.112_FSEC_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.112_FSEC_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;;rev4.112_FSEC_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.112_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.112_FSEC_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.112_FSEC_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz;;; -input['regional'];rev4.112_FSEC_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -input['validation'];rev4.112_FSEC_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +input['cellular'];rev4.113_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.113_FSEC_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.113_FSEC_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;;rev4.113_FSEC_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.113_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.113_FSEC_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.113_FSEC_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz;;; +input['regional'];rev4.113_FSEC_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +input['validation'];rev4.113_FSEC_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; input['additional'];additional_data_rev4.57.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; input['calibration'];calibration_FSEC_27Sep24.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; magicc_emis_scen;bjoernAR6_C_SSP2-NDC.mif;;;bjoernAR6_C_SSP2-PkBudg900.mif;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;bjoernAR6_C_SSP1-NDC.mif;;;;;;;;;;;;bjoernAR6_C_RemSDP-900-MagSSP1.mif;; diff --git a/config/scenario_config.csv b/config/scenario_config.csv index bb4332083..dc7056913 100755 --- a/config/scenario_config.csv +++ b/config/scenario_config.csv @@ -7,12 +7,12 @@ gms$c14_yields_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c15_food_scenario;;;;SSP1;SSP2;SSP2;SSP3;SSP4;SSP5;SSP1;SSP2;SSP1;SSP1;;;;;;;;;;;;;;;;; gms$s15_rumdairy_scp_substitution;;;;;;;;;;0;0.5;0;0;;;;;;;;;;;;;;;;; gms$s15_food_subst_functional_form;;;;;;;;;;;2;;;;;;;;;;;;;;;;;;; -gms$s15_food_substitution_start;;;;;;;;;;;2020;;;;;;;;;;;;;;;;;;; +gms$s15_food_substitution_start;;;;;;;;;;;2025;;;;;;;;;;;;;;;;;;; gms$s15_food_substitution_target;;;;;;;;;;;2050;;;;;;;;;;;;;;;;;;; gms$kfo_rd;;;;;;;;;;;livst_rum;;;;;;;;;;;;;;;;;;; gms$s15_exo_foodscen_convergence;;;;;;;;;;1;1;1;1;;;;;;;1;1;;;;;;;;; gms$s15_exo_foodscen_functional_form;;;;;;;;;;1;1;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_foodscen_start;;;;;;;;;;2020;2020;2020;2020;;;;;;;2025;2025;;;;;;;;; +gms$s15_exo_foodscen_start;;;;;;;;;;2025;2025;2025;2025;;;;;;;2025;2025;;;;;;;;; gms$s15_exo_foodscen_target;;;;;;;;;;2050;2050;2050;2070;;;;;;;2050;2050;;;;;;;;; gms$s15_exo_waste;;;;;;;;;;1;1;1;1;;;;;;;;;;;;;;;;; gms$s15_waste_scen;;;;;;;;;;1.2;1.3;1.2;1.25;;;;;;;;;;;;;;;;; @@ -74,4 +74,4 @@ gms$c60_biodem_level;;;;;;;;;;;;;;;;;1;0;;;;;;;;;;;; gms$c60_res_2ndgenBE_dem;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;sdp;ssp2;sdp;sdp;;;;;;;;;;;;;;;;; gms$c70_feed_scen;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp5;ssp1;ssp1;;;;;;;;;;;;;;;;; gms$s73_timber_demand_switch;;;;;;;;;;;;;;;;;;;;;;1;1;0;;;;;; -input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;rev4.112_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.112_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.112_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.112_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.112_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.112_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz +input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;rev4.113_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.113_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.113_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.113_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.113_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.113_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz diff --git a/modules/58_peatland/v2/scaling.gms b/modules/58_peatland/v2/scaling.gms index a0f1cec7b..ad96fe3e3 100644 --- a/modules/58_peatland/v2/scaling.gms +++ b/modules/58_peatland/v2/scaling.gms @@ -7,3 +7,4 @@ v58_balance.scale(j,manPeat58) = 10e-5; v58_balance2.scale(j,manPeat58) = 10e-5; +v58_peatlandChange.scale(j,land58) = 10e-3; diff --git a/scripts/output/extra/resubmit.R b/scripts/output/extra/resubmit.R index 2c597b72e..9b86374df 100644 --- a/scripts/output/extra/resubmit.R +++ b/scripts/output/extra/resubmit.R @@ -36,13 +36,16 @@ for (i in 1:length(outputdir)) { print(paste("Checking",outputdir[i])) #gdx file gdx<-file.path(outputdir[i],"fulldata.gdx") - if(file.exists(gdx)) tmp <- modelstat(gdx) else tmp <- 0 - if (any(tmp>2) | all(tmp==0)) { - file.copy(from = "scripts/run_submit/submit.sh",to = file.path(outputdir[i],"submit.sh"),overwrite = TRUE) + if(file.exists(gdx)) { + tmp <- try(modelstat(gdx),silent = TRUE) + if(!is.magpie(tmp)) tmp <- 0 + } else tmp <- 0 + if (any(tmp>2) | any(tmp==0)) { + file.copy(from = "scripts/run_submit/submit_standby.sh",to = file.path(outputdir[i],"submit_standby.sh"),overwrite = TRUE) current <- getwd() setwd(outputdir[i]) if (file.exists("magpie_y1995.gdx")) file.remove("magpie_y1995.gdx") - system("sbatch submit.sh") + system("sbatch submit_standby.sh") setwd(current) } } diff --git a/scripts/start/extra/recalibrateH16.R b/scripts/start/extra/recalibrateH16.R index b576926d9..c01057b46 100644 --- a/scripts/start/extra/recalibrateH16.R +++ b/scripts/start/extra/recalibrateH16.R @@ -17,10 +17,10 @@ source("scripts/start_functions.R") #start MAgPIE run source("config/default.cfg") -cfg$input['regional'] <- "rev4.112_36f73207_magpie.tgz" -cfg$input['validation'] <- "rev4.112_36f73207_validation.tgz" +cfg$input['regional'] <- "rev4.113_36f73207_magpie.tgz" +cfg$input['validation'] <- "rev4.113_36f73207_validation.tgz" cfg$input['calibration'] <- "calibration_H16_27Sep24.tgz" -cfg$input['cellular'] <- "rev4.112_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" +cfg$input['cellular'] <- "rev4.113_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" cfg$results_folder <- "output/:title:" cfg$recalibrate <- FALSE diff --git a/scripts/start/projects/paper_peatlandTax.R b/scripts/start/projects/paper_peatlandTax.R index ea1b26ee8..499582d98 100644 --- a/scripts/start/projects/paper_peatlandTax.R +++ b/scripts/start/projects/paper_peatlandTax.R @@ -23,7 +23,7 @@ source("scripts/start_functions.R") source("config/default.cfg") # create additional information to describe the runs -cfg$info$flag <- "PTax32" +cfg$info$flag <- "PTax34" cfg$results_folder <- "output/:title:" cfg$results_folder_highres <- "output" @@ -44,10 +44,10 @@ cfg$repositories <- append( getOption("magpie_repos") ) -cfg$input['regional'] <- "rev4.112_36f73207_magpie.tgz" -cfg$input['validation'] <- "rev4.112_36f73207_validation.tgz" +cfg$input['regional'] <- "rev4.113_36f73207_magpie.tgz" +cfg$input['validation'] <- "rev4.113_36f73207_validation.tgz" cfg$input['calibration'] <- "calibration_H16_27Sep24.tgz" -cfg$input['cellular'] <- "rev4.112_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" +cfg$input['cellular'] <- "rev4.113_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" download_and_update(cfg) ## Create patch file for GHG prices @@ -147,9 +147,9 @@ cfg$gms$s56_c_price_induced_aff <- 0 ## Start scenarios for (res in c("c400")) { if (res == "c400") - cfg$input['cellular'] <- "rev4.112_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.113_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" else if (res == "c1000") { - cfg$input['cellular'] <- "rev4.112_36f73207_10f98ac1_cellularmagpie_c1000_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.113_36f73207_10f98ac1_cellularmagpie_c1000_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" } ## Ref scenario cfg$title <- .title(cfg, paste(res, ssp, "Ref", sep = "-")) diff --git a/scripts/start/projects/project_ABCDR.R b/scripts/start/projects/project_ABCDR.R index 90ff7ff30..8c627082d 100644 --- a/scripts/start/projects/project_ABCDR.R +++ b/scripts/start/projects/project_ABCDR.R @@ -19,7 +19,7 @@ source("config/default.cfg") #download_and_update(cfg) # create additional information to describe the runs -cfg$info$flag <- "ABCDR13" +cfg$info$flag <- "ABCDR15" cfg$results_folder <- "output/:title:" cfg$force_replace <- TRUE @@ -31,10 +31,10 @@ cfg$qos <- "standby_highMem_dayMax" .title <- function(cfg, ...) return(paste(cfg$info$flag, sep="_",...)) -cfg$input['regional'] <- "rev4.112_36f73207_magpie.tgz" -cfg$input['validation'] <- "rev4.112_36f73207_validation.tgz" +cfg$input['regional'] <- "rev4.113_36f73207_magpie.tgz" +cfg$input['validation'] <- "rev4.113_36f73207_validation.tgz" cfg$input['calibration'] <- "calibration_H16_27Sep24.tgz" -cfg$input['cellular'] <- "rev4.112_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" +cfg$input['cellular'] <- "rev4.113_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" ssp <- "SSP2" @@ -54,19 +54,19 @@ for (pol in c("NDC","1p5deg","1p5deg-Diet")) { cfg$title <- .title(cfg, paste(ssp,pol,ifelse(growth==0,"natveg","plant"),paste0("AFS_tree_",sub("\\.","p",as.character(shr*100))),sep="-")) if (pol == "NDC") { cfg <- setScenario(cfg,c(ssp,"NDC","rcp4p5")) - cfg$input['cellular'] <- "rev4.112_36f73207_30c9dc61_cellularmagpie_c400_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.113_36f73207_30c9dc61_cellularmagpie_c400_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" cfg$gms$c56_mute_ghgprices_until <- "y2150" cfg$gms$c56_pollutant_prices <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-NDC") cfg$gms$c60_2ndgen_biodem <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-NDC") } else if (pol == "1p5deg") { cfg <- setScenario(cfg,c(ssp,"NDC","rcp1p9")) - cfg$input['cellular'] <- "rev4.112_36f73207_bc624950_cellularmagpie_c400_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.113_36f73207_bc624950_cellularmagpie_c400_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" cfg$gms$c56_mute_ghgprices_until <- "y2030" cfg$gms$c56_pollutant_prices <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") cfg$gms$c60_2ndgen_biodem <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") } else if (pol == "1p5deg-Diet") { cfg <- setScenario(cfg,c(ssp,"NDC","rcp1p9","eat_lancet_diet_v1")) - cfg$input['cellular'] <- "rev4.112_36f73207_bc624950_cellularmagpie_c400_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.113_36f73207_bc624950_cellularmagpie_c400_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" cfg$gms$c56_mute_ghgprices_until <- "y2030" cfg$gms$c56_pollutant_prices <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") cfg$gms$c60_2ndgen_biodem <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") diff --git a/scripts/start/projects/project_EAT2p0.R b/scripts/start/projects/project_EAT2p0.R index ae7c3e06c..fa70ea615 100644 --- a/scripts/start/projects/project_EAT2p0.R +++ b/scripts/start/projects/project_EAT2p0.R @@ -90,7 +90,7 @@ bau <- function(cfg) { cfg$gms$c60_2ndgen_biodem <- "R21M42-SSP2-NPi" # default # Climate Change - cfg$input["cellular"] <- "rev4.112EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz" + cfg$input["cellular"] <- "rev4.113EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz" return(cfg) }