-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #741 from deleip/f_usdaUpdate
update of use of USDA cost shares
- Loading branch information
Showing
42 changed files
with
136 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.