Skip to content

Commit

Permalink
some adjustments for ELEVATE and new 45 modules
Browse files Browse the repository at this point in the history
  • Loading branch information
orichters committed Oct 1, 2024
1 parent 441dda2 commit 35eab7b
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 15 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ Imports:
ncdf4,
nleqslv,
optparse,
piamenv (>= 0.4.0),
piamenv (>= 0.5.4),
piamInterfaces (>= 0.34.1),
piamPlotComparison (>= 0.0.10),
piamutils,
plotly,
purrr,
quitte (>= 0.3137.1),
quitte (>= 0.3137.2),
R.utils,
raster,
readr,
Expand Down
4 changes: 2 additions & 2 deletions core/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -1348,14 +1348,14 @@ $if %carbonprice% == "NPi" pm_macSwitch(emiMacMagpie) = 0;

*** Load historical carbon prices defined in $/t CO2, need to be rescaled to right unit
pm_taxCO2eq(ttot,regi)$(ttot.val le 2020) = 0;
parameter f_taxCO2eqHist(ttot,all_regi) "historic CO2 prices ($/tCO2)"
parameter fm_taxCO2eqHist(ttot,all_regi) "historic CO2 prices [$/tCO2]"
/
$ondelim
$include "./core/input/pm_taxCO2eqHist.cs4r"
$offdelim
/
;
pm_taxCO2eq(ttot,regi)$(ttot.val le 2020) = f_taxCO2eqHist(ttot,regi) * sm_DptCO2_2_TDpGtC;
pm_taxCO2eq(ttot,regi)$(ttot.val le 2020) = fm_taxCO2eqHist(ttot,regi) * sm_DptCO2_2_TDpGtC;

*DK* LU emissions are abated in MAgPIE in coupling mode
*** An alternative to the approach below could be to introduce a new value for c_macswitch that only deactivates the LU MACs
Expand Down
4 changes: 2 additions & 2 deletions main.gms
Original file line number Diff line number Diff line change
Expand Up @@ -1219,8 +1219,8 @@ $setglobal cm_NDC_version 2024_cond !! def = "2024_cond" !! regexp = 20(18|
*'
*' (NGFS_v4): settings used for NGFS v4, 2023
*' (NGFS_v4_20pc): settings used for NGFS v4, 2023, with still 20% of 2020 emissions in netZero year
*' (ENGAGE4p5_GlP): settings used for ENGAGE 4.5 Glasgow+ scenario
$setglobal cm_netZeroScen NGFS_v4 !! def = "NGFS_v4" !! regexp = NGFS_v4|NGFS_v4_20pc|ENGAGE4p5_GlP
*' (ELEVATE2p3): settings used for ELEVATE2p3 LTS and NDC-LTS scenario
$setglobal cm_netZeroScen NGFS_v4 !! def = "NGFS_v4" !! regexp = NGFS_v4|NGFS_v4_20pc|ELEVATE2p3
*' * c_regi_earlyreti_rate "maximum percentage of capital stock that can be retired early (before reaching their expected lifetimes) in one year in specified regions, if they are not economically viable. It is applied to all techs unless otherwise specified in c_tech_earlyreti_rate."
*' * GLO 0.09, EUR_regi 0.15: default value. (0.09 means full retirement after 11 years, 10% standing after 10 years)
$setglobal c_regi_earlyreti_rate GLO 0.09, EUR_regi 0.15 !! def = GLO 0.09, EUR_regi 0.15
Expand Down
2 changes: 1 addition & 1 deletion modules/46_carbonpriceRegi/netZero/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*** SOF ./modules/46_carbonpriceRegi/netZero/datainput.gms

p46_zeroYear = 2100;
$ifthen.p46_zeroYear "%cm_netZeroScen%" == "ENGAGE4p5_GlP"
$ifthen.p46_zeroYear "%cm_netZeroScen%" == "ELEVATE2p3"
p46_zeroYear = 2200;
$endif.p46_zeroYear

Expand Down
1 change: 1 addition & 0 deletions modules/46_carbonpriceRegi/netZero/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ p46_taxCO2eqRegi_iter(iteration,ttot,all_regi) "CO2eq tax regi tracked over
p46_factorRescaleCO2TaxLtd_iter(iteration,all_regi) "Track the changes of p46_factorRescaleCO2TaxLimited over the iterations [1]"
p46_emi_actual_iter(iteration,ttot,all_regi) "Track the changes of p46_emi_actual over the iterations [MtCO2eq/yr]"
p46_offset(all_regi) "allowed emissions in netZero year [MtCO2eq/yr]"
p46_ref_co2eq (ttot,all_regi) "emissions in reference run"
;

Scalar p46_zeroYear "between the netZero goal and this scalar, pm_taxCO2eqRegi linearly drops to zero [year]"
Expand Down
13 changes: 12 additions & 1 deletion modules/46_carbonpriceRegi/netZero/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,19 @@ p46_emi_2020(regi) = vm_co2eq.l("2020",regi) * sm_c_2_co2 * 1000;

***define offsets
p46_offset(all_regi) = 0;
$ifthen.offsets "%cm_netZeroScen%" == "ENGAGE4p5_GlP"
$ifthen.offsets "%cm_netZeroScen%" == "ELEVATE2p3"
p46_offset(nz_reg)$(sameas(nz_reg, "EUR")) = 100;


Execute_Loadpoint 'input_bau' p46_ref_co2eq = vm_co2eq.l;
*** shares calculated by Rahel based on excel file
p46_offset(nz_reg)$(sameas(nz_reg, "LAM")) = (1 - 0.68) * p46_ref_co2eq("2050", nz_reg) * sm_c_2_co2 * 1000;
p46_offset(nz_reg)$(sameas(nz_reg, "MEA")) = (1 - 0.40) * p46_ref_co2eq("2055", nz_reg) * sm_c_2_co2 * 1000;
p46_offset(nz_reg)$(sameas(nz_reg, "NEU")) = (1 - 0.83) * p46_ref_co2eq("2055", nz_reg) * sm_c_2_co2 * 1000;
p46_offset(nz_reg)$(sameas(nz_reg, "OAS")) = (1 - 0.88) * p46_ref_co2eq("2055", nz_reg) * sm_c_2_co2 * 1000;
p46_offset(nz_reg)$(sameas(nz_reg, "SSA")) = (1 - 0.66) * p46_ref_co2eq("2055", nz_reg) * sm_c_2_co2 * 1000;
p46_offset(nz_reg)$(sameas(nz_reg, "REF")) = (1 - 0.83) * p46_ref_co2eq("2060", nz_reg) * sm_c_2_co2 * 1000;

$elseif.offsets "%cm_netZeroScen%" == "NGFS_v4_20pc"
p46_offset(nz_reg) = 0.2 * vm_co2eq.l("2020", nz_reg) * sm_c_2_co2 * 1000;
p46_offset(nz_reg)$(sameas(nz_reg, "LAM")) = 0.6 * vm_co2eq.l("2020", nz_reg) * sm_c_2_co2 * 1000;
Expand Down
10 changes: 5 additions & 5 deletions modules/46_carbonpriceRegi/netZero/sets.gms
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ SETS
nz_reg2080(all_regi) "regions with net-zero 2080 target" / /
nz_reg_CO2(all_regi) "regions with CO2, not GHG target" / "CHA","IND" /
;
$elseif.scen "%cm_netZeroScen%" == "ENGAGE4p5_GlP"
$elseif.scen "%cm_netZeroScen%" == "ELEVATE2p3"
SETS
nz_reg2050(all_regi) "regions with net-zero 2050 target" / "CAZ","EUR","JPN","USA" /
nz_reg2055(all_regi) "regions with net-zero 2055 target" / "LAM","MEA","NEU","OAS" /
nz_reg2050(all_regi) "regions with net-zero 2050 target" / "CAZ","EUR","JPN","USA","LAM" /
nz_reg2055(all_regi) "regions with net-zero 2055 target" / "MEA","NEU","OAS", "SSA" /
nz_reg2060(all_regi) "regions with net-zero 2060 target" / "CHA","REF" /
nz_reg2070(all_regi) "regions with net-zero 2070 target" / "IND" /
nz_reg2080(all_regi) "regions with net-zero 2080 target" / "SSA" /
nz_reg_CO2(all_regi) "regions with CO2, not GHG target" / "IND","OAS","NEU","SSA" /
nz_reg2080(all_regi) "regions with net-zero 2080 target" / /
nz_reg_CO2(all_regi) "regions with CO2, not GHG target" / "OAS","NEU","SSA", "LAM","MEA", "REF", "CHA", "IND" /
;
$else.scen
$error 'In 46_carbonpriceRegi/netZero/sets.gms, no settings for the specified cm_netZeroScen found'
Expand Down
3 changes: 2 additions & 1 deletion scripts/output/export/xlsx_IIASA.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ lucode2::readArgs("project")

projects <- list(
ELEVATE = list(mapping = c("NAVIGATE", "ELEVATE"),
iiasatemplate = "https://files.ece.iiasa.ac.at/elevate/elevate-template.xlsx"),
iiasatemplate = "https://files.ece.iiasa.ac.at/elevate/elevate-template.xlsx",
removeFromScen = "C_|eoc"),
ENGAGE_4p5 = list(mapping = c("AR6", "AR6_NGFS"),
iiasatemplate = "ENGAGE_CD-LINKS_template_2019-08-22.xlsx",
removeFromScen = "_diff|_expoLinear|-all_regi"),
Expand Down
2 changes: 1 addition & 1 deletion scripts/start/needBau.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# This allows readCheckScenarioConfig and checkFixConfig to set it to NA
# if not needed, and complain if it is missing.
needBau <- list(carbonprice = "NDC",
carbonpriceRegi = "NDC",
carbonpriceRegi = c("NDC", "netZero"),
emicapregi = "AbilityToPay")

0 comments on commit 35eab7b

Please sign in to comment.