diff --git a/config/default.cfg b/config/default.cfg index 937dc81613..62c971578b 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -46,7 +46,7 @@ cfg$repositories <- getOption("remind_repos") cfg$runstatistics <- "/p/projects/rd3mod/models/statistics/remind" #### Folder containing magicc files that can not be published open source. These files are automatically -# copied into remind when starting a run and required to calcualte climate responses (e.g. temperature). +# copied into remind when starting a run and required to calculate climate responses (e.g. temperature). cfg$magicc_template <- "/p/projects/rd3mod/magicc/" #### Output folder of the modeltests generated by running config/scenario_config_AMT.csv diff --git a/modules/21_tax/off/not_used.txt b/modules/21_tax/off/not_used.txt index d156ee4117..09ba770bae 100644 --- a/modules/21_tax/off/not_used.txt +++ b/modules/21_tax/off/not_used.txt @@ -22,7 +22,6 @@ cm_bioenergy_EF_for_tax,input,questionnaire cm_startyear, switch, ??? cm_fetaxscen, switch, ??? cm_gdximport_target, switch, ??? -pm_gdp_gdx,parameter,??? pm_pop,parameter,??? cm_so2tax_scen,switch,??? sm_DpGJ_2_TDpTWa,switch,??? @@ -72,3 +71,4 @@ vm_changeProdStartyearCost, variable, ??? vm_costInvTeDir,input,only needed if tax is on vm_costInvTeAdj,input,only needed if tax is on pm_cintraw,input,only needed if tax is on +pm_gdp,input,only needed if tax is on diff --git a/modules/21_tax/on/datainput.gms b/modules/21_tax/on/datainput.gms index 5a900b7df9..40b32c8c25 100644 --- a/modules/21_tax/on/datainput.gms +++ b/modules/21_tax/on/datainput.gms @@ -247,4 +247,8 @@ Execute_Loadpoint 'input_ref' p21_ref_costInvTeDir_RE = vm_costInvTeDir.l; Execute_Loadpoint 'input_ref' p21_ref_costInvTeAdj_RE = vm_costInvTeAdj.l; $endif.importtaxrc +if (cm_startyear gt 2005, +execute_load "input_ref.gdx", pm_taxrevCO2LUC0; +); + *** EOF ./modules/21_tax/on/datainput.gms diff --git a/modules/21_tax/on/postsolve.gms b/modules/21_tax/on/postsolve.gms index 97da53fc60..5fdc5b4a4d 100644 --- a/modules/21_tax/on/postsolve.gms +++ b/modules/21_tax/on/postsolve.gms @@ -23,7 +23,7 @@ pm_taxCO2eqSum(ttot,regi) = pm_taxCO2eq(ttot,regi) + pm_taxCO2eqRegi(ttot,regi) *** Do not forget to update the other file. pm_taxrevGHG0(ttot,regi) = pm_taxCO2eqSum(ttot,regi) * (vm_co2eq.l(ttot,regi) - vm_emiMacSector.l(ttot,regi,"co2luc")$(cm_multigasscen ne 3)); pm_taxrevCO2Sector0(ttot,regi,emi_sectors) = p21_CO2TaxSectorMarkup(ttot,regi,emi_sectors) * pm_taxCO2eqSum(ttot,regi) * vm_emiCO2Sector.l(ttot,regi,emi_sectors); -pm_taxrevCO2LUC0(ttot,regi) = pm_taxCO2eqSum(ttot,regi) * vm_emiMacSector.l(ttot,regi,"co2luc")$(cm_multigasscen ne 3); +pm_taxrevCO2LUC0(t,regi) = pm_taxCO2eqSum(t,regi) * vm_emiMacSector.l(t,regi,"co2luc")$(cm_multigasscen ne 3); p21_taxrevCCS0(ttot,regi) = cm_frac_CCS * pm_data(regi,"omf","ccsinje") * pm_inco0_t(ttot,regi,"ccsinje") * ( sum(teCCS2rlf(te,rlf), sum(ccs2te(ccsCO2(enty),enty2,te), vm_co2CCS.l(ttot,regi,enty,enty2,te,rlf) ) ) ) * (1/pm_ccsinjecrate(regi)) * sum(teCCS2rlf(te,rlf), sum(ccs2te(ccsCO2(enty),enty2,te), vm_co2CCS.l(ttot,regi,enty,enty2,te,rlf) ) ) / pm_dataccs(regi,"quan","1"); diff --git a/modules/21_tax/on/presolve.gms b/modules/21_tax/on/presolve.gms index fda488e614..abdc136e4d 100644 --- a/modules/21_tax/on/presolve.gms +++ b/modules/21_tax/on/presolve.gms @@ -7,9 +7,9 @@ *** SOF ./modules/21_tax/on/presolve.gms *JS* *** calculation of tax rate, as a function of per-capita gdp levels -p21_tau_so2_tax(ttot,regi)$(ttot.val ge 2005)=s21_so2_tax_2010*pm_gdp_gdx(ttot,regi)/pm_pop(ttot,regi); !! scaled by GDP/cap in the unit [trn US$/bn people] +p21_tau_so2_tax(ttot,regi)$(ttot.val ge 2005)=s21_so2_tax_2010*pm_gdp(ttot,regi)/pm_pop(ttot,regi); !! scaled by GDP/cap in the unit [trn US$/bn people] p21_tau_so2_tax("2005",regi)=0; -p21_tau_so2_tax("2100",regi)=s21_so2_tax_2010*pm_gdp_gdx("2100",regi)/pm_pop("2100",regi); +p21_tau_so2_tax("2100",regi)=s21_so2_tax_2010*pm_gdp("2100",regi)/pm_pop("2100",regi); p21_tau_so2_tax(ttot,regi)$(ttot.val>2100)=p21_tau_so2_tax("2100",regi); *** sum all 4 CO2eq tax components @@ -21,7 +21,7 @@ pm_taxCO2eqSum(ttot,regi) = pm_taxCO2eq(ttot,regi) + pm_taxCO2eqRegi(ttot,regi) *** save level value of all taxes pm_taxrevGHG0(ttot,regi) = pm_taxCO2eqSum(ttot,regi) * (vm_co2eq.l(ttot,regi) - vm_emiMacSector.l(ttot,regi,"co2luc")$(cm_multigasscen ne 3)); pm_taxrevCO2Sector0(ttot,regi,emi_sectors) = p21_CO2TaxSectorMarkup(ttot,regi,emi_sectors) * pm_taxCO2eqSum(ttot,regi) * vm_emiCO2Sector.l(ttot,regi,emi_sectors); -pm_taxrevCO2LUC0(ttot,regi) = pm_taxCO2eqSum(ttot,regi) * vm_emiMacSector.l(ttot,regi,"co2luc")$(cm_multigasscen ne 3); +pm_taxrevCO2LUC0(t,regi) = pm_taxCO2eqSum(t,regi) * vm_emiMacSector.l(t,regi,"co2luc")$(cm_multigasscen ne 3); p21_taxrevCCS0(ttot,regi) = cm_frac_CCS * pm_data(regi,"omf","ccsinje") * pm_inco0_t(ttot,regi,"ccsinje") * ( sum(teCCS2rlf(te,rlf), sum(ccs2te(ccsCO2(enty),enty2,te), vm_co2CCS.l(ttot,regi,enty,enty2,te,rlf) ) ) ) * (1/pm_ccsinjecrate(regi)) * sum(teCCS2rlf(te,rlf), sum(ccs2te(ccsCO2(enty),enty2,te), vm_co2CCS.l(ttot,regi,enty,enty2,te,rlf) ) ) / pm_dataccs(regi,"quan","1"); diff --git a/modules/26_agCosts/costs/datainput.gms b/modules/26_agCosts/costs/datainput.gms index 12b4b94cda..6bccde53d4 100644 --- a/modules/26_agCosts/costs/datainput.gms +++ b/modules/26_agCosts/costs/datainput.gms @@ -34,7 +34,7 @@ $if %cm_MAgPIE_coupling% == "off" p26_totLUcosts_withMAC(ttot,regi) = p26_totLUc $if %cm_MAgPIE_coupling% == "on" p26_totLUcosts_withMAC(ttot,regi) = p26_totLUcost_coupling(ttot,regi); *' **Land use emissions MAC cost** -*' In *standalone runs* land use MAC costs are calcualted endogenously in REMIND. Since they are also included +*' In *standalone runs* land use MAC costs are calculated endogenously in REMIND. Since they are also included *' in the exogenous total landuse costs (p26_totLUcostLookup) they need to besubstracted from these total *' landuse costs. In coupled runs the land use MAC is deactivated in REMIND and MAC costs are included in the total land use *' costs that are transferred from MAgPIE. diff --git a/modules/30_biomass/magpie_40/datainput.gms b/modules/30_biomass/magpie_40/datainput.gms index 6379e18ae8..ff075d684d 100644 --- a/modules/30_biomass/magpie_40/datainput.gms +++ b/modules/30_biomass/magpie_40/datainput.gms @@ -74,6 +74,11 @@ $offdelim / ; + +if (cm_startyear gt 2005, +execute_load "input_ref.gdx", p30_pebiolc_costs_emu_preloop; +); + *** Select bioenergy bioenergy supply curve according to SSP scenario i30_bioen_price_a(ttot,regi) = f30_bioen_price(ttot,regi,"%cm_LU_emi_scen%","%cm_rcp_scen%","a"); i30_bioen_price_b(ttot,regi) = f30_bioen_price(ttot,regi,"%cm_LU_emi_scen%","%cm_rcp_scen%","b"); diff --git a/modules/30_biomass/magpie_40/equations.gms b/modules/30_biomass/magpie_40/equations.gms index 8a5066472b..a6700cb16c 100644 --- a/modules/30_biomass/magpie_40/equations.gms +++ b/modules/30_biomass/magpie_40/equations.gms @@ -25,7 +25,7 @@ q30_costFuBio(ttot,regi)$(ttot.val ge cm_startyear).. + $if %cm_MAgPIE_coupling% == "on" (v30_pebiolc_costs(ttot,regi) * v30_multcost(ttot,regi)) $if %cm_MAgPIE_coupling% == "off" (v30_pebiolc_costs(ttot,regi)) - - p30_pebiolc_costs_emu_preloop(ttot,regi) !! Need to be substracted since they are also inculded in the total agricultural production costs + - p30_pebiolc_costs_emu_preloop(ttot,regi) !! Need to be substracted since they are also included in the total agricultural production costs + sum(peren2cont30(enty,rlf), vm_fuExtr(ttot,regi,enty,rlf) * pm_costsTradePeFinancial(regi,"use",enty)); diff --git a/modules/30_biomass/magpie_40/preloop.gms b/modules/30_biomass/magpie_40/preloop.gms index 26d34c0f1f..be2614921f 100644 --- a/modules/30_biomass/magpie_40/preloop.gms +++ b/modules/30_biomass/magpie_40/preloop.gms @@ -93,7 +93,7 @@ $endif ***------------ Step 3: calculate bioenergy costs ------------- *** The costs are calculated applying the regular cost equation. *** This equation integrates the shifted (!) price supply curve over the demand. -*** It requires the price shift factor to be calcualted before (see above). +*** It requires the price shift factor to be calculated before (see above). if (execError > 0, execute_unload "abort.gdx"; @@ -102,7 +102,7 @@ if (execError > 0, solve model_biopresolve_c using cns; !!! nothing has to be optimized here, just pure calculation -p30_pebiolc_costs_emu_preloop(ttot,regi) = v30_pebiolc_costs.l(ttot,regi); +p30_pebiolc_costs_emu_preloop(t,regi) = v30_pebiolc_costs.l(t,regi); display p30_pebiolc_costs_emu_preloop;