Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of FSEC scenarios #469

Merged
merged 13 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### changed
- **scripts** FSEC start scripts and related config files to introduce new scenarios
- **18_residues** bugfix in `q18_cost_prod_res`
- **scripts** updated FSEC start scripts and related config files to introduce new scenarios
- **scripts** quit with exit code = gams status at the end of submit.R
- **scripts** fix in start_functions for the calibration setting `ifneeded`
- **config** best_calib set to FALSE in default
Expand Down
14 changes: 7 additions & 7 deletions config/scenario_fsec.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ gms$s15_exo_fruitvegnut;;;;;;;0;0;1;0;0;0;0;0;0;;;;;;;;;;;;;;;;;1;1;;;;;;;
gms$s15_exo_pulses;;;;;;;0;0;0;0;0;1;0;0;0;;;;;;;;;;;;;;;;;1;1;;;;;;;
gms$s15_exo_sugar;;;;;;;0;0;0;0;0;0;1;0;0;;;;;;;;;;;;;;;;;1;1;;;;;;;
gms$s15_exo_oils;;;;;;;0;0;0;0;0;0;1;0;0;;;;;;;;;;;;;;;;;1;1;;;;;;;
gms$s15_exo_brans;;;;;;;0;0;0;0;0;0;1;0;0;;;;;;;;;;;;;;;;;1;1;;;;;;;
gms$s15_exo_scp;;;;;;;0;0;0;0;0;0;1;0;0;;;;;;;;;;;;;;;;;1;1;;;;;;;
gms$s15_exo_alcohol;;;;;;;0;0;0;0;0;0;1;0;0;;;;;;;;;;;;;;;;;1;1;;;;;;;
gms$c18_burn_scen;constant;;;;;;;;;;;;;;;;;;;;;;;;;;;;;phaseout;;;;;;;;;;
Expand All @@ -43,11 +42,12 @@ gms$s44_target_year;;;;;;;;;;;;;;;;;;;;;2050;;;;;;;;;;;;;;;;;;;
gms$nitrogen;rescaled_jan21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$c55_scen_conf;;;;;;;;;;;;;;;;GoodPractice;;;;;;;;;;;;;;;;;;;;;;;;
gms$c56_emis_policy;none;;;;;;;;;;;;;;;;;sdp_cropeff;;;;;;sdp_redd;sdp_redd;;;;sdp_peatland;;sdp_soil;;;sdp_redd_soil_peat;sdp_all;;;;;
gms$c56_pollutant_prices;SSPDB-SSP2-45-REMIND-MAGPIE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$c56_pollutant_prices;R21M42-SSP2-PkBudg1300;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$s56_c_price_induced_aff;0;;;;;;;;;;;;;;;;;;;;;;;1;;;;;;;;;;;;;;;;
gms$s57_maxmac_n_soil;-1;;;;;;;;;;;;;;;;201;;201;201;;;;;;;;;;;;;;;;;;;;
gms$s57_maxmac_ch4_rice;-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$s57_maxmac_ch4_entferm;-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$s57_maxmac_n_soil;-1;;;;;;;;;;;;;;;;;;201;;;;;;;;;;;;;;;;;;;;;
gms$s57_maxmac_ch4_rice;-1;;;;;;;;;;;;;;;;;;;201;;;;;;;;;;;;;;;;;;;;
gms$s57_maxmac_ch4_entferm;-1;;;;;;;;;;;;;;;;201;;;;;;;;;;;;;;;;;;;;;;;
gms$s57_maxmac_ch4_awms;-1;;;;;;;;;;;;;;;201;;;;;;;;;;;;;;;;;;;;;;;;
gms$s58_rewetting_switch;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Inf;;;;;;;;;;;
gms$som;cellpool_aug16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$c60_2ndgen_biodem;;;;R21M42-SDP-PkBudg1000;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -59,6 +59,6 @@ gms$c73_build_demand;;;;;;;;;;;;;;;;;;;;;;;50pc;;;;;;;;;;;;;;;;;
input['cellular'];rev4.77FSEC_e2bdb6cd_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.77FSEC_e2bdb6cd_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.77FSEC_e2bdb6cd_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.77FSEC_e2bdb6cd_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.77FSEC_e2bdb6cd_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.77FSEC_e2bdb6cd_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.77FSEC_e2bdb6cd_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz
input['regional'];rev4.77FSEC_e2bdb6cd_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['validation'];rev4.77FSEC_e2bdb6cd_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['additional'];additional_data_rev4.31.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['calibration'];calibration_FSEC_14Oct22.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['additional'];additional_data_rev4.32.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['calibration'];calibration_FSEC_13Oct22.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
magicc_emis_scen;bjoernAR6_C_SSP2-NDC.mif;;;bjoernAR6_C_SSP2-PkBudg900.mif;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;bjoernAR6_C_RemSDP-900-MagSSP1.mif;bjoernAR6_C_SSP1-NDC.mif;;;;
2 changes: 1 addition & 1 deletion modules/18_residues/flexreg_apr16/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
q18_cost_prod_res(i2,kres) ..
vm_cost_prod_kres(i2,kres)
=e=
vm_prod_reg(i2,kres)*f18_fac_req_kres(kres);
vm_prod_reg(i2,kres) * fm_attributes("wm",kres) * f18_fac_req_kres(kres);

*' Trade of AG residues is not considered, so that all produced AG residues have
*' to be assigned to uses within the respective world region.
Expand Down
2 changes: 1 addition & 1 deletion modules/59_som/cellpool_aug16/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ p59_som_pool(j,"primforest") = p59_som_pool(j,"primforest") -
(p59_land_before(j,"primforest") - pcm_land(j,"primforest")) *
p59_carbon_density(t-1,j,"primforest");

p59_carbon_density(t,j,noncropland59)$(pcm_land(j,noncropland59)>0) = p59_som_pool(j,noncropland59)/pcm_land(j,noncropland59);
p59_carbon_density(t,j,noncropland59)$(pcm_land(j,noncropland59)>0) = p59_som_pool(j,noncropland59) / pcm_land(j,noncropland59);
p59_carbon_density(t,j,"crop")$(pcm_land(j,"crop")>0) = p59_som_pool(j,"crop") / pcm_land(j,"crop");
5 changes: 3 additions & 2 deletions scripts/output/projects/FSDP_collect.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ val <- as.data.table(read.quitte(val))
saveRDS(val, file = file.path("output", paste(rev, "FSDP_validation.rds", sep = "_")), version = 2, compress = "xz")

message("Plotting figures ...")
heatmapFSDP(reg, tableType = 1, file = file.path("output", paste(rev, "FSDP_heatmap1.jpg", sep = "_")))
heatmapFSDP(reg, tableType = 2, file = file.path("output", paste(rev, "FSDP_heatmap2.jpg", sep = "_")))
heatmapFSDP(reg, tableType = 1, file = file.path("output", paste(rev, "FSDP_heatmap1.jpg", sep = "")))
heatmapFSDP(reg, tableType = "2a", file = file.path("output", paste(rev, "FSDP_heatmap2a.jpg", sep = "")))
heatmapFSDP(reg, tableType = 3, file = file.path("output", paste(rev, "FSDP_heatmap3.jpg", sep = "_")))
spatialMapsFSDP(reg, iso, grid, reg2iso, file = file.path("output", paste(rev, "FSDP_spatialMaps.jpg", sep = "_")))
13 changes: 7 additions & 6 deletions scripts/projects/fsec.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fsecScenario <- function(scenario) {
source("config/default.cfg")

# Version number
v <- "v24_FSEC"
v <- "v26_FSEC"

x <- list(c_BAU = list(standard = c("cc", "rcp7p0", "SSP2", "NDC", "ForestryEndo"),
fsec = "FSEC"),
Expand All @@ -31,14 +31,14 @@ fsecScenario <- function(scenario) {
fsec = c("FSEC", "SSP4")),
d_SSP5bau = list(standard = c("cc", "rcp8p5", "SSP5", "NDC", "ForestryEndo"),
fsec = c("FSEC", "SSP5")),
d_SSP1fsdp = list(standard = c("cc", "rcp4p5", "SSP1", "NDC", "ForestryEndo"),
d_SSP1PLUSfsdp = list(standard = c("cc", "rcp2p6", "SSP1", "NDC", "ForestryEndo"),
fsec = c("FSEC", "SSP1",
"energy", "bioplastics", "population", "institutions", "timberCities",
"awms", "livestock", "nueMAC", "riceMAC", "biodiversity", "fairTrade", "minWage",
"REDDaff", "REDD", "landSharing", "landSparing", "waterSparing", "peatland",
"airPollution", "soil", "allDietAndWaste", "allEnvPrice")),
d_SSP1PLUSfsdp = list(standard = c("cc", "rcp2p6", "SSP1", "NDC", "ForestryEndo"),
d_SSP1fsdp = list(standard = c("cc", "rcp4p5", "SSP1", "NDC", "ForestryEndo"),
fsec = c("FSEC", "SSP1",
"energy", "bioplastics", "population", "institutions", "timberCities",
"awms", "livestock", "nueMAC", "riceMAC", "biodiversity", "fairTrade", "minWage",
"REDDaff", "REDD", "landSharing", "landSparing", "waterSparing", "peatland",
"airPollution", "soil", "allDietAndWaste", "allEnvPrice")),
Expand Down Expand Up @@ -126,6 +126,7 @@ fsecScenario <- function(scenario) {
# FSDP (all transformations active)
e_FSDP = list(standard = c("cc", "rcp2p6", "SSP1", "NDC", "ForestryEndo"),
fsec = c("FSEC",
"energy", "bioplastics", "population", "institutions", "timberCities",
"awms", "livestock", "nueMAC", "riceMAC", "biodiversity", "fairTrade", "minWage",
"REDDaff", "REDD", "landSharing", "landSparing", "waterSparing", "peatland",
"airPollution", "soil", "allDietAndWaste", "allEnvPrice")),
Expand Down Expand Up @@ -205,12 +206,12 @@ fsecScenario <- function(scenario) {
"projects/FSEC_costs",
"projects/FSEC_nitrogenPollution",
"runBlackmagicc",
"FSDP_process",
"projects/FSDP_process",
"projects/FSEC_StevenLord",
"projects/FSEC_SimonDietz",
"projects/FSEC_AlessandroPassaro"
)
cfg$force_download <- TRUE
cfg$force_download <- TRUE

return(cfg)
}
1 change: 1 addition & 0 deletions scripts/start/extra/recalibrate_FSEC.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cfg$title <- "FSEC14Oct22"
cfg$results_folder <- "output/:title:"
cfg$recalibrate <- TRUE
cfg$recalibrate_landconversion_cost <- TRUE
cfg$best_calib <- TRUE
cfg$output <- c("rds_report", "validation_short")
cfg$force_replace <- TRUE
start_run(cfg, codeCheck = FALSE)
Expand Down