Skip to content

Commit

Permalink
Merge pull request #705 from FelicitasBeier/DeepDive_Develop
Browse files Browse the repository at this point in the history
Small script update and parameter fix
  • Loading branch information
FelicitasBeier authored Jul 26, 2024
2 parents 92d984c + 0dbddcf commit ba89ab1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- **15_food** revision of MP/SCP implementation for milk and meat alternatives. Added demand for fat and sugar as ingredients for MP-based milk alternatives. Added optional demand for fat as ingredient for MP-based meat alternatives.
- **script** scripts/start_functions.R decide individually for demand and price whether they are read from a REMIND report.
- **80_optimization** abort GAMS in case of execution errors
- **script** updated EATLancet project start scripts

### added
- **scripts** added output report `EU_report.R` that uses `EU_report.Rmd`
Expand All @@ -26,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### fixed
- **scripts** fixing an error in start.R and output.R which occurred if more than one slurm job was submitted at the same time.
- **15_food** fixing parameter declaration of i15_processed_kcal_structure_iso


## [4.8.1] - 2024-06-19
Expand Down
8 changes: 4 additions & 4 deletions modules/15_food/anthro_iso_jun22/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ parameters
p15_livestock_threshold_subst_fader(t_all) Fader for livestock threshold target (1)
p15_exo_food_scenario_fader(t_all) Exogenous diet scenario fader (1)

*prices
p15_prices_kcal(t,iso,kfo,iter15) Prices from MAgPIE after optimization (USD05PPP per kcal)
i15_prices_initial_kcal(iso,kfo) Initial prices that capture the approximate level of prices in 1961-2010 (USD05PPP per kcal)
* prices
p15_prices_kcal(t,iso,kfo,iter15) Prices from MAgPIE after optimization (USD05PPP per kcal)
i15_prices_initial_kcal(iso,kfo) Initial prices that capture the approximate level of prices in 1961-2010 (USD05PPP per kcal)

* anthropometrics
p15_bodyheight(t,iso,sex,age,estimates15) Body height (cm per cap)
Expand Down Expand Up @@ -118,7 +118,7 @@ parameters
i15_staples_kcal_structure_iso(t,iso,kfo_st) Share of single staple products within total staples (1)
i15_livestock_kcal_structure_iso_raw(t,iso,kfo_ap) Share of single livestock products within total livestock products (uncorrected for future changes in shares) (1)
i15_livestock_kcal_structure_iso(t,iso,kfo_ap) Share of single livestock products within total livestock products (corrected for future changes in shares) (1)
i15_processed_kcal_structure_iso Share of single processed products within total processed food (1)
i15_processed_kcal_structure_iso(t,iso,kfo_pf) Share of single processed products within total processed food (1)

* diet calibration
p15_kcal_calib(t,iso,kfo) Balance flow to diverge from mean calories of regressions (kcal per cap per day)
Expand Down
16 changes: 8 additions & 8 deletions modules/15_food/anthropometrics_jan18/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ parameters
p15_livestock_threshold_subst_fader(t_all) Fader for livestock threshold target (1)
p15_exo_food_scenario_fader(t_all) Exogenous diet scenario fader (1)

*prices
p15_prices_kcal(t,iso,kfo,iter15) Prices from MAgPIE after optimization (USD05PPP per kcal)
i15_prices_initial_kcal(iso,kfo) Initial prices that capture the approximate level of prices in 1961-2010 (USD05PPP per kcal)
* prices
p15_prices_kcal(t,iso,kfo,iter15) Prices from MAgPIE after optimization (USD05PPP per kcal)
i15_prices_initial_kcal(iso,kfo) Initial prices that capture the approximate level of prices in 1961-2010 (USD05PPP per kcal)

* anthropometrics
o15_bmi_shr(t,iso,sex,age,bmi_group15) Calibrated estimates BMI share for population groups (1)
Expand Down Expand Up @@ -118,12 +118,12 @@ parameters
i15_rumdairy_scp_fadeout(t,i) Ruminant meat and dairy fadeout share to be replaced by SCP (1)
i15_livestock_fadeout_threshold(t,i) Livestock fadeout share for threshold (1)

i15_protein_to_kcal_ratio(t,kfo) protein-to-kcal ratio (g protein per kcal)
i15_protein_to_kcal_ratio(t,kfo) Protein-to-kcal ratio (g protein per kcal)

i15_staples_kcal_structure_iso(t,iso,kfo_st) Share of single staple products within total staples (1)
i15_livestock_kcal_structure_iso_raw(t,iso,kfo_ap) Share of single livestock products within total livestock products (uncorrected for future changes in shares) (1)
i15_livestock_kcal_structure_iso(t,iso,kfo_ap) Share of single livestock products within total livestock products (corrected for future changes in shares) (1)
i15_processed_kcal_structure_iso Share of single processed products within total processed food (1)
i15_staples_kcal_structure_iso(t,iso,kfo_st) Share of single staple products within total staples (1)
i15_livestock_kcal_structure_iso_raw(t,iso,kfo_ap) Share of single livestock products within total livestock products (uncorrected for future changes in shares) (1)
i15_livestock_kcal_structure_iso(t,iso,kfo_ap) Share of single livestock products within total livestock products (corrected for future changes in shares) (1)
i15_processed_kcal_structure_iso(t,iso,kfo_pf) Share of single processed products within total processed food (1)

* diet calibration
p15_kcal_calib(t,iso,kfo) Balance flow to diverge from mean calories of regressions (kcal per cap per day)
Expand Down
7 changes: 5 additions & 2 deletions scripts/start/projects/project_EAT2p0.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ cfg <- setScenario(cfg, c("cc", "SSP2", "NPI"))
# Trade: BAU
bau <- function(cfg) {

# for feasibility
cfg$gms$s80_optfile <- 1

### General settings ###
# For impacts of CC on labor:
cfg$gms$factor_costs <- "sticky_labor"
Expand Down Expand Up @@ -133,9 +136,9 @@ waste <- function(cfg) {
miti <- function(cfg) {
# Mitigation: consistent with 1.5C considering diet change
# To Do: update to iteration 5!
cfg$path_to_report_ghgprices <- "/p/projects/magpie/users/beier/EL2_DeepDive_release/remind/output/C_SSP2EU-DSPkB650-DS_betax_AgMIP-rem-8/REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_AgMIP-rem-8.mif"
cfg$path_to_report_ghgprices <- "/p/projects/magpie/users/beier/EL2_DeepDive_release/remind/output/C_SSP2EU-DSPkB650-DS_betax_AgMIP-rem-12/REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_AgMIP-rem-12.mif"
cfg$gms$c56_pollutant_prices <- "coupling"
cfg$path_to_report_bioenergy <- "/p/projects/magpie/users/beier/EL2_DeepDive_release/remind/output/C_SSP2EU-DSPkB650-DS_betax_AgMIP-rem-8/REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_AgMIP-rem-8.mif"
cfg$path_to_report_bioenergy <- "/p/projects/magpie/users/beier/EL2_DeepDive_release/remind/output/C_SSP2EU-DSPkB650-DS_betax_AgMIP-rem-12/REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_AgMIP-rem-12.mif"
cfg$gms$c60_2ndgen_biodem <- "coupling"

return(cfg)
Expand Down
8 changes: 7 additions & 1 deletion scripts/start/projects/project_EAT2p0_DeepDive.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cfg$output <- c(
)

# Set path to own coupled runs:
path2MitigationRun <- "/p/projects/magpie/users/beier/EL2_DeepDive_release/remind/output/C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-8/REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-8.mif"
path2MitigationRun <- "/p/projects/magpie/users/beier/EL2_DeepDive_release/remind/output/C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12/REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif"


#######################
Expand All @@ -63,6 +63,12 @@ cfg <- setScenario(cfg, c("nocc_hist", "SSP2", "NPI", "EL2_default"))
# Trade: BAU
bau <- function(cfg) {

# time steps until 2150
cfg$gms$c_timesteps <- "less_TS"

# for feasibility
cfg$gms$s80_optfile <- 1

cfg$gms$factor_costs <- "sticky_labor"
### Components for Decomposition ###
# Diets: exogenous EATLancet diet
Expand Down

0 comments on commit ba89ab1

Please sign in to comment.