diff --git a/CHANGELOG.md b/CHANGELOG.md index c64cffcb32..0eb11e2780 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### changed +- **38_factor_costs** updated use of USDA cost shares - **inputdata** changed GDP base year from 2005USD to 2017USD - **config** changed default input data to use 2017USD - **module_documentation** all references to USD05 changed to USD17 diff --git a/config/default.cfg b/config/default.cfg index 404772ab33..f15f836398 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -22,9 +22,9 @@ cfg$model <- "main.gms" #def = "main.gms" #### input settings #### # which input data sets should be used? -cfg$input <- c(regional = "rev4.114_h12_magpie.tgz", - cellular = "rev4.114_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", - validation = "rev4.114_h12_validation.tgz", +cfg$input <- c(regional = "rev4.115_h12_magpie.tgz", + cellular = "rev4.115_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz", + validation = "rev4.115_h12_validation.tgz", additional = "additional_data_rev4.57.tgz", calibration = "calibration_H12_27Sep24.tgz") diff --git a/config/projects/scenario_config_el2.csv b/config/projects/scenario_config_el2.csv index c9b84c1c5f..4fb7c28973 100644 --- a/config/projects/scenario_config_el2.csv +++ b/config/projects/scenario_config_el2.csv @@ -19,5 +19,5 @@ gms$s15_exo_alcohol;1;1;1 gms$s15_alc_scen;0;0;0 gms$factor_costs;sticky_labor;sticky_labor;sticky_labor gms$c70_feed_scen;ssp1;ssp2;ssp2 -input['cellular'];rev4.114EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz;; +input['cellular'];rev4.115EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz;; magicc_emis_scen;REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif;REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif;REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif diff --git a/config/projects/scenario_config_fsec.csv b/config/projects/scenario_config_fsec.csv index 9cbebdbf97..a007d17c34 100644 --- a/config/projects/scenario_config_fsec.csv +++ b/config/projects/scenario_config_fsec.csv @@ -76,9 +76,9 @@ gms$s62_max_dem_bioplastic;0;;;;400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c70_fac_req_regr;reg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c70_feed_scen;;;;;;;;;;;;;;;;;;ssp1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c73_build_demand;;;;;;;;;;;;;;;;;;;;;;;;50pc;;;;;;;;;;;;;;;;;;;;;;;;;;; -input['cellular'];rev4.114_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.114_FSEC_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.114_FSEC_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;;rev4.114_FSEC_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.114_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.114_FSEC_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.114_FSEC_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz;;; -input['regional'];rev4.114_FSEC_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -input['validation'];rev4.114_FSEC_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +input['cellular'];rev4.115_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.115_FSEC_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.115_FSEC_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;;rev4.115_FSEC_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.115_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.115_FSEC_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.115_FSEC_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz;;; +input['regional'];rev4.115_FSEC_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +input['validation'];rev4.115_FSEC_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; input['additional'];additional_data_rev4.57.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; input['calibration'];calibration_FSEC_27Sep24.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; magicc_emis_scen;bjoernAR6_C_SSP2-NDC.mif;;;bjoernAR6_C_SSP2-PkBudg900.mif;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;bjoernAR6_C_SSP1-NDC.mif;;;;;;;;;;;;bjoernAR6_C_RemSDP-900-MagSSP1.mif;; diff --git a/config/scenario_config.csv b/config/scenario_config.csv index b13b26be80..fe9e64437b 100755 --- a/config/scenario_config.csv +++ b/config/scenario_config.csv @@ -74,4 +74,4 @@ gms$c60_biodem_level;;;;;;;;;;;;;;;;;;;;1;0;;;;;;;;;;;; gms$c60_res_2ndgenBE_dem;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;sdp;ssp2;sdp;sdp;;;;;;;;;;;;;;;;;;;; gms$c70_feed_scen;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp5;ssp1;ssp1;;;;;;;;;;;;;;;;;;;; gms$s73_timber_demand_switch;;;;;;;;;;;;;;;;;;;;;;;;;1;1;0;;;;;; -input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.114_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.114_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.114_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.114_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.114_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.114_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz +input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.115_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.115_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.115_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.115_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.115_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.115_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz diff --git a/modules/36_employment/exo_may22/declarations.gms b/modules/36_employment/exo_may22/declarations.gms index 60bc8d96f1..1e1c3b74ae 100644 --- a/modules/36_employment/exo_may22/declarations.gms +++ b/modules/36_employment/exo_may22/declarations.gms @@ -23,8 +23,6 @@ parameters pm_productivity_gain_from_wages(t,i) Multiplicative factor describing productivity gain related to higher wages (1) p36_total_hours_worked(iso) Total hours worked by all employed people (mio. hours per year) p36_calibration_hourly_costs(iso) Additive calibration term for hourly labor costs (USD17MER per hour) - p36_cost_share(t,i) Capital share of factor costs (1) - p36_share_calibration(i) Additive calibration term for capital shares (1) p36_nonmagpie_labor_costs(t,i) Labor costs from subsidies and Value of Production not covered by MAgPIE (mio. USD17MER) ; diff --git a/modules/36_employment/exo_may22/input.gms b/modules/36_employment/exo_may22/input.gms index 994887e337..cc33cd77bc 100644 --- a/modules/36_employment/exo_may22/input.gms +++ b/modules/36_employment/exo_may22/input.gms @@ -54,19 +54,3 @@ $ondelim $include "./modules/36_employment/exo_may22/input/f36_nonmagpie_factor_costs.csv" $offdelim ; - -parameter f36_regr_cap_share(reg36) Parameters for dynamic regression -/ -$ondelim -$include "./modules/36_employment/exo_may22/input/f36_regression_cap_share.csv" -$offdelim -/ -; - -table f36_hist_cap_share(t_all,i) Historical capital share -$ondelim -$include "./modules/36_employment/exo_may22/input/f36_historical_share.csv" -$offdelim -; - - diff --git a/modules/36_employment/exo_may22/input/files b/modules/36_employment/exo_may22/input/files index d7ddcb6ef8..adbd3d2b95 100644 --- a/modules/36_employment/exo_may22/input/files +++ b/modules/36_employment/exo_may22/input/files @@ -6,5 +6,3 @@ f36_regression_hourly_labor_costs.csv f36_historic_ag_employment.csv f36_unspecified_subsidies.csv f36_nonmagpie_factor_costs.csv -f36_regression_cap_share.csv -f36_historical_share.csv diff --git a/modules/36_employment/exo_may22/presolve.gms b/modules/36_employment/exo_may22/presolve.gms index fc00b55a6d..f75f0f56ff 100644 --- a/modules/36_employment/exo_may22/presolve.gms +++ b/modules/36_employment/exo_may22/presolve.gms @@ -5,14 +5,6 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -* capital cost share to split non-magpie factor costs into labor and capital -p36_share_calibration(i) = f36_hist_cap_share("y2010",i)-(f36_regr_cap_share("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso))))+f36_regr_cap_share("intercept")); - -if (m_year(t)<2010, - p36_cost_share(t,i) = f36_hist_cap_share(t,i); -elseif (m_year(t)>=2010), - p36_cost_share(t,i) = f36_regr_cap_share("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f36_regr_cap_share("intercept")+p36_share_calibration(i); -); *' @code @@ -21,7 +13,7 @@ elseif (m_year(t)>=2010), *' are both kept constant for future years. p36_nonmagpie_labor_costs(t,i) = (f36_unspecified_subsidies(t,i) + f36_nonmagpie_factor_costs(t,i)) * - (1-p36_cost_share(t,i)) * (1/pm_productivity_gain_from_wages(t,i)) * + (pm_factor_cost_shares(t,i,"labor")) * (1/pm_productivity_gain_from_wages(t,i)) * (pm_hourly_costs(t,i,"scenario") / pm_hourly_costs(t,i,"baseline")); *' @stop diff --git a/modules/38_factor_costs/input/files b/modules/38_factor_costs/input/files index cc31093237..fda8548a95 100644 --- a/modules/38_factor_costs/input/files +++ b/modules/38_factor_costs/input/files @@ -1,5 +1,6 @@ * list of files that are required here -f38_historical_share.csv +f38_historical_share_iso.csv f38_regression_cap_share.csv f38_fac_req_fao.csv -f38_fac_req_fao_regional.cs4 \ No newline at end of file +f38_fac_req_fao_regional.cs4 +f38_hist_factor_costs_iso.csv diff --git a/modules/38_factor_costs/per_ton_fao_may22/declarations.gms b/modules/38_factor_costs/per_ton_fao_may22/declarations.gms index 29f31dba80..03b0d553a1 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/declarations.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/declarations.gms @@ -15,9 +15,10 @@ vm_cost_prod_crop(i,factors) Regional factor costs of capital and labor for ; parameter -pm_cost_share_crops(t,i,factors) Capital and labor shares of the regional factor costs for crop production (1) -p38_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) -i38_fac_req(t_all,i,kcr) Factor requirements (USD17MER per tDM) +p38_capital_cost_shares_iso(t,iso) Capital shares of factor costs on iso level (1) +p38_capital_share_calibration(iso) Summation factor used to calibrate calculated capital shares with historical values (1) +pm_factor_cost_shares(t,i,factors) Capital and labor shares of factor costs on regional level (1) +i38_fac_req(t_all,i,kcr) Factor requirements (USD17MER per tDM) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### diff --git a/modules/38_factor_costs/per_ton_fao_may22/equations.gms b/modules/38_factor_costs/per_ton_fao_may22/equations.gms index 94d8bacc07..a42e33dabd 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/equations.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/equations.gms @@ -9,12 +9,12 @@ q38_cost_prod_crop_labor(i2) .. vm_cost_prod_crop(i2,"labor") =e= sum(kcr, vm_prod_reg(i2,kcr) * sum(ct,i38_fac_req(ct,i2,kcr))) * - sum(ct,pm_cost_share_crops(ct,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) * + sum(ct,pm_factor_cost_shares(ct,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) * (pm_hourly_costs(ct,i2,"scenario") / pm_hourly_costs(ct,i2,"baseline"))); q38_cost_prod_crop_capital(i2) .. vm_cost_prod_crop(i2,"capital") =e= sum(kcr, vm_prod_reg(i2,kcr) * sum(ct,i38_fac_req(ct,i2,kcr))) * - sum(ct,pm_cost_share_crops(ct,i2,"capital")); + sum(ct,pm_factor_cost_shares(ct,i2,"capital")); *' The factor costs for crops `vm_cost_prod_crop` are calculated as product of *' production quantity `vm_prod_reg` and crop-specific factor requirements diff --git a/modules/38_factor_costs/per_ton_fao_may22/input.gms b/modules/38_factor_costs/per_ton_fao_may22/input.gms index f04303aa89..203a30213f 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/input.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/input.gms @@ -33,8 +33,14 @@ $offdelim / ; -table f38_historical_share(t_all,i) Historical capital share +table f38_historical_share(t_all,iso) Historical capital share $ondelim -$include "./modules/38_factor_costs/input/f38_historical_share.csv" +$include "./modules/38_factor_costs/input/f38_historical_share_iso.csv" +$offdelim +; + +table f38_hist_factor_costs(t_all,iso) Historical factor costs for crop and livestock (mio USD17MER) +$ondelim +$include "./modules/38_factor_costs/input/f38_hist_factor_costs_iso.csv" $offdelim ; diff --git a/modules/38_factor_costs/per_ton_fao_may22/preloop.gms b/modules/38_factor_costs/per_ton_fao_may22/preloop.gms new file mode 100644 index 0000000000..44b1a86f39 --- /dev/null +++ b/modules/38_factor_costs/per_ton_fao_may22/preloop.gms @@ -0,0 +1,19 @@ +*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) +*** | authors, and contributors see CITATION.cff file. This file is part +*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +*** | AGPL-3.0, you are granted additional permissions described in the +*** | MAgPIE License Exception, version 1.0 (see LICENSE file). +*** | Contact: magpie@pik-potsdam.de + +* calculate capital cost shares from regression +p38_capital_share_calibration(iso) = sum(t_past$(ord(t_past) eq card(t_past)), f38_historical_share(t_past,iso) - (f38_reg_parameters("slope") * + log10(im_gdp_pc_ppp_iso(t_past,iso)) + f38_reg_parameters("intercept"))); + +p38_capital_cost_shares_iso(t,iso)$(m_year(t)<2010) = f38_historical_share(t,iso); +p38_capital_cost_shares_iso(t,iso)$(m_year(t)>=2010) = f38_reg_parameters("slope") * log10(im_gdp_pc_ppp_iso(t,iso)) + f38_reg_parameters("intercept") + p38_capital_share_calibration(iso); + +* aggregate factor cost shares +pm_factor_cost_shares(t,i,"capital") = sum(t_past$(ord(t_past) eq card(t_past)), + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso) * p38_capital_cost_shares_iso(t,iso)) / + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso))); +pm_factor_cost_shares(t,i,"labor") = 1 - pm_factor_cost_shares(t,i,"capital"); diff --git a/modules/38_factor_costs/per_ton_fao_may22/presolve.gms b/modules/38_factor_costs/per_ton_fao_may22/presolve.gms index 58300986ba..67923af624 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/presolve.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/presolve.gms @@ -20,14 +20,3 @@ elseif m_year(t)>=2010, else i38_fac_req(t,i,kcr) = i38_fac_req(t,i,kcr); ); - -p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept")); - -if (m_year(t)<2010, - pm_cost_share_crops(t,i,"capital") = f38_historical_share(t,i); - pm_cost_share_crops(t,i,"labor") = 1 - f38_historical_share(t,i); - -elseif (m_year(t)>=2010), - pm_cost_share_crops(t,i,"capital") = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept")+p38_share_calibration(i); - pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital"); -); diff --git a/modules/38_factor_costs/per_ton_fao_may22/realization.gms b/modules/38_factor_costs/per_ton_fao_may22/realization.gms index 44dfd75df6..81c5f87e5d 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/realization.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/realization.gms @@ -24,6 +24,7 @@ $Ifi "%phase%" == "declarations" $include "./modules/38_factor_costs/per_ton_fao $Ifi "%phase%" == "input" $include "./modules/38_factor_costs/per_ton_fao_may22/input.gms" $Ifi "%phase%" == "equations" $include "./modules/38_factor_costs/per_ton_fao_may22/equations.gms" $Ifi "%phase%" == "scaling" $include "./modules/38_factor_costs/per_ton_fao_may22/scaling.gms" +$Ifi "%phase%" == "preloop" $include "./modules/38_factor_costs/per_ton_fao_may22/preloop.gms" $Ifi "%phase%" == "presolve" $include "./modules/38_factor_costs/per_ton_fao_may22/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/38_factor_costs/per_ton_fao_may22/postsolve.gms" *######################## R SECTION END (PHASES) ############################### diff --git a/modules/38_factor_costs/sticky_feb18/declarations.gms b/modules/38_factor_costs/sticky_feb18/declarations.gms index 744328c67d..5b4d232df5 100644 --- a/modules/38_factor_costs/sticky_feb18/declarations.gms +++ b/modules/38_factor_costs/sticky_feb18/declarations.gms @@ -24,8 +24,9 @@ parameters p38_capital_immobile(t,j,kcr) Preexisting immobile capital stocks before investment (mio USD17MER) p38_capital_mobile(t,j) Preexisting mobile capital stocks before investment (mio USD17MER) - pm_cost_share_crops(t,i,factors) Capital and labor shares of the regional factor costs for crop production (1) - p38_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) + p38_capital_cost_shares_iso(t,iso) Capital shares of factor costs on iso level (1) + p38_capital_share_calibration(iso) Summation factor used to calibrate calculated capital shares with historical values (1) + pm_factor_cost_shares(t,i,factors) Capital and labor shares of factor costs on regional level (1) p38_croparea_start(j,w,kcr) Agricultural land initialization area (mio. ha) diff --git a/modules/38_factor_costs/sticky_feb18/input.gms b/modules/38_factor_costs/sticky_feb18/input.gms index 73d26f6d04..a186255029 100644 --- a/modules/38_factor_costs/sticky_feb18/input.gms +++ b/modules/38_factor_costs/sticky_feb18/input.gms @@ -39,8 +39,14 @@ $offdelim / ; -table f38_historical_share(t_all,i) Historical capital share +table f38_historical_share(t_all,iso) Historical capital share $ondelim -$include "./modules/38_factor_costs/input/f38_historical_share.csv" +$include "./modules/38_factor_costs/input/f38_historical_share_iso.csv" +$offdelim +; + +table f38_hist_factor_costs(t_all,iso) Historical factor costs for crop and livestock (mio USD17MER) +$ondelim +$include "./modules/38_factor_costs/input/f38_hist_factor_costs_iso.csv" $offdelim ; diff --git a/modules/38_factor_costs/sticky_feb18/input/files b/modules/38_factor_costs/sticky_feb18/input/files index f427961d4b..dbebab811f 100644 --- a/modules/38_factor_costs/sticky_feb18/input/files +++ b/modules/38_factor_costs/sticky_feb18/input/files @@ -1,5 +1,6 @@ * list of files that are required here f38_region_yield.csv -f38_historical_share.csv +f38_historical_share_iso.csv f38_regression_cap_share.csv f38_fac_req_fao.csv +f38_hist_factor_costs_iso.csv diff --git a/modules/38_factor_costs/sticky_feb18/preloop.gms b/modules/38_factor_costs/sticky_feb18/preloop.gms new file mode 100644 index 0000000000..44b1a86f39 --- /dev/null +++ b/modules/38_factor_costs/sticky_feb18/preloop.gms @@ -0,0 +1,19 @@ +*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) +*** | authors, and contributors see CITATION.cff file. This file is part +*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +*** | AGPL-3.0, you are granted additional permissions described in the +*** | MAgPIE License Exception, version 1.0 (see LICENSE file). +*** | Contact: magpie@pik-potsdam.de + +* calculate capital cost shares from regression +p38_capital_share_calibration(iso) = sum(t_past$(ord(t_past) eq card(t_past)), f38_historical_share(t_past,iso) - (f38_reg_parameters("slope") * + log10(im_gdp_pc_ppp_iso(t_past,iso)) + f38_reg_parameters("intercept"))); + +p38_capital_cost_shares_iso(t,iso)$(m_year(t)<2010) = f38_historical_share(t,iso); +p38_capital_cost_shares_iso(t,iso)$(m_year(t)>=2010) = f38_reg_parameters("slope") * log10(im_gdp_pc_ppp_iso(t,iso)) + f38_reg_parameters("intercept") + p38_capital_share_calibration(iso); + +* aggregate factor cost shares +pm_factor_cost_shares(t,i,"capital") = sum(t_past$(ord(t_past) eq card(t_past)), + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso) * p38_capital_cost_shares_iso(t,iso)) / + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso))); +pm_factor_cost_shares(t,i,"labor") = 1 - pm_factor_cost_shares(t,i,"capital"); diff --git a/modules/38_factor_costs/sticky_feb18/presolve.gms b/modules/38_factor_costs/sticky_feb18/presolve.gms index c770b89f7a..0691f0e9ad 100644 --- a/modules/38_factor_costs/sticky_feb18/presolve.gms +++ b/modules/38_factor_costs/sticky_feb18/presolve.gms @@ -9,17 +9,6 @@ if (smax(j, pm_labor_prod(t,j)) <> 1 OR smin(j, pm_labor_prod(t,j)) <> 1, abort "This factor cost realization cannot handle labor productivities != 1" ); -p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept")); - -if (m_year(t)<2010, - pm_cost_share_crops(t,i,"capital") = f38_historical_share(t,i); - pm_cost_share_crops(t,i,"labor") = 1 - f38_historical_share(t,i); - -elseif (m_year(t)>=2010), - pm_cost_share_crops(t,i,"capital") = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept")+p38_share_calibration(i); - pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital"); -); - * choosing between regional (+time dependent) or global (from 2005) factor requirements $if "%c38_fac_req%" == "glo" i38_fac_req(t,i,kcr) = f38_fac_req(kcr); $if "%c38_fac_req%" == "reg" i38_fac_req(t,i,kcr) = f38_fac_req_fao_reg(t,i,kcr); @@ -32,9 +21,9 @@ else i38_fac_req(t,i,kcr) = i38_fac_req(t,i,kcr); ); -p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"labor"); -p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile); -p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile; +p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"labor"); +p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile); +p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile; if (ord(t) = 1, diff --git a/modules/38_factor_costs/sticky_feb18/realization.gms b/modules/38_factor_costs/sticky_feb18/realization.gms index 6317ee59a6..3070759e8e 100644 --- a/modules/38_factor_costs/sticky_feb18/realization.gms +++ b/modules/38_factor_costs/sticky_feb18/realization.gms @@ -24,6 +24,7 @@ $Ifi "%phase%" == "declarations" $include "./modules/38_factor_costs/sticky_feb1 $Ifi "%phase%" == "input" $include "./modules/38_factor_costs/sticky_feb18/input.gms" $Ifi "%phase%" == "equations" $include "./modules/38_factor_costs/sticky_feb18/equations.gms" $Ifi "%phase%" == "scaling" $include "./modules/38_factor_costs/sticky_feb18/scaling.gms" +$Ifi "%phase%" == "preloop" $include "./modules/38_factor_costs/sticky_feb18/preloop.gms" $Ifi "%phase%" == "presolve" $include "./modules/38_factor_costs/sticky_feb18/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/38_factor_costs/sticky_feb18/postsolve.gms" *######################## R SECTION END (PHASES) ############################### diff --git a/modules/38_factor_costs/sticky_labor/declarations.gms b/modules/38_factor_costs/sticky_labor/declarations.gms index 3d926064b4..3a1c7a6401 100644 --- a/modules/38_factor_costs/sticky_labor/declarations.gms +++ b/modules/38_factor_costs/sticky_labor/declarations.gms @@ -29,8 +29,9 @@ parameters p38_capital_immobile(t,j,kcr) Preexisting immobile capital stocks before investment (mio USD17MER) p38_capital_mobile(t,j) Preexisting mobile capital stocks before investment (mio USD17MER) - pm_cost_share_crops(t,i,factors) Capital and labor shares of the regional factor costs for crop production (1) - p38_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) + p38_capital_cost_shares_iso(t,iso) Capital shares of factor costs on iso level (1) + p38_capital_share_calibration(iso) Summation factor used to calibrate calculated capital shares with historical values (1) + pm_factor_cost_shares(t,i,factors) Capital and labor shares of factor costs on regional level (1) p38_min_labor_share(t,j) Minimum labor share out of labor plus capital needed (1) p38_croparea_start(j,w,kcr) Agricultural land initialization area (mio. ha) @@ -54,7 +55,7 @@ parameters ov38_investment_mobile(t,j,type) Investment costs in mobile farm capital (mio USD17MER per yr) ov38_laborhours_need(t,j,kcr,type) Labor required per unit of output (hours per ton DM) ov38_capital_need(t,j,kcr,mobil38,type) Captial required per unit of output (USD17MER per ton DM) - ov38_relax_CES_lp(t,j,kcr,type) Variable to make CES function feasible in linearized model (1) + ov38_relax_CES_lp(t,j,kcr,type) Variable to make CES function feasible in linearized model (1) oq38_cost_prod_labor(t,i,type) Regional labor input costs for crop production (mio USD17MER) oq38_cost_prod_capital(t,i,type) Regional capital input costs for crop production (mio USD17MER) oq38_investment_immobile(t,j,kcr,type) Cellular immobile investments into farm capital (mio USD17MER) diff --git a/modules/38_factor_costs/sticky_labor/input.gms b/modules/38_factor_costs/sticky_labor/input.gms index 0e96a2a567..1caf2e0472 100644 --- a/modules/38_factor_costs/sticky_labor/input.gms +++ b/modules/38_factor_costs/sticky_labor/input.gms @@ -44,8 +44,14 @@ $offdelim / ; -table f38_historical_share(t_all,i) Historical capital share +table f38_historical_share(t_all,iso) Historical capital share $ondelim -$include "./modules/38_factor_costs/input/f38_historical_share.csv" +$include "./modules/38_factor_costs/input/f38_historical_share_iso.csv" +$offdelim +; + +table f38_hist_factor_costs(t_all,iso) Historical factor costs for crop and livestock (mio USD17MER) +$ondelim +$include "./modules/38_factor_costs/input/f38_hist_factor_costs_iso.csv" $offdelim ; diff --git a/modules/38_factor_costs/sticky_labor/input/files b/modules/38_factor_costs/sticky_labor/input/files index f427961d4b..dbebab811f 100644 --- a/modules/38_factor_costs/sticky_labor/input/files +++ b/modules/38_factor_costs/sticky_labor/input/files @@ -1,5 +1,6 @@ * list of files that are required here f38_region_yield.csv -f38_historical_share.csv +f38_historical_share_iso.csv f38_regression_cap_share.csv f38_fac_req_fao.csv +f38_hist_factor_costs_iso.csv diff --git a/modules/38_factor_costs/sticky_labor/preloop.gms b/modules/38_factor_costs/sticky_labor/preloop.gms index 031692e316..5b5c0d1649 100644 --- a/modules/38_factor_costs/sticky_labor/preloop.gms +++ b/modules/38_factor_costs/sticky_labor/preloop.gms @@ -10,10 +10,15 @@ s38_ces_elast_par = (1/s38_ces_elast_subst) - 1 ; p38_intr_depr(t,i) = (1-s38_depreciation_rate) * pm_interest(t,i)/(1+pm_interest(t,i)) + s38_depreciation_rate; -* calculate labor/capital cost shares from regression -p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept")); +* calculate capital cost shares from regression +p38_capital_share_calibration(iso) = sum(t_past$(ord(t_past) eq card(t_past)), f38_historical_share(t_past,iso) - (f38_reg_parameters("slope") * + log10(im_gdp_pc_ppp_iso(t_past,iso)) + f38_reg_parameters("intercept"))); -pm_cost_share_crops(t,i,"capital")$(m_year(t)<2010) = f38_historical_share(t,i); -pm_cost_share_crops(t,i,"capital")$(m_year(t)>=2010) = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept")+p38_share_calibration(i); +p38_capital_cost_shares_iso(t,iso)$(m_year(t)<2010) = f38_historical_share(t,iso); +p38_capital_cost_shares_iso(t,iso)$(m_year(t)>=2010) = f38_reg_parameters("slope") * log10(im_gdp_pc_ppp_iso(t,iso)) + f38_reg_parameters("intercept") + p38_capital_share_calibration(iso); -pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital"); +* aggregate factor cost shares +pm_factor_cost_shares(t,i,"capital") = sum(t_past$(ord(t_past) eq card(t_past)), + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso) * p38_capital_cost_shares_iso(t,iso)) / + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso))); +pm_factor_cost_shares(t,i,"labor") = 1 - pm_factor_cost_shares(t,i,"capital"); diff --git a/modules/38_factor_costs/sticky_labor/presolve.gms b/modules/38_factor_costs/sticky_labor/presolve.gms index df95ef82ef..9db187bfa6 100644 --- a/modules/38_factor_costs/sticky_labor/presolve.gms +++ b/modules/38_factor_costs/sticky_labor/presolve.gms @@ -17,26 +17,26 @@ else i38_fac_req(t,i,kcr) = i38_fac_req(t,i,kcr); ); -p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"labor"); -p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile); -p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile; +p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"labor"); +p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile); +p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile; * minimum labor share based on target and adjustment factor if (m_year(t) <= s38_startyear_labor_substitution, p38_min_labor_share(t,j) = 0; elseif m_year(t) <= s38_targetyear_labor_share, p38_min_labor_share(t,j) = sum(cell(i,j), - max(pm_cost_share_crops(t,i,"labor"), pm_cost_share_crops(t,i,"labor") + + max(pm_factor_cost_shares(t,i,"labor"), pm_factor_cost_shares(t,i,"labor") + ((m_year(t)-s38_startyear_labor_substitution)/(s38_targetyear_labor_share-s38_startyear_labor_substitution) * (s38_target_fulfillment * (s38_target_labor_share - sum(t2$(m_year(t2) = s38_targetyear_labor_share), - pm_cost_share_crops(t2,i,"labor"))))))); + pm_factor_cost_shares(t2,i,"labor"))))))); else p38_min_labor_share(t,j)$(sum(t2$(m_year(t2) = s38_targetyear_labor_share), - sum(cell(i,j), pm_cost_share_crops(t2,i,"labor"))) <= s38_target_labor_share) + sum(cell(i,j), pm_factor_cost_shares(t2,i,"labor"))) <= s38_target_labor_share) = sum(t2$(m_year(t2) = s38_targetyear_labor_share), p38_min_labor_share(t2,j)); p38_min_labor_share(t,j)$(sum(t2$(m_year(t2) = s38_targetyear_labor_share), - sum(cell(i,j), pm_cost_share_crops(t2,i,"labor"))) > s38_target_labor_share) - = max(sum(cell(i,j), pm_cost_share_crops(t,i,"labor")), s38_target_labor_share); + sum(cell(i,j), pm_factor_cost_shares(t2,i,"labor"))) > s38_target_labor_share) + = max(sum(cell(i,j), pm_factor_cost_shares(t,i,"labor")), s38_target_labor_share); ); * overwrite with 0 in case target labor share is 0 (i.e. off) diff --git a/modules/57_maccs/on_aug22/equations.gms b/modules/57_maccs/on_aug22/equations.gms index fcd0dc6d7b..2af85f3ec6 100644 --- a/modules/57_maccs/on_aug22/equations.gms +++ b/modules/57_maccs/on_aug22/equations.gms @@ -39,7 +39,7 @@ q57_labor_costs(i2) .. + sum(emis_source_inorg_fert_n2o, (vm_emissions_reg(i2,emis_source_inorg_fert_n2o,"n2o_n_direct") / s57_implicit_emis_factor) * sum(ct,im_maccs_mitigation(ct,i2,emis_source_inorg_fert_n2o,"n2o_n_direct")) * s57_implicit_fert_cost)) - * sum(ct, pm_cost_share_crops(ct ,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) * + * sum(ct, pm_factor_cost_shares(ct ,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) * (pm_hourly_costs(ct,i2,"scenario") / pm_hourly_costs(ct,i2,"baseline"))); q57_capital_costs(i2) .. @@ -49,4 +49,4 @@ q57_capital_costs(i2) .. + sum(emis_source_inorg_fert_n2o, (vm_emissions_reg(i2,emis_source_inorg_fert_n2o,"n2o_n_direct") / s57_implicit_emis_factor) * sum(ct,im_maccs_mitigation(ct,i2,emis_source_inorg_fert_n2o,"n2o_n_direct")) * s57_implicit_fert_cost)) - * sum(ct, pm_cost_share_crops(ct ,i2,"capital")); + * sum(ct, pm_factor_cost_shares(ct ,i2,"capital")); diff --git a/modules/70_livestock/fbask_jan16/declarations.gms b/modules/70_livestock/fbask_jan16/declarations.gms index 2641126d57..0b1503dba5 100644 --- a/modules/70_livestock/fbask_jan16/declarations.gms +++ b/modules/70_livestock/fbask_jan16/declarations.gms @@ -32,8 +32,6 @@ parameters i70_foddr_scp_fadeout(t_all,i) Fodder fadeout (share 0-1) to be replaced by SCP (1) p70_country_dummy(iso) Dummy parameter indicating whether country is affected by feed scenarios (1) p70_feedscen_region_shr(t_all,i) Weighted share of region with regards to feed scenario of countries (1) - p70_cost_share_livst(t,i,factors) Capital and labor shares of the regional factor costs for plant production for livestock (1) - p70_cost_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) i70_cost_regr(i,kap,cost_regr) Regression coefficients for livestock factor requirements (1) i70_fac_req_livst(t_all,i,kli) Factor requirements (USD17MER per tDM) p70_cereal_subst_fader(t_all) Cereal feed substitution with SCP fader (1) diff --git a/modules/70_livestock/fbask_jan16/equations.gms b/modules/70_livestock/fbask_jan16/equations.gms index 53e594a19c..7773d8e6f8 100644 --- a/modules/70_livestock/fbask_jan16/equations.gms +++ b/modules/70_livestock/fbask_jan16/equations.gms @@ -35,12 +35,12 @@ q70_feed(i2,kap,kall) .. q70_cost_prod_liv_labor(i2) .. vm_cost_prod_livst(i2,"labor") =e= sum(kli, vm_prod_reg(i2,kli) * sum(ct, i70_fac_req_livst(ct,i2,kli))) - *sum(ct, p70_cost_share_livst(ct,i2,"labor")) + *sum(ct, pm_factor_cost_shares(ct,i2,"labor")) *sum(ct, (1/pm_productivity_gain_from_wages(ct,i2)) * (pm_hourly_costs(ct,i2,"scenario") / pm_hourly_costs(ct,i2,"baseline"))); q70_cost_prod_liv_capital(i2) .. vm_cost_prod_livst(i2,"capital") =e= sum(kli, vm_prod_reg(i2,kli) * sum(ct, i70_fac_req_livst(ct,i2,kli))) - *sum(ct, p70_cost_share_livst(ct,i2,"capital")); + *sum(ct, pm_factor_cost_shares(ct,i2,"capital")); q70_cost_prod_fish(i2) .. vm_cost_prod_fish(i2) =e= diff --git a/modules/70_livestock/fbask_jan16/input.gms b/modules/70_livestock/fbask_jan16/input.gms index 8156155b8a..6161ae4a10 100644 --- a/modules/70_livestock/fbask_jan16/input.gms +++ b/modules/70_livestock/fbask_jan16/input.gms @@ -67,20 +67,6 @@ $include "./modules/70_livestock/fbask_jan16/input/f70_pyld_slope_reg.cs4" $offdelim /; -parameter f70_cap_share_reg(share_regr) Parameters for regression -/ -$ondelim -$include "./modules/70_livestock/fbask_jan16/input/f70_cap_share_reg.csv" -$offdelim -/ -; - -table f70_hist_cap_share(t_all,i) Historical capital share -$ondelim -$include "./modules/70_livestock/fbask_jan16/input/f70_hist_cap_share.csv" -$offdelim -; - table f70_hist_factor_costs_livst(t_all,i,kli) Historical factor costs in livestock production (mio. USD17MER) $ondelim $include "./modules/70_livestock/fbask_jan16/input/f70_hist_factor_costs_livst.cs3" diff --git a/modules/70_livestock/fbask_jan16/input/files b/modules/70_livestock/fbask_jan16/input/files index ca00704e44..8de709636b 100644 --- a/modules/70_livestock/fbask_jan16/input/files +++ b/modules/70_livestock/fbask_jan16/input/files @@ -5,7 +5,5 @@ f70_livestock_productivity.cs3 f70_capit_liv_regr.csv f70_slaughter_feed_share.cs4 f70_pyld_slope_reg.cs4 -f70_cap_share_reg.csv -f70_hist_cap_share.csv f70_hist_factor_costs_livst.cs3 f70_hist_prod_livst.cs3 diff --git a/modules/70_livestock/fbask_jan16/presolve.gms b/modules/70_livestock/fbask_jan16/presolve.gms index 5d1dda4fee..59c9667511 100644 --- a/modules/70_livestock/fbask_jan16/presolve.gms +++ b/modules/70_livestock/fbask_jan16/presolve.gms @@ -55,16 +55,6 @@ else *' @stop -p70_cost_share_calibration(i) = f70_hist_cap_share("y2010",i)-(f70_cap_share_reg("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso))))+f70_cap_share_reg("intercept")); - -if (m_year(t)<2010, - p70_cost_share_livst(t,i,"capital") = f70_hist_cap_share(t,i); - p70_cost_share_livst(t,i,"labor") = 1 - f70_hist_cap_share(t,i); - -elseif (m_year(t)>=2010), - p70_cost_share_livst(t,i,"capital") = f70_cap_share_reg("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f70_cap_share_reg("intercept")+p70_cost_share_calibration(i); - p70_cost_share_livst(t,i,"labor") = 1 - p70_cost_share_livst(t,i,"capital"); -); diff --git a/modules/70_livestock/fbask_jan16_sticky/declarations.gms b/modules/70_livestock/fbask_jan16_sticky/declarations.gms index 0ea7887eea..4e00176562 100644 --- a/modules/70_livestock/fbask_jan16_sticky/declarations.gms +++ b/modules/70_livestock/fbask_jan16_sticky/declarations.gms @@ -34,8 +34,6 @@ parameters i70_foddr_scp_fadeout(t_all,i) Fodder fadeout (share 0-1) to be replaced by SCP (1) p70_country_dummy(iso) Dummy parameter indicating whether country is affected by feed scenarios (1) p70_feedscen_region_shr(t_all,i) Weighted share of region with regards to feed scenario of countries (1) - p70_cost_share_livst(t,i,factors) Capital and labor shares of the regional factor costs for plant production for livestock (1) - p70_cost_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) i70_cost_regr(i,kap,cost_regr) Regression coefficients for livestock factor requirements (1) i70_fac_req_livst(t_all,i,kli) Factor requirements (USD17MER per tDM) p70_cereal_subst_fader(t_all) Cereal feed substitution with SCP fader (1) diff --git a/modules/70_livestock/fbask_jan16_sticky/equations.gms b/modules/70_livestock/fbask_jan16_sticky/equations.gms index 5febb63386..4a5b32746c 100644 --- a/modules/70_livestock/fbask_jan16_sticky/equations.gms +++ b/modules/70_livestock/fbask_jan16_sticky/equations.gms @@ -35,7 +35,7 @@ q70_feed(i2,kap,kall) .. q70_cost_prod_liv_labor(i2) .. vm_cost_prod_livst(i2,"labor") =e= sum(kli, vm_prod_reg(i2,kli) * sum(ct, i70_fac_req_livst(ct,i2,kli))) - *sum(ct, p70_cost_share_livst(ct,i2,"labor")) + *sum(ct, pm_factor_cost_shares(ct,i2,"labor")) *sum(ct, (1/pm_productivity_gain_from_wages(ct,i2)) * (pm_hourly_costs(ct,i2,"scenario") / pm_hourly_costs(ct,i2,"baseline"))); diff --git a/modules/70_livestock/fbask_jan16_sticky/input.gms b/modules/70_livestock/fbask_jan16_sticky/input.gms index dd728cd7ad..6b17181e57 100644 --- a/modules/70_livestock/fbask_jan16_sticky/input.gms +++ b/modules/70_livestock/fbask_jan16_sticky/input.gms @@ -69,20 +69,6 @@ $include "./modules/70_livestock/fbask_jan16_sticky/input/f70_pyld_slope_reg.cs4 $offdelim /; -parameter f70_cap_share_reg(share_regr) Parameters for regression -/ -$ondelim -$include "./modules/70_livestock/fbask_jan16_sticky/input/f70_cap_share_reg.csv" -$offdelim -/ -; - -table f70_hist_cap_share(t_all,i) Historical capital share -$ondelim -$include "./modules/70_livestock/fbask_jan16_sticky/input/f70_hist_cap_share.csv" -$offdelim -; - table f70_hist_factor_costs_livst(t_all,i,kli) Historical factor costs in livestock production (mio. USD17MER) $ondelim $include "./modules/70_livestock/fbask_jan16_sticky/input/f70_hist_factor_costs_livst.cs3" diff --git a/modules/70_livestock/fbask_jan16_sticky/input/files b/modules/70_livestock/fbask_jan16_sticky/input/files index ca00704e44..8de709636b 100644 --- a/modules/70_livestock/fbask_jan16_sticky/input/files +++ b/modules/70_livestock/fbask_jan16_sticky/input/files @@ -5,7 +5,5 @@ f70_livestock_productivity.cs3 f70_capit_liv_regr.csv f70_slaughter_feed_share.cs4 f70_pyld_slope_reg.cs4 -f70_cap_share_reg.csv -f70_hist_cap_share.csv f70_hist_factor_costs_livst.cs3 f70_hist_prod_livst.cs3 diff --git a/modules/70_livestock/fbask_jan16_sticky/presolve.gms b/modules/70_livestock/fbask_jan16_sticky/presolve.gms index b0f81f8b02..d78de1a773 100644 --- a/modules/70_livestock/fbask_jan16_sticky/presolve.gms +++ b/modules/70_livestock/fbask_jan16_sticky/presolve.gms @@ -55,17 +55,6 @@ else *' @stop -p70_cost_share_calibration(i) = f70_hist_cap_share("y2010",i)-(f70_cap_share_reg("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso))))+f70_cap_share_reg("intercept")); - -if (m_year(t)<2010, - p70_cost_share_livst(t,i,"capital") = f70_hist_cap_share(t,i); - p70_cost_share_livst(t,i,"labor") = 1 - f70_hist_cap_share(t,i); - -elseif (m_year(t)>=2010), - p70_cost_share_livst(t,i,"capital") = f70_cap_share_reg("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f70_cap_share_reg("intercept")+p70_cost_share_calibration(i); - p70_cost_share_livst(t,i,"labor") = 1 - p70_cost_share_livst(t,i,"capital"); -); - *** Section implementing the "sticky" part of the realization *' The capital need per unit of production is based on the capital share of the factor requirements, @@ -73,7 +62,7 @@ elseif (m_year(t)>=2010), *' In addition `s70_multiplicator_capital_need` can be used to increase the capital need. p70_capital_need(t,i,kli) = i70_fac_req_livst(t,i,kli) - * p70_cost_share_livst(t,i,"capital") + * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s70_depreciation_rate) * s70_multiplicator_capital_need; diff --git a/scripts/start/extra/recalibrateH16.R b/scripts/start/extra/recalibrateH16.R index 43330dd11f..f2d3fa5cd9 100644 --- a/scripts/start/extra/recalibrateH16.R +++ b/scripts/start/extra/recalibrateH16.R @@ -17,10 +17,10 @@ source("scripts/start_functions.R") #start MAgPIE run source("config/default.cfg") -cfg$input['regional'] <- "rev4.114_36f73207_magpie.tgz" -cfg$input['validation'] <- "rev4.114_36f73207_validation.tgz" +cfg$input['regional'] <- "rev4.115_36f73207_magpie.tgz" +cfg$input['validation'] <- "rev4.115_36f73207_validation.tgz" cfg$input['calibration'] <- "calibration_H16_27Sep24.tgz" -cfg$input['cellular'] <- "rev4.114_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" +cfg$input['cellular'] <- "rev4.115_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" cfg$results_folder <- "output/:title:" cfg$recalibrate <- FALSE diff --git a/scripts/start/projects/paper_peatlandTax.R b/scripts/start/projects/paper_peatlandTax.R index 48ee3c328c..5b20f9e1b9 100644 --- a/scripts/start/projects/paper_peatlandTax.R +++ b/scripts/start/projects/paper_peatlandTax.R @@ -44,10 +44,10 @@ cfg$repositories <- append( getOption("magpie_repos") ) -cfg$input['regional'] <- "rev4.114_36f73207_magpie.tgz" -cfg$input['validation'] <- "rev4.114_36f73207_validation.tgz" +cfg$input['regional'] <- "rev4.115_36f73207_magpie.tgz" +cfg$input['validation'] <- "rev4.115_36f73207_validation.tgz" cfg$input['calibration'] <- "calibration_H16_27Sep24.tgz" -cfg$input['cellular'] <- "rev4.114_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" +cfg$input['cellular'] <- "rev4.115_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" download_and_update(cfg) ## Create patch file for GHG prices @@ -147,9 +147,9 @@ cfg$gms$s56_c_price_induced_aff <- 0 ## Start scenarios for (res in c("c400")) { if (res == "c400") - cfg$input['cellular'] <- "rev4.114_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.115_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" else if (res == "c1000") { - cfg$input['cellular'] <- "rev4.114_36f73207_10f98ac1_cellularmagpie_c1000_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.115_36f73207_10f98ac1_cellularmagpie_c1000_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" } ## Ref scenario cfg$title <- .title(cfg, paste(res, ssp, "Ref", sep = "-")) diff --git a/scripts/start/projects/project_ABCDR.R b/scripts/start/projects/project_ABCDR.R index 154489725c..cf52c94a97 100644 --- a/scripts/start/projects/project_ABCDR.R +++ b/scripts/start/projects/project_ABCDR.R @@ -31,10 +31,10 @@ cfg$qos <- "standby_highMem_dayMax" .title <- function(cfg, ...) return(paste(cfg$info$flag, sep="_",...)) -cfg$input['regional'] <- "rev4.114_36f73207_magpie.tgz" -cfg$input['validation'] <- "rev4.114_36f73207_validation.tgz" +cfg$input['regional'] <- "rev4.115_36f73207_magpie.tgz" +cfg$input['validation'] <- "rev4.115_36f73207_validation.tgz" cfg$input['calibration'] <- "calibration_H16_27Sep24.tgz" -cfg$input['cellular'] <- "rev4.114_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" +cfg$input['cellular'] <- "rev4.115_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" ssp <- "SSP2" @@ -54,19 +54,19 @@ for (pol in c("NDC","1p5deg","1p5deg-Diet")) { 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.114_36f73207_30c9dc61_cellularmagpie_c400_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.115_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.114_36f73207_bc624950_cellularmagpie_c400_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.115_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.114_36f73207_bc624950_cellularmagpie_c400_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$input['cellular'] <- "rev4.115_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") diff --git a/scripts/start/projects/project_EAT2p0.R b/scripts/start/projects/project_EAT2p0.R index 0fd148dc35..fdc7042f28 100644 --- a/scripts/start/projects/project_EAT2p0.R +++ b/scripts/start/projects/project_EAT2p0.R @@ -90,7 +90,7 @@ bau <- function(cfg) { cfg$gms$c60_2ndgen_biodem <- "R21M42-SSP2-NPi" # default # Climate Change - cfg$input["cellular"] <- "rev4.114EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz" + cfg$input["cellular"] <- "rev4.115EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz" return(cfg) }