Skip to content

Commit

Permalink
update start scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
flohump committed Oct 2, 2024
1 parent b9a6940 commit 1f5f594
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 31 deletions.
6 changes: 6 additions & 0 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,12 @@ cfg$gms$s29_treecover_penalty <- 6150 # def = 5000 * 1.23
cfg$gms$s29_cost_treecover_est <- 2460 # def = 2000 * 1.23
# * Tree cover recurring cost (USD17MER per ha)
cfg$gms$s29_cost_treecover_recur <- 615 # def = 500 * 1.23
# * Switch for using natural vegetation (0) or plantation (1) growth curves towards LPJmL natural
# * vegetation carbon density.
cfg$gms$s29_treecover_plantation <- 0 # def = 0
# * Switch for using secondary vegetation (0) or timber plantation (1) BII coefficients
# * The recommend setting is to map the BII coefficient to the choice of the growth curve.
cfg$gms$s29_treecover_bii_coeff <- 0 # def = 0

# * Sigmoid fader for minimum area share of fallow land on total cropland at cluster level
# * Minimum area share of fallow land on total cropland in target year
Expand Down
3 changes: 2 additions & 1 deletion scripts/start/projects/paper_peatlandTax.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ source("scripts/start_functions.R")
source("config/default.cfg")

# create additional information to describe the runs
cfg$info$flag <- "PTax26"
cfg$info$flag <- "PTax30"

cfg$results_folder <- "output/:title:"
cfg$results_folder_highres <- "output"
Expand Down Expand Up @@ -166,6 +166,7 @@ for (res in c("c400")) {
"T400-GHG-GWP20")) {
cfg$title <- .title(cfg, paste(res, ssp, tax, sep = "-"))
cfg$gms$c56_mute_ghgprices_until <- "y2025"
cfg$gms$s58_cost_drain_intact_onetime <- 10000
cfg$gms$c56_pollutant_prices <- tax
start_run(cfg, codeCheck = FALSE)
}
Expand Down
58 changes: 28 additions & 30 deletions scripts/start/projects/project_ABCDR.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source("config/default.cfg")
#download_and_update(cfg)

# create additional information to describe the runs
cfg$info$flag <- "ABCDR09"
cfg$info$flag <- "ABCDR10"

cfg$results_folder <- "output/:title:"
cfg$force_replace <- TRUE
Expand All @@ -40,45 +40,43 @@ ssp <- "SSP2"

cfg$gms$cropland <- "detail_apr24"


cfg$gms$scen_countries15 <- isoCountriesEUR
cfg$gms$policy_countries29 <- isoCountriesEUR
cfg$gms$policy_countries30 <- isoCountriesEUR


cfg$gms$s29_treecover_keep <- 0
cfg$gms$s29_treecover_penalty_before <- 0
cfg$gms$s29_treecover_penalty <- 5000
cfg$gms$s30_betr_penalty <- 0

cfg$gms$s29_fader_functional_form <- 1 # linear fader
cfg$gms$s29_treecover_scenario_start <- 2025
cfg$gms$s29_treecover_scenario_target <- 2060

for (pol in c("NDC","1p5deg","1p5deg-Diet")) {
for (shr in c(0, 0.005, 0.01, 0.02)) { # share in 2045
cfg$title <- .title(cfg, paste(ssp,pol,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$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$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$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")
for (growth in c(0,1)) {
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$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$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$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")
}
cfg$gms$s29_treecover_target <- shr / (2045 - 2025) * (2060 - 2025) # Continue linear increase after 2045 until 2060
cfg$gms$s30_betr_target <- 0
cfg$gms$s30_betr_penalty <- 0
cfg$gms$s29_treecover_plantation <- growth
cfg$gms$s29_treecover_bii_coeff <- growth
start_run(cfg, codeCheck = FALSE)
}
cfg$gms$s29_treecover_target <- shr / (2045 - 2025) * (2060 - 2025) # Continue linear increase after 2045 until 2060
cfg$gms$s30_betr_target <- 0
start_run(cfg, codeCheck = FALSE)
}
}

0 comments on commit 1f5f594

Please sign in to comment.