Skip to content
Open
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
17 changes: 17 additions & 0 deletions config/scenario_config_PRISMA.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
title;start;copyConfigFrom;cm_targetDelay;cm_ReferenceCapacities;cm_LTSexcludeRegi;carbonprice;carbonpriceRegi;path_gdx;path_gdx_ref;path_gdx_bau;path_gdx_carbonprice;path_gdx_refpolicycost;cm_startyear;cm_multigasscen;description;CES_parameters;slurmConfig;regionmapping;extramappings_historic;cm_rcp_scen;subsidizeLearning;cm_prtpScen;capitalMarket;cm_iterative_target_adj;cm_budgetCO2from2020;cm_budgetCO2_absDevTol;cm_taxCO2_functionalForm;cm_taxCO2_startyear;cm_peakBudgYr;cm_taxCO2_regiDiff;cm_emiscen;c_regi_earlyreti_rate;c_NearTermProjectCompletion;cm_fetaxscen;cm_bioenergy_SustTax;cm_33EW;cm_33OAE;cm_33_OAE_limit_EEZ;cm_frac_NetNegEmi;c_ccsinjecratescen;c_ccscapratescen;cm_CESMkup_build;cm_wasteIncinerationCCSshare;techpol;regipol;cm_NucRegiPol;cm_CoalRegiPol;cm_altFeEmiFac;cm_GDPpopScen;cm_demScen;cm_oil_scen;cm_gas_scen;cm_coal_scen;c_techAssumptScen;cm_nucscen;cm_so2tax_scen;cm_LU_emi_scen;cm_tradecostBio;cm_maxProdBiolc;cm_1stgen_phaseout;c_SSP_forcing_adjust;cm_APssp;cm_CESMkup_ind;cm_EDGEtr_scen;c_changeProdCost
# H12 SSP2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SSP2-NPi2025-calibrate;calibrate,AMT,compileInTests,calibrateSSP2;;;;;;;;;;;;2005;;SSP2-NPi2025-calibrate: This reference policy/baseline scenario follows the Shared Socioeconomic Pathways 2 called Middle of the Road.;calibrate;14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SSP2-NDC-LTS;1,AMT,2;;;;;NDC;netZero;;SSP2-NPi2025;SSP2-NPi2025;;SSP2-NPi2025;2030;2;SSP2-NDC-LTS: Long-term-strategy, this scenario follows the NDCs until 2035 and starts rescaling the carbon prices from 2040 to reach national net-zero pledges.;;;;;;globallyOptimal;;;3;;;;;;;;EUR_regi 0.08, USA_regi 0.07, CHA_regi 0.07, CAZ_regi 0.07, JPN_regi 0.07, GLO 0.06;transformative;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Mix4ICEban;1
SSP2-NDC;1,AMT,2;;;;;NDC;;;SSP2-NPi2025;SSP2-NPi2025;;SSP2-NPi2025;2030;;SSP2-NDC: This Nationally Determined Contribution (NDC) scenario follows the Shared Socioeconomic Pathways 2 called Middle of the Road. It assumes NPi2025 until 2025 and has start year 2030. The NDC includes all pledged policies even if not yet implemented. It assumes that the moderate and heterogeneous climate ambition reflected in the NDCs at the begining of 2021 continues over the 21st century.;;;;;;globallyOptimal;;;3;;;;;;;;EUR_regi 0.08, USA_regi 0.07, CHA_regi 0.07, CAZ_regi 0.07, JPN_regi 0.07, GLO 0.06;transformative;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Mix3ICEban;1
SSP2-NPi;1,AMT,2;;;;;NPi;;;;;;;2005;;SSP2-NPi: This National Policies Implemented (NPi) scenario follows the Shared Socioeconomic Pathways 2 called Middle of the Road. The NPi assumes that policies fail to achieve NDC targets in 2030. Instead, carbon prices are assumed to grow and converge more slowly, leading to emissions trajectories in line with bottom-up studies on the effect of currently implemented policies.;;;;;;;;;0;;;;;;;;;;;;;;;;;;;;NPi2018;;;;;;;;;;;;;;;;;;;;Mix1;
SSP2-NPi2025;1,AMT,compileInTests,2;;;;;;;;;;;;2005;;SSP2-NPi2025: This National Policies Implemented (NPi) scenario follows the Shared Socioeconomic Pathways 2 called Middle of the Road. The NPi reflects currently implemented policies, while fulfilling near-term feasibility and long-term plausibility assessments. Emissions trajectories are aligned with bottom-up studies on the effect of currently implemented policies. Carbon prices are constant in the mid- and long-term.;;;;;;;;;0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SSP2-PkBudg650;1,AMT,2;;;;;functionalForm;;;SSP2-NPi2025;;;SSP2-NPi2025;2030;2;SSP2-PkBudg650: This climate policy scenario follows the Shared Socioeconomic Pathways 2 called Middle of the Road. The stylized climate policy scenario assumes a peak budget of 650 Gt CO2 on total CO2 emissions from 2015 to 2100. This is a 1.5C scenario, peak warming is allowed to be at or slightly above 1.5C at median climate sensitivity but returns to values below 1.5C in at least 67 % of scenarios by the end of the century.;;;;;rcp20;globallyOptimal;;;9;650;;;100;2055;6;;EUR_regi 0.08, USA_regi 0.07, CHA_regi 0.07, CAZ_regi 0.07, JPN_regi 0.07, GLO 0.06;transformative;;;;;;;;;;2050.GLO 0.9;;;;;;;;;;;;;;;;;;;;Elec_Push;Mix4ICEban;1
SSP2-PkBudg750;1,AMT,2;;;;;functionalForm;;;SSP2-NPi2025;;;SSP2-NPi2025;2030;2;SSP2-PkBudg750: This climate policy scenario follows the Shared Socioeconomic Pathways 2 called Middle of the Road. The stylized climate policy scenario assumes a peak budget of 750 Gt CO2 on total CO2 emissions from 2015 to 2100. This is a 1.5C scenario, peak warming is allowed to be at or slightly above 1.5C at median climate sensitivity but returns to values below 1.5C in at least 67 % of scenarios by the end of the century.;;;;;rcp20;globallyOptimal;;;9;750;;;100;2055;6;;EUR_regi 0.08, USA_regi 0.07, CHA_regi 0.07, CAZ_regi 0.07, JPN_regi 0.07, GLO 0.06;transformative;;;;;;;;;;2050.GLO 0.9;;;;;;;;;;;;;;;;;;;;Elec_Push;Mix4ICEban;1
SSP2-PkBudg750_wo100EJBiobound;1,AMT,2;;;;;functionalForm;;;SSP2-NPi2025;;;SSP2-NPi2025;2030;2;SSP2-PkBudg750_wo100EJBiobound: This climate policy scenario follows the Shared Socioeconomic Pathways 2 called Middle of the Road. The stylized climate policy scenario assumes a peak budget of 750 Gt CO2 on total CO2 emissions from 2015 to 2100. This is a 1.5C scenario, peak warming is allowed to be at or slightly above 1.5C at median climate sensitivity but returns to values below 1.5C in at least 67 % of scenarios by the end of the century.;;;;;rcp20;globallyOptimal;;;9;750;;;100;2055;6;;EUR_regi 0.08, USA_regi 0.07, CHA_regi 0.07, CAZ_regi 0.07, JPN_regi 0.07, GLO 0.06;transformative;;;;;;;;;;2050.GLO 0.9;;;;;;;;;;;;;;;;off;;;;Elec_Push;Mix4ICEban;1
SSP2-PkBudg1000;1,AMT,2;;;;;functionalForm;;;SSP2-NPi2025;;;SSP2-NPi2025;2030;2;SSP2-PkBudg1050: This climate policy scenario follows the Shared Socioeconomic Pathways 2 called Middle of the Road. The stylized climate policy scenario assumes a peak budget of 1150 Gt CO2 on total CO2 emissions from 2015 to 2100. This is a well below 2C scenario at median climate sensitivity but returns to values below 2C in at least 67 % of scenarios during the whole century.;;;;;rcp26;globallyOptimal;;;9;1000;;;75;2080;7;;EUR_regi 0.08, USA_regi 0.07, CHA_regi 0.07, CAZ_regi 0.07, JPN_regi 0.07, GLO 0.06;transformative;;;;;;;;;;2050.GLO 0.5;;;;;;;;;;;;;;;;;;;;;Mix3ICEban;1
SSP2-EcBudg500;1,AMT,2;;;;;functionalForm;;;SSP2-NPi2025;;;SSP2-NPi2025;2035;2;SSP2-EcBudg400: This climate policy scenario follows the Shared Socioeconomic Pathways 2 called Middle of the Road. The stylized climate policy scenario assumes an end-of-century budget of 400 Gt CO2 on total CO2 emissions from 2020 to 2100. This is a high overshoot scenario with delayed climate policy.;;;;;rcp26;globallyOptimal;;;5;500;5;exponential;70;;7;;EUR_regi 0.08, USA_regi 0.07, CHA_regi 0.07, CAZ_regi 0.07, JPN_regi 0.07, GLO 0.06;transformative;;;1;1;5000;0;;;;2060.GLO 0.9;;;;;;;;;;;;;;;;200;;;;;Mix3ICEban;1
SSP2-rollBack;1,AMT,2;;;;;none;;;SSP2-NPi2025;;;SSP2-NPi2025;2030;;SSP2-rollBack: This rollback of climate policy scenario follows the Shared Socioeconomic Pathways 3 called Middle of the Road.;;;;;;;;;0;;;;;;;0;;;1;;;;;;;;;;none;;;;;;;;;;;;;;;;;;;;Mix1;1
SSP2-MeetAspirations;;SSP2-NDC-LTS;;;off;;;;SSP2-NPi2025;SSP2-NPi2025;;SSP2-NPi2025;2030;2;All countries implement current policies, NDCs (2030/2035), and Long-Term Strategies (LTS). Climate ambition follows stated national commitments, with carbon prices reflecting near-term policies and gradually increasing mitigation incentives.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SSP2-AsymmetricRoll-Back;;SSP2-NDC-LTS;prisma;;off;;;SSP2-MeetAspirations;SSP2-NPi2025;SSP2-NPi2025;;SSP2-NPi2025;2030;2;Climate ambition is rolled back across all countries in differentiated ways. NDC and LTS milestones are delayed by 10 years for transition leaders, 20 for diversifying economies, and by 30 for fossil-dependent economies and net-zero ambitions are weakened.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Mix3ICEban;
SSP2-LateReawakening;;SSP2-NDC-LTS;;;off;;;SSP2-MeetAspirations;SSP2-AsymmetricRoll-Back;SSP2-NPi2025;;SSP2-NPi2025;2040;2;Countries initially follow the rollback pathway, then resume LTS targets after a delay (around 2035–2040). Regions attempt to return to original climate objectives, requiring accelerated mitigation and possible adjustment of targets for feasibility.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SSP2-StayingAlive;1;;;prisma_SA;;exogenous;;;SSP2-MeetAspirations;;SSP2-AsymmetricRoll-Back;;2030;2;Same policy ambition as the rollback scenario, but investments in renewables, electricity storage, grid expansion, and end-use electrification remain at levels of the ambition scenario to test low-regret transition strategies.;;;;;;;;;0;;;;;;;9;EUR_regi 0.08, USA_regi 0.07, CHA_regi 0.07, CAZ_regi 0.07, JPN_regi 0.07, GLO 0.06;transformative;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Mix4ICEban;1
13 changes: 13 additions & 0 deletions config/scenario_config_magpie_PRISMA.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title;start;copyConfigFrom;continueFromHere;magpieIter;config/scenario_config.csv;no_ghgprices_land_until;cfg_mag$gms$s15_elastic_demand;cfg_mag$gms$s29_treecover_scenario_start;cfg_mag$gms$s29_treecover_scenario_target;cfg_mag$gms$s29_treecover_target;cfg_mag$gms$s59_scm_scenario_start;cfg_mag$gms$s59_scm_scenario_target;cfg_mag$gms$s59_scm_target;cfg_mag$gms$c60_1stgen_biodem;cfg_mag$gms$s56_limit_ch4_n2o_price;cfg_mag$gms$c15_food_scenario;cfg_mag$gms$s44_bii_target;cfg_mag$gms$c44_bii_decrease;cfg_mag$gms$s44_start_year;cfg_mag$gms$s56_fader_cpriceaff_start;cfg_mag$gms$s56_fader_cpriceaff_end
SSP2-EcBudg500;1;;;;SSP2|NDC|AR-plant|nocc_hist;y2030;1;2050;2070;0.02;2050;2070;0.2;const2030;734;;0;0;2050;2040;2050
SSP2-NDC;1;;;;SSP2|NDC|AR-natveg|nocc_hist|rcp4p5;y2150;1;;;0;;;0;const2030;734;;0;1;2030;2030;2030
SSP2-NDC-LTS;1;;;;SSP2|NDC|AR-natveg|nocc_hist|rcp4p5;y2030;1;;;0;;;0;const2030;734;;0;1;2030;2030;2030
SSP2-NPi;0;;;;SSP2|NPI|AR-natveg|nocc_hist;y2150;1;;;0;;;0;const2030;734;;0;1;2030;2030;2030
SSP2-NPi2025;1;;;;SSP2|NPI|AR-natveg|nocc_hist|rcp4p5;y2150;1;;;0;;;0;const2030;734;;0;1;2030;2030;2030
SSP2-PkBudg1000;1;;;;SSP2|NDC|AR-natveg|nocc_hist|rcp2p6;y2030;1;;;0.01;;;0.1;const2030;734;;0;0;2030;2030;2030
SSP2-PkBudg750;1;;;;SSP2|NDC|AR-natveg|nocc_hist|rcp1p9;y2030;1;;;0.03;;;0.3;const2030;734;;0;0;2030;2030;2030
SSP2-rollBack;0;;;;SSP2|NPI-revert|AR-natveg|nocc_hist;y2150;1;;;0;;;0;const2030;734;;0;1;2030;2030;2030
SSP2-MeetAspirations;;SSP2-NDC-LTS;;;SSP2|NDC|AR-natveg|nocc_hist|rcp4p5;y2030;;;;;;;;;;;;;;;
SSP2-AsymmetricRoll-Back;;SSP2-NDC-LTS;;;SSP2|NDC-delay|AR-natveg|rcp4p5;y2045;;;;;;;;;;;;;;;
SSP2-LateReawakening;;SSP2-NDC-LTS;;;SSP2|NDC-delay|AR-natveg|rcp4p5;y2040;;;;;;;;;;;;;;;
SSP2-StayingAlive;;SSP2-NDC-LTS;;;SSP2|NDC-delay|AR-natveg|rcp4p5;y2045;;;;;;;;;;;;;;;
4 changes: 4 additions & 0 deletions main.gms
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,10 @@ $setglobal cm_NDC_targetYear 2030, 2035 !! def = "2030, 2035"
*' * Exceptions apply for some regions: the delay might deviate by 5 years due to model 10-year timesteps after 2060
$setglobal cm_targetDelay off !! def = "off"

*' cm_ReferenceCapacities "using capacity pathways of reference scenario"
*' * (prisma): PRISMA Staying Alive: use MeetAspiration as reference scenario for wind and solar capacity pathways by using "prisma_SA"
$setglobal cm_ReferenceCapacities off !! def = "off"

*' cm_NDC_CO2PriceLimit "sets regional upper limit for CO2 prices in NDC realization" [requires 45_carbonprice = NDC]"
*' This serves to not force regions to reach NDC emissions targets at extremly high CO2 prices in the near-term.
*' Instead, regions go "as close as still plausible" to their NDC targets.
Expand Down
21 changes: 21 additions & 0 deletions modules/40_techpol/NPi2025/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ p40_TechBound(ttot,all_regi,te) = smax(ttot2$(ttot2.val le ttot.val) , f40_TechB
p40_TechBound(ttot,all_regi,"wind") = f40_TechBound(ttot,all_regi,"%cm_NPi_version%","wind");
p40_ElecBioBound("2030",regi) = p40_TechBound("2030",regi,"bioigcc");


*** Follow technology pathways of a reference run, e.g., as in PRISMA WP6 Staying Alive
$ifThen "%cm_ReferenceCapacities%" == "prisma_SA"

*** PRISMA Staying Alive:
Parameter p40_RefCap(ttot, all_regi, all_te, rlf) "capacity pathways from reference run";

Execute_Loadpoint "input_ref" p40_RefCap = vm_cap.l;

p40_TechBound(ttot,all_regi,te)$(
ttot.val ge 2030 AND ttot.val le 2100
AND (sameas(te,"windon") OR sameas(te,"windoff") OR sameas(te,"spv") OR sameas(te,"csp"))
) = max(
p40_TechBound(ttot,all_regi,te),
p40_RefCap(ttot,all_regi,te, "1")*1000
);
Comment on lines +40 to +46

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it have to follow the ref throughout the whole time span, or just until 2035?
If it is indeed [2030-2100], then we can remove the condition and use set t (This set includes only the active modeled years, which are the years from ttot greater than or equal to the model run year defined in cm_startyear.)
teVRE also contains the relevant techs.

Suggested change
p40_TechBound(ttot,all_regi,te)$(
ttot.val ge 2030 AND ttot.val le 2100
AND (sameas(te,"windon") OR sameas(te,"windoff") OR sameas(te,"spv") OR sameas(te,"csp"))
) = max(
p40_TechBound(ttot,all_regi,te),
p40_RefCap(ttot,all_regi,te, "1")*1000
);
p40_TechBound(t,all_regi,teVRE) = max(
p40_TechBound(t,all_regi,teVRE),
p40_RefCap(t,all_regi,teVRE, "1") * 1000
);

** end of PRISMA Staying Alive
$ENDIF



*** In scenarios with 2nd generation bioenergy technology phaseout,
*** switch-off biomass capacity targets of NDC
if (cm_phaseoutBiolc eq 1,
Expand Down
12 changes: 12 additions & 0 deletions modules/45_carbonprice/NDC/datainput.gms
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@ display p45_bestNDCcoverage;

p45_NDCyearSet(t,regi)$(t_NDC_targetYear(t)) = p45_shareTarget(t,regi) >= p45_minRatioOfCoverageToMax * p45_bestNDCcoverage(regi);

$ifThen "%cm_targetDelay%" == "prisma"
*** PRISMA Asymetric rollback
** Requires cm_NDC_version = 2026_cond: copy 2030 and 2035 targets to later years based on region delay, set 2030 and 2035 targets to 0
p45_NDCyearSet(t,regi)$(t.val eq 2030 + p45_delay(regi)) = p45_NDCyearSet("2030",regi);
p45_NDCyearSet(t,regi)$(t.val eq 2035 + p45_delay(regi)) = p45_NDCyearSet("2035",regi);
p45_NDCyearSet("2070","REF") = p45_NDCyearSet("2035","REF");
p45_NDCyearSet("2070","MEA") = p45_NDCyearSet("2035","MEA");
p45_NDCyearSet(t,regi)$(t.val eq 2030) = 0;
p45_NDCyearSet(t,regi)$(t.val eq 2035) = 0;
** end of PRISMA Asymetric rollback
$ENDIF

if(p45_useSingleYearCloseTo > 0,
p45_distanceToOptyear(p45_NDCyearSet(t,regi)) = abs(t.val - p45_useSingleYearCloseTo);
p45_minDistanceToOptyear(regi) = smin(t$(p45_NDCyearSet(t,regi)), p45_distanceToOptyear(t,regi));
Expand Down
21 changes: 21 additions & 0 deletions modules/45_carbonprice/NDC/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ p45_factorRescaleCO2TaxLtd_iter(iteration,t,regi) = p45_factorRescaleCO2TaxLtd(t

display p45_factorRescaleCO2TaxLtd_iter;

$ifThen "%cm_targetDelay%" == "prisma"
pm_taxCO2eq(t,regi)$( t.val < 2040 ) = min( pm_taxCO2eq(t,regi),
p45_CO2PriceLimitNDC(t,regi) * sm_DptCO2_2_TDpGtC);
$ifThen.cm_NDC_CO2PriceLimit_continuation not "%cm_NDC_CO2PriceLimit_continuation%" == "off"
*** For the periods after the carbon price limit:
*** If this switch is on, limit increase by 20%/yr, but ensure the CO2 price limit (cap) is at least 200$/tCO2.
pm_taxCO2eq("2035",regi) = min( pm_taxCO2eq("2035",regi),
max( p45_CO2PriceLimitNDC("2030",regi) * (1 + 0.2 * (2035 - 2030)) * sm_DptCO2_2_TDpGtC,
200 * sm_DptCO2_2_TDpGtC
)
);
$endif.cm_NDC_CO2PriceLimit_continuation

$else

$ifThen.cm_NDC_CO2PriceLimit not "%cm_NDC_CO2PriceLimit%" == "off"
*** limit CO2 prices in NDC realization according to switch cm_NDC_CO2PriceLimit
Expand All @@ -72,10 +86,17 @@ $ifThen.cm_NDC_CO2PriceLimit_continuation not "%cm_NDC_CO2PriceLimit_continuatio
$endif.cm_NDC_CO2PriceLimit_continuation
);
$endif.cm_NDC_CO2PriceLimit

$endif
Comment on lines 58 to +90

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I did not verify the calculation.)
Would there be a nice way to avoid duplicating such heavy equations? They look very similar =)


*** calculate tax path until NDC target year - linear increase
$ifThen "%cm_targetDelay%" == "prisma"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm. imagining region XXX has a 2030 NDC pushed to 2050:

  • without cm_targetDelay, the carbon price goes "normal in 2020 to NDC-aligned in 2030. Why not normal in 2025 too? Could the slope start in 2025?
  • with cm_targetDelay, the carbon price goes to "normal in 2035 to NDC-aligned in 2050. Is it the protocol that wants the price to stay normal until 2035? The NDCs are delayed, but don't regions start working toward them now (just too slowly)? Could the slope start in 2025?

If yes, we could replace the whole $ifThen block by:

p45_taxCO2eqFirstNDCyear(regi) = smax(t$(t.val = p45_firstNDCyear(regi)), pm_taxCO2eq(t,regi));
pm_taxCO2eq(t,regi) $ (t.val >= 2025 and t.val < p45_firstNDCyear(regi))
  = macro_interpolate(t.val, 2025, p45_firstNDCyear(regi), pm_taxCO2eq("2025",regi), p45_taxCO2eqFirstNDCyear(regi));

(because p45_firstNDCyear already adapts to cm_targetDelay)

p45_taxCO2eqFirstNDCyear(regi) = smax(t$(t.val = p45_firstNDCyear(regi)), pm_taxCO2eq(t,regi));
pm_taxCO2eq(t,regi)$(t.val > 2031 AND t.val < p45_firstNDCyear(regi)) = (p45_taxCO2eqFirstNDCyear(regi) - pm_taxCO2eq("2035",regi))*(t.val-2035)/(p45_firstNDCyear(regi)-2035) + pm_taxCO2eq("2035",regi);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To save us having to check that the linear interpolation is correct, we could use macro_interpolate:

*** macro_interpolate(t,t0,t1,x0,x1): Linear interpolation between two values x0 and x1 at time points t0 and t1 for an intermediate time point t

Suggested change
pm_taxCO2eq(t,regi)$(t.val > 2031 AND t.val < p45_firstNDCyear(regi)) = (p45_taxCO2eqFirstNDCyear(regi) - pm_taxCO2eq("2035",regi))*(t.val-2035)/(p45_firstNDCyear(regi)-2035) + pm_taxCO2eq("2035",regi);
pm_taxCO2eq(t,regi) $ (t.val >= 2035 and t.val < p45_firstNDCyear(regi))
= macro_interpolate(t.val, 2035, p45_firstNDCyear(regi), pm_taxCO2eq("2035",regi), p45_taxCO2eqFirstNDCyear(regi));

$else
p45_taxCO2eqFirstNDCyear(regi) = smax(t$(t.val = p45_firstNDCyear(regi)), pm_taxCO2eq(t,regi));
pm_taxCO2eq(t,regi)$(t.val > 2021 AND t.val < p45_firstNDCyear(regi)) = (p45_taxCO2eqFirstNDCyear(regi) - pm_taxCO2eq("2020",regi))*(t.val-2020)/(p45_firstNDCyear(regi)-2020) + pm_taxCO2eq("2020",regi);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we could use macro_interpolate too.

Suggested change
pm_taxCO2eq(t,regi)$(t.val > 2021 AND t.val < p45_firstNDCyear(regi)) = (p45_taxCO2eqFirstNDCyear(regi) - pm_taxCO2eq("2020",regi))*(t.val-2020)/(p45_firstNDCyear(regi)-2020) + pm_taxCO2eq("2020",regi);
pm_taxCO2eq(t,regi) $ (t.val >= 2020 and t.val < p45_firstNDCyear(regi))
= macro_interpolate(t.val, 2020, p45_firstNDCyear(regi), pm_taxCO2eq("2020",regi), p45_taxCO2eqFirstNDCyear(regi));

$endif

*** replace taxCO2eq between NDC targets such that taxCO2eq between goals does not decrease
loop( p45_NDCyearSet(t2,regi) ,
Expand Down
4 changes: 2 additions & 2 deletions scripts/output/export/xlsx_IIASA.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ projects <- list(
renameScen = c("SMIPv04-M-SSP2-NPi2025-def" = "SSP2 - Medium Emissions", "SMIPv04-L-SSP2-PkBudg1000-def" = "SSP2 - Low Emissions"),
checkSummation = "NAVIGATE"),
PRISMA_WP6 = list(
model = "REMIND-MAgPIE 3.6-4.14",
model = "REMIND-MAgPIE 3.7-4.14",
mapping = c("ScenarioMIP", "PRISMA"),
iiasatemplate = "https://files.ece.iiasa.ac.at/prisma/prisma-template.xlsx",
removeFromScen = "C_",
renameScen = c(
"SSP2-MeetAspirations" = "SSP2 - Meet Aspirations",
"SSP2-AsymmetricRoll-Back" = "SSP2 - Asymmetric Roll-Back",
"SSP2-LateReawakening" = "SSP2 - Late Reawakening",
"SSP2-StayingAlive_exo" = "SSP2 - Staying Alive"),
"SSP2-StayingAlive" = "SSP2 - Staying Alive"),
checkSummation = "ScenarioMIP"),
NAVIGATE_coupled = list(mapping = c("NAVIGATE", "NAVIGATE_coupled")),
SHAPE = list(mapping = c("NAVIGATE", "NAVIGATE_coupled", "SHAPE")),
Expand Down