Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update of use of USDA cost shares #741

Merged
merged 10 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion config/projects/scenario_config_el2.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions config/projects/scenario_config_fsec.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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;;
2 changes: 1 addition & 1 deletion config/scenario_config.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions modules/36_employment/exo_may22/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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)
;

Expand Down
16 changes: 0 additions & 16 deletions modules/36_employment/exo_may22/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
;


2 changes: 0 additions & 2 deletions modules/36_employment/exo_may22/input/files
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 1 addition & 9 deletions modules/36_employment/exo_may22/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

* 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

Expand All @@ -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
5 changes: 3 additions & 2 deletions modules/38_factor_costs/input/files
Original file line number Diff line number Diff line change
@@ -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
f38_fac_req_fao_regional.cs4
f38_hist_factor_costs_iso.csv
7 changes: 4 additions & 3 deletions modules/38_factor_costs/per_ton_fao_may22/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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) ####################
Expand Down
4 changes: 2 additions & 2 deletions modules/38_factor_costs/per_ton_fao_may22/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions modules/38_factor_costs/per_ton_fao_may22/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
;
19 changes: 19 additions & 0 deletions modules/38_factor_costs/per_ton_fao_may22/preloop.gms
Original file line number Diff line number Diff line change
@@ -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: [email protected]

* 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");
11 changes: 0 additions & 11 deletions modules/38_factor_costs/per_ton_fao_may22/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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");
);
1 change: 1 addition & 0 deletions modules/38_factor_costs/per_ton_fao_may22/realization.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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) ###############################
5 changes: 3 additions & 2 deletions modules/38_factor_costs/sticky_feb18/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 8 additions & 2 deletions modules/38_factor_costs/sticky_feb18/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
;
3 changes: 2 additions & 1 deletion modules/38_factor_costs/sticky_feb18/input/files
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions modules/38_factor_costs/sticky_feb18/preloop.gms
Original file line number Diff line number Diff line change
@@ -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: [email protected]

* 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");
17 changes: 3 additions & 14 deletions modules/38_factor_costs/sticky_feb18/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,

Expand Down
1 change: 1 addition & 0 deletions modules/38_factor_costs/sticky_feb18/realization.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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) ###############################
Loading
Loading