Skip to content

Commit

Permalink
Merge branch 'develop' into DeepDive_Develop
Browse files Browse the repository at this point in the history
  • Loading branch information
FelicitasBeier authored Jun 18, 2024
2 parents aebfa7b + 3122e89 commit d685cfe
Show file tree
Hide file tree
Showing 114 changed files with 2,282 additions and 1,689 deletions.
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]

### changed
- **29_ageclass** module 29_ageclass has been renamed to 28_ageclass to make space for `29_cropland` just before `30_croparea`
- **30_crop** module `30_crop` renamed to `30_croparea`, which now only accounts for crop area.
- **30_crop** Semi-Natural Vegetation (SNV) implementation has been moved from `30_crop` to `29_cropland`
- **30_crop** the two realizations `penalty_apr22` and `rotation_apr22` have been merged into a single `30_croparea/detail_apr24` realization
- **30_crop** the previous `30_crop/endo_apr21` realization has been moved to `30_croparea/simple_apr24`
- **default.cfg** update additional data to rev4.51
- **scripts** adjusted SLURM job handling
- **scripts** updated EL2p0 start scripts

### added
- **42_water_demand** added non-agricultural water demand for entire year
- **29_cropland** new module `29_cropland` accounting for crop area, fallow cropland and tree cover on cropland with two realizations: `detail_apr24` and `simple_apr24` (default).
- **10_land** added interface `pm_land_hist` with historic land use patterns

### removed
-
- **32_forestry** removed technical balance term `v32_land_missing_ndc`

### fixed
-
- **22_land_conservation** avoid infeasibilities due to very small numbers, account for cropland tree cover and lower bound of cropland
- **32_forestry** avoid infeasibilities due to very small numbers
- **35_natveg** avoid infeasibilities due to very small numbers
- **44_biodiversity** Fixing to SSP2 parameters until 2025 was not working
- **config** update to input data rev4.109. In the previous rev4.108, MER GDP was wrong and was identical to PPP GDP



## [4.8.0] - 2024-06-10
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Imports:
m4fsdp,
madrat,
magclass (>= 6.14.0),
magpie4,
magpie4 (>= 2.3.10),
MagpieNCGains,
magpiesets,
mip,
Expand Down
184 changes: 140 additions & 44 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cfg$model <- "main.gms" #def = "main.gms"
cfg$input <- c(regional = "rev4.109_h12_magpie.tgz",
cellular = "rev4.109_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz",
validation = "rev4.109_h12_validation.tgz",
additional = "additional_data_rev4.50.tgz",
additional = "additional_data_rev4.51.tgz",
calibration = "calibration_H12_26Mar24.tgz")

# NOTE: It is recommended to recalibrate the model when changing cellular input data
Expand Down Expand Up @@ -175,6 +175,11 @@ oecd90andEU <- "ALB,AUS,AUT,BEL,BIH,BGR,CAN,CYP,CZE,DNK,EST,FIN,FRA,
NLD,NOR,NZL,POL,PRT,ROU,SRB,SVK,SVN,ESP,SWE,CHE,MKD,TUR,
GBR,USA"

isoCountriesEUR <- "ALB,AUT,BEL,BGR,CYP,CZE,DEU,DNK,ESP,EST,FIN,FRA,FRO,
GBR,GGY,GIB,GRC,HRV,HUN,IMN,IRL,ITA,JEY,LTU,LUX,LVA,MLT,
NLD,POL,PRT,ROU,SVK,SVN,SWE"


# ***--------------------- 09_drivers ----------------------------------------
# * (aug17): default drivers
cfg$gms$drivers <- "aug17" # def = aug17
Expand Down Expand Up @@ -205,7 +210,7 @@ cfg$gms$land <- "landmatrix_dec18" # def = landmatrix_dec18
# * The balance variables in the land module avoid infeasibilities due to
# * differences in accuracy between parameters and variables in GAMS.
# * High costs make sure that the balance variables are only used as a last resort.
cfg$gms$s10_cost_balance <- 1000000 # def = 1000000
cfg$gms$s10_cost_balance <- 1e+06 # def = 1e+06


# ***--------------------- 11_costs ------ --------------------------------
Expand Down Expand Up @@ -679,37 +684,20 @@ cfg$gms$s22_conservation_start <- 2025 # def = 2025
# * Target year (year when full protection is reached):
cfg$gms$s22_conservation_target <- 2050 # def = 2050

# ***--------------------- 29_ageclass -----------------------------------
# ***--------------------- 28_ageclass -----------------------------------
# * (feb21): Distribution of age-classes according to Poulter et al 2018
cfg$gms$ageclass <- "feb21" # def = feb21

# ***--------------------- 30_crop ---------------------------------------
# * (endo_apr21): Hard rotational constraints. Dynamic cropland and detailed cropland availability data at grid cell level.
# * (rotation_apr22): hard rotational constraints and fallow constraints with the option of different future scenarios. Dynamic cropland and detailed cropland availability data at grid cell level.
# * (penalty_apr22): rotational and fallow constraints are incentivized via penalty payments. Dynamic cropland and detailed cropland availability data at grid cell level.
# ***--------------------- 29_cropland -----------------------------------
# * Cropland is defined as the sum of croparea, fallow land and tree cover
# * Croparea is provided by 30_crop.
# * Fallow land and tree cover are defined by 29_cropland,
# * (simple_apr24): Fallow land and tree cover on cropland are fixed to zero
# * (detail_apr24): Fallow land and tree cover based on rules or incentives
# NOTE: It is recommended to recalibrate the model when changing this setting!
cfg$gms$crop <- "endo_apr21" # def = endo_apr21
# * (c30_bioen_type): switch for type of bioenergy crops; options: begr, betr, all
cfg$gms$c30_bioen_type <- "all" # def = "all"
# * (c30_bioen_water): switch for irrigation of bioenergy crops; options: rainfed, irrigated, all
cfg$gms$c30_bioen_water <- "rainfed" # def = "rainfed"
# * (c30_rotation_constraints): switch for rotational constraints: on, off
cfg$gms$c30_rotation_constraints <- "on" # def = "on"
# * (c30_rotation_scenario): scenarios for constraints.
# * In realization rotation_apr22: min (minimal constraints), default (best guess), good (good practice),
# * good_20div (good practice - 20% for other crops), setaside (default plus fallow),
# * legumes (minimum share of legumes), agroforestry (minimum share of perennials), sixfoldrotation
# * (crops can only repeat after 6 years), agroecology (mix of previous scenarios)
# * In realization penalty_apr22: none (no incentives), default (best guess), fallow (increased fallow incentives),
# * legumes (increased incentives for legumes), agroforestry (increased incentives for perennials), agroecology (mix)
# * In realization endo_apr21: no scenarios exist.
cfg$gms$c30_rotation_scenario <- "default" # def = "default"
# * Year by which rotation scenario is fully implemented:
# * Start year:
cfg$gms$s30_rotation_scenario_start <- 2025 # def = 2025
# * Target year (year when full implementation is reached):
cfg$gms$s30_rotation_scenario_target <- 2050 # def = 2050
cfg$gms$cropland <- "simple_apr24" # def = simple_apr24

# *** Options for all cropland realizations ***

# * Switch to determine whether marginal land (suitability index below 0.33) should be included
# * in the total available cropland. Options are:
Expand All @@ -718,39 +706,147 @@ cfg$gms$s30_rotation_scenario_target <- 2050 # def = 2050
# * ("no_marginal"): Marginal land is completely excluded from crop cultivation
# * Note: Option "q33_marginal" produces the highest spatial correlation
# * with observed cropland patterns and is recommended for productive runs.
cfg$gms$c30_marginal_land <- "q33_marginal" # def = "q33_marginal"
cfg$gms$c29_marginal_land <- "q33_marginal" # def = "q33_marginal"

# * Switch and specification of countries for selected policies in apply.
# * Options: list of iso-codes of countries where SNV policy should be applied
# * Note: must be written in the format: "IND, BRA, DEU"
# * Default: all iso countries
cfg$gms$policy_countries29 <- all_iso_countries

# * Share of available cropland that is withheld for maintaining semi-natural vegetation (SNV)
# * in each square km in cropland areas, including grassland, forest and other land. For example,
# * a share of 0.2 corresponds to 20 % of SNV in terms of the available cropland.
# * The amount of cropland relocation is estimated based on external high resolution
# * land cover information from the Copernicus Global Land Service for the year 2019.
# * Accepted sensible values are between 0 and 0.5
# Note: s30_snv_shr applies to countries selected in policy_countries30
# s30_snv_shr_noselect applies to all other countries.
cfg$gms$s30_snv_shr <- 0 # def = 0
cfg$gms$s30_snv_shr_noselect <- 0 # def = 0
# * Year by which SNV policy ('s30_snv_shr') is fully implemented.
# Note: s29_snv_shr applies to countries selected in policy_countries29
# s29_snv_shr_noselect applies to all other countries.
cfg$gms$s29_snv_shr <- 0 # def = 0
cfg$gms$s29_snv_shr_noselect <- 0 # def = 0
# * Year by which SNV policy ('s29_snv_shr') is fully implemented.
# * Start year (should be close to 2019):
cfg$gms$s30_snv_scenario_start <- 2025 # def = 2025
cfg$gms$s29_snv_scenario_start <- 2025 # def = 2025
# * Target year (year when full implementation is reached):
cfg$gms$s30_snv_scenario_target <- 2050 # def = 2050
# * Switch and specification of countries for which SNV policy in
# * s30_snv_shr apply.
# * Options: list of iso-codes of countries where SNV policy should be applied
# * Note: must be written in the format: "IND, BRA, DEU"
# * Default: all iso countries
cfg$gms$policy_countries30 <- all_iso_countries
cfg$gms$s29_snv_scenario_target <- 2050 # def = 2050
# * Land types included in the SNV policy. This option allows for sensitivity analyses.
# * plausible options: "secdforest, forestry, past, other",
# * "secdforest, other",
# * "secdforest, past, other" etc.
cfg$gms$land_snv <- "secdforest, forestry, past, other" #def = "secdforest, forestry, past, other"

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

## Agroforestry settings for treecover on cropland
# * Sigmoid fader for minimum area share of treecover on total cropland at cluster level
# * Minimum area share of treecover on total cropland in target year
# Note: s29_treecover_target applies to countries selected in policy_countries29
# s29_treecover_target_noselect applies to all other countries.
cfg$gms$s29_treecover_target <- 0 # def = 0
cfg$gms$s29_treecover_target_noselect <- 0 # def = 0
# * Avoid loss of existing treecover (1=yes 0=no).
# * If set to 1, `s29_treecover_target` will be adjusted based existing treecover area.
cfg$gms$s29_treecover_keep <- 1 # def = 1
# * Maximum share of treecover on total cropland (1)
cfg$gms$s29_treecover_max <- 0.4 # def = 0.4
# * Start year of fader
cfg$gms$s29_treecover_scenario_start <- 2025 # def = 2025
# * Target year of fader (year when full implementation is reached)
cfg$gms$s29_treecover_scenario_target <- 2050 # def = 2050
# * Penalty for violation of treecover target before scenario start (USD05MER per ha)
cfg$gms$s29_treecover_penalty_before <- 5000 # def = 5000
# * Penalty for violation of treecover target after scenario start (USD05MER per ha)
cfg$gms$s29_treecover_penalty <- 5000 # def = 5000
# * Tree cover establishment cost (USD05MER per ha)
cfg$gms$s29_cost_treecover_est <- 2000 # def = 2000
# * Tree cover recurring cost (USD05MER per ha)
cfg$gms$s29_cost_treecover_recur <- 500 # def = 500

# * 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
cfg$gms$s29_fallow_target <- 0 # def = 0
# * Maximum share of fallow land on total cropland
cfg$gms$s29_fallow_max <- 0.4 # def = 0.4
# * Start year of fader
cfg$gms$s29_fallow_scenario_start <- 2025 # def = 2025
# * Target year of fader (year when full implementation is reached)
cfg$gms$s29_fallow_scenario_target <- 2050 # def = 2050
# * Penalty for violation of fallow land target (USD05MER per ha)
cfg$gms$s29_fallow_penalty <- 500 # def = 500

# ***--------------------- 30_croparea ---------------------------------------
# * 30_croparea defines the croparea, which is a subcomponent of total cropland defined in 29_cropland.
# * (simple_apr24): Dynamic croparea with simple rotational constraints
# * (detail_apr24): Dynamic croparea with detailed rules and incentives for rotational constraints
# NOTE: It is recommended to recalibrate the model when changing this setting!
cfg$gms$croparea <- "simple_apr24" # def = simple_apr24

# *** Options for all croparea realizations ***

# * (c30_bioen_type): switch for type of bioenergy crops; options: begr, betr, all
cfg$gms$c30_bioen_type <- "all" # def = "all"
# * (c30_bioen_water): switch for irrigation of bioenergy crops; options: rainfed, irrigated, all
cfg$gms$c30_bioen_water <- "rainfed" # def = "rainfed"

# * Switch and specification of countries for selected policies in apply.
# * Options: list of iso-codes of countries where SNV policy should be applied
# * Note: must be written in the format: "IND, BRA, DEU"
# * Default: all iso countries
cfg$gms$policy_countries30 <- all_iso_countries

## Agroforestry settings for bioenergy trees
# * Sigmoid fader for minimum area share of bioenergy trees (betr) on total cropland at cluster level
# * Minimum area share of bioenergy trees on total cropland in start year
# Note: s30_betr_start applies to countries selected in policy_countries30,
# s30_betr_start_noselect applies to all other countries.
cfg$gms$s30_betr_start <- 0 # def = 0
cfg$gms$s30_betr_start_noselect <- 0 # def = 0
# * Minimum area share of bioenergy trees on total cropland in target year
# Note: s30_betr_target applies to countries selected in policy_countries30,
# s30_betr_target_noselect applies to all other countries.
cfg$gms$s30_betr_target <- 0 # def = 0
cfg$gms$s30_betr_target_noselect <- 0 # def = 0
# * Start year of fader
cfg$gms$s30_betr_scenario_start <- 2025 # def = 2025
# * Target year of fader (year when full implementation is reached)
cfg$gms$s30_betr_scenario_target <- 2050 # def = 2050
# * Penalty for violation of the target (USD05MER per ha)
cfg$gms$s30_betr_penalty <- 2000 # def = 2000

# * Allowed annual cropland growth per year per region, relative to the current cropland level
# * e.g., 0.02: 2% annual growth, compounded to 10.4% growth for five-years timestep
cfg$gms$s30_annual_max_growth <- Inf # def = Inf

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

# * (c30_rotation_constraints): switch for rotational constraints: on, off
cfg$gms$c30_rotation_constraints <- "on" # def = "on"

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

# * Switch for rule-based (1) or penalty-based (0) implementation of rotation scenarios
cfg$gms$s30_implementation <- 1 # def = 1

# * Rotation rules:
# * min (minimal constraints), default (best guess), good (good practice),
# * good_20div (good practice - 20% for other crops), setaside (default plus fallow),
# * legumes (minimum share of legumes), sixfoldrotation (crops can only repeat after 6 years),
# * agroecology (mix of previous scenarios), FSEC (similar to agroecology)
# * betr0 (minimum share of short rotation agroforestry trees), betr10, betr20, betr25, betr30, betr40, betr50.
cfg$gms$c30_rotation_rules <- "default" # def = "default"

# * Rotation incentives:
# * none (no incentives), default (best guess),
# * legumes (increased incentives for legumes), agroecology (mix),
# * betr500 and betr1000 (incentives for short rotation agroforestry trees)
cfg$gms$c30_rotation_incentives <- "none" # def = "none"

# * Year by which rotation scenario is fully implemented:
# * Start year:
cfg$gms$s30_rotation_scenario_start <- 2025 # def = 2025
# * Target year (year when full implementation is reached):
cfg$gms$s30_rotation_scenario_target <- 2050 # def = 2050

# ***--------------------- 31_past ---------------------------------------
# * (static): static pasture
# * (endo_jun13): dynamic pasture
Expand Down Expand Up @@ -1920,7 +2016,7 @@ cfg$gms$s73_expansion <- 0 # def = 0
cfg$gms$optimization <- "nlp_apr17" # def = nlp_apr17

# maximal number of solve iterations
cfg$gms$s80_maxiter <- 30
cfg$gms$s80_maxiter <- 30 # def = 30

# Solver settings only for realization `lp_nlp_apr17`. All other realizations use `conopt4`.
# * (conopt4): conopt4
Expand Down Expand Up @@ -1998,7 +2094,7 @@ cfg$files2export$start <- c("input/info.txt",
"modules/14_yields/input/lpj_yields_0.5.mz",
"modules/22_land_conservation/input/wdpa_baseline_0.5.mz",
"modules/22_land_conservation/input/consv_prio_areas_0.5.mz",
"modules/30_crop/endo_apr21/input/avl_cropland_0.5.mz",
"modules/29_cropland/input/avl_cropland_0.5.mz",
"modules/50_nr_soil_budget/input/f50_NitrogenFixationRateNatural_0.5.mz",
"modules/50_nr_soil_budget/input/f50_AtmosphericDepositionRates_0.5.mz",
"input/f34_urbanland_0.5.mz",
Expand Down
Loading

0 comments on commit d685cfe

Please sign in to comment.