Skip to content

Commit

Permalink
Merge pull request #719 from flohump/f_ABCDR
Browse files Browse the repository at this point in the history
Update ABCDR
  • Loading branch information
flohump authored Sep 17, 2024
2 parents 58d1391 + 3dde5cb commit 753a4db
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- **config** split scenario_config into project-specific configs
- **config** initial treecover on cropland starts from zero
- **config** additional data update additional_data_rev4.53.tgz
- **29_cropland** added option for linear and sigmoidal faders


### added
- **scripts** added output report `EU_report.R` that uses `EU_report.Rmd`
Expand Down
3 changes: 3 additions & 0 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ cfg$gms$land_snv <- "secdforest, forestry, past, other" #def = "secdforest, f

# *** Options only available for `detail_apr24` realization ***

# * Switch for functional form of faders (1=linear 2=sigmoid)
cfg$gms$s29_fader_functional_form <- 2 # def = 2

## Agroforestry settings for treecover on cropland
# * Initial tree cover
# * (0): tree cover on cropland starts from zero
Expand Down
1 change: 1 addition & 0 deletions modules/29_cropland/detail_apr24/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ scalars
s29_fallow_max Maximum share of fallow land on total cropland (1) / 0.4 /
s29_fallow_penalty Penalty for violation of fallow target (USD05MER per ha) / 500 /
s29_treecover_map Treecover map for initialization (binary) / 0 /
s29_fader_functional_form Switch for functional form of faders (1) / 2 /
;


Expand Down
14 changes: 10 additions & 4 deletions modules/29_cropland/detail_apr24/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
*** | Contact: [email protected]

** Trajectory for cropland scenarios
* sigmoidal interpolation between start year and target year
m_sigmoid_time_interpol(i29_snv_scenario_fader,s29_snv_scenario_start,s29_snv_scenario_target,0,1);
m_sigmoid_time_interpol(i29_treecover_scenario_fader,s29_treecover_scenario_start,s29_treecover_scenario_target,0,1);
m_sigmoid_time_interpol(i29_fallow_scenario_fader,s29_fallow_scenario_start,s29_fallow_scenario_target,0,1);
* linear or sigmoidal interpolation between start year and target year
if (s29_fader_functional_form = 1,
m_linear_time_interpol(i29_snv_scenario_fader,s29_snv_scenario_start,s29_snv_scenario_target,0,1);
m_linear_time_interpol(i29_treecover_scenario_fader,s29_treecover_scenario_start,s29_treecover_scenario_target,0,1);
m_linear_time_interpol(i29_fallow_scenario_fader,s29_fallow_scenario_start,s29_fallow_scenario_target,0,1);
elseif s29_fader_functional_form = 2,
m_sigmoid_time_interpol(i29_snv_scenario_fader,s29_snv_scenario_start,s29_snv_scenario_target,0,1);
m_sigmoid_time_interpol(i29_treecover_scenario_fader,s29_treecover_scenario_start,s29_treecover_scenario_target,0,1);
m_sigmoid_time_interpol(i29_fallow_scenario_fader,s29_fallow_scenario_start,s29_fallow_scenario_target,0,1);
);

* linear interpolation to estimate the cropland that
* requires relocation due to SNV policy
Expand Down
12 changes: 7 additions & 5 deletions scripts/start/projects/project_ABCDR.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ source("config/default.cfg")
#download_and_update(cfg)

# create additional information to describe the runs
cfg$info$flag <- "ABCDR07"
cfg$info$flag <- "ABCDR08"

cfg$results_folder <- "output/:title:"
cfg$force_replace <- TRUE
cfg$force_download <- FALSE

cfg$qos <- "standby_maxMem_dayMax"
#cfg$qos <- "priority"

# support function to create standardized title
.title <- function(cfg, ...) return(paste(cfg$info$flag, sep="_",...))
Expand All @@ -40,7 +39,6 @@ cfg$input['cellular'] <- "rev4.111_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM
ssp <- "SSP2"

cfg$gms$cropland <- "detail_apr24"
# cfg$gms$croparea <- "detail_apr24"


cfg$gms$scen_countries15 <- isoCountriesEUR
Expand All @@ -53,8 +51,12 @@ 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)) {
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"))
Expand All @@ -75,7 +77,7 @@ for (pol in c("NDC","1p5deg","1p5deg-Diet")) {
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
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)
}
Expand Down

0 comments on commit 753a4db

Please sign in to comment.