From 1d3b6077637e3484ad07f2f9cf5fb54cef1bdb28 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Tue, 14 Apr 2026 10:44:16 +0200 Subject: [PATCH 01/11] split pm_fedem into industry and buildings --- config/default.cfg | 2 +- core/datainput.gms | 31 +++++----- core/declarations.gms | 3 +- core/input/files | 2 +- .../04_PE_FE_parameters/iea2014/datainput.gms | 58 +++++++++---------- .../29_CES_parameters/calibrate/datainput.gms | 16 +++-- modules/29_CES_parameters/load/not_used.txt | 5 +- modules/36_buildings/simple/input/files | 1 - modules/37_industry/subsectors/bounds.gms | 16 ++--- modules/37_industry/subsectors/datainput.gms | 6 +- .../37_industry/subsectors/realization.gms | 2 +- modules/37_industry/subsectors/sets.gms | 2 +- tutorials/12_Calibrating_CES_Parameters.md | 8 ++- 13 files changed, 78 insertions(+), 74 deletions(-) diff --git a/config/default.cfg b/config/default.cfg index a231b7d559..a09106f690 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -28,7 +28,7 @@ cfg$regionmapping <- "config/regionmappingH12.csv" cfg$extramappings_historic <- "" #### Current input data revision (.) #### -cfg$inputRevision <- "7.88" +cfg$inputRevision <- "7.88fedem" #### Current CES parameter and GDX revision (commit hash) #### cfg$CESandGDXversion <- "a12b6355e0ac96081f79504465c61e68fd14ed48" diff --git a/core/datainput.gms b/core/datainput.gms index e5a9e17270..54e4287671 100644 --- a/core/datainput.gms +++ b/core/datainput.gms @@ -1636,25 +1636,18 @@ loop(te, *** ---- FE demand trajectories for calibration ------------------------------- -*** also used for limiting secondary steel demand in baseline and policy -*** scenarios + Parameter -f_fedemand(tall,all_regi,all_demScen,all_in) "final energy demand" +f_fedemand_ind(tall,all_regi,all_demScen,all_in) "final energy demand in industry" / $ondelim -$include "./core/input/f_fedemand.cs4r" +$include "./core/input/f_fedemand_ind.cs4r" $offdelim /; -*** use cm_demScen for Industry and Buildings -*** cm_GDPpopScen will be used for Transport (EDGE-T) (see p29_trpdemand) -pm_fedemand(tall,all_regi,in) = f_fedemand(tall,all_regi,"%cm_demScen%",in); -*** data input for industry FE that is no part of the CES tree -pm_fedemand(tall,all_regi,ppfen_no_ces_use) = f_fedemand(tall,all_regi,"%cm_demScen%",ppfen_no_ces_use); - *** RCP-dependent demands in buildings (climate impact) -$ifthen.cm_rcp_scen_build not "%cm_rcp_scen_build%" == "none" -Parameter f_fedemand_build(tall,all_regi,all_demScen,all_rcp_scen,all_in) "RCP-dependent final energy demand in buildings" +Parameter +f_fedemand_build(tall,all_regi,all_demScen,all_rcp_scen,all_in) "RCP-dependent final energy demand in buildings" / $ondelim $include "./core/input/f_fedemand_build.cs4r" @@ -1662,15 +1655,19 @@ $offdelim /; -pm_fedemand(t,regi,cal_ppf_buildings_dyn36) = f_fedemand_build(t,regi,"%cm_demScen%","%cm_rcp_scen_build%",cal_ppf_buildings_dyn36); -$endif.cm_rcp_scen_build +*** use cm_demScen for Industry and Buildings +pm_fedemand_ind(tall,all_regi,in) = f_fedemand_ind(tall,all_regi,"%cm_demScen%",in); +pm_fedemand_build(t,regi,cal_ppf_buildings_dyn36) = f_fedemand_build(t,regi,"%cm_demScen%","%cm_rcp_scen_build%",cal_ppf_buildings_dyn36); +*** data input for industry FE that is no part of the CES tree +pm_fedemand_ind(tall,all_regi,ppfen_no_ces_use) = f_fedemand_ind(tall,all_regi,"%cm_demScen%",ppfen_no_ces_use); *** Scale FE demand across industry and building sectors $ifthen.scaleDemand not "%cm_scaleDemand%" == "off" loop((tall,tall2,all_regi) $ pm_scaleDemand(tall,tall2,all_regi), *FL* rescaled demand = normal demand * [ scaling factor + (1-scaling factor) * remaining phase-in, between zero and one ] - pm_fedemand(t,all_regi,all_in) = pm_fedemand(t,all_regi,all_in) * ( pm_scaleDemand(tall,tall2,all_regi) + (1-pm_scaleDemand(tall,tall2,all_regi)) * min(1, max(0, tall2.val-t.val) / (tall2.val-tall.val)) ); + pm_fedemand_ind(t,all_regi,all_in) = pm_fedemand_ind(t,all_regi,all_in) * ( pm_scaleDemand(tall,tall2,all_regi) + (1-pm_scaleDemand(tall,tall2,all_regi)) * min(1, max(0, tall2.val-t.val) / (tall2.val-tall.val)) ); + pm_fedemand_build(t,all_regi,all_in) = pm_fedemand_build(t,all_regi,all_in) * ( pm_scaleDemand(tall,tall2,all_regi) + (1-pm_scaleDemand(tall,tall2,all_regi)) * min(1, max(0, tall2.val-t.val) / (tall2.val-tall.val)) ); ); $endif.scaleDemand @@ -1696,7 +1693,7 @@ pm_scaleDemandBuildTable(t,regi) $ ( pm_scaleDemandBuildTable(t,regi) le 0) = 1; pm_scaleDemandBuildTable(t,regi) $ (t.val > 2100 ) = pm_scaleDemandBuildTable("2100",regi); !! continue 2100 multiplier until end of time loop( (t,regi,in) $ in_buildings_dyn36(in) , - pm_fedemand(t,regi,in) = pm_fedemand(t,regi,in) * pm_scaleDemandBuildTable(t,regi) + pm_fedemand_build(t,regi,in) = pm_fedemand_build(t,regi,in) * pm_scaleDemandBuildTable(t,regi) ); $endif.scaleDemandBuildTable @@ -1721,7 +1718,7 @@ p_scaleDemandIndTable(t,regi) $ ( p_scaleDemandIndTable(t,regi) le 0) = 1; !! I p_scaleDemandIndTable(t,regi) $ (t.val > 2100 ) = p_scaleDemandIndTable("2100",regi); !! continue 2100 multiplier until end of time loop( (t,regi,in) $ in_industry_dyn37(in) , - pm_fedemand(t,regi,in) = pm_fedemand(t,regi,in) * p_scaleDemandIndTable(t,regi) + pm_fedemand_ind(t,regi,in) = pm_fedemand_ind(t,regi,in) * p_scaleDemandIndTable(t,regi) ); $endif.scaleDemandIndTable diff --git a/core/declarations.gms b/core/declarations.gms index 2c061cbcbb..482137adeb 100644 --- a/core/declarations.gms +++ b/core/declarations.gms @@ -298,7 +298,8 @@ p_co2CCSReference(ttot,all_regi,all_enty,all_enty,all_te,rlf) "Captured CO2 put p_prodAllReference(ttot,all_regi,all_te) "Sum of the above in the reference run. As each technology has only one type of output, the differing units should not be a problem" *** CES calibration tarjectories industry and buildings -pm_fedemand(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in industry and buildings [TWa]" +pm_fedemand_ind(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in industry [TWa]" +pm_fedemand_build(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in buildings [TWa]" *** parameters for setting final energy shares pm_shfe_up(ttot,all_regi,all_enty,emi_sectors) "Final energy shares exogenous upper bounds per sector [share]" diff --git a/core/input/files b/core/input/files index 94d7b198ce..bb24581746 100644 --- a/core/input/files +++ b/core/input/files @@ -40,8 +40,8 @@ p_boundCapCCS.cs4r p_CapacityBounds.cs4r p_boundCapBiochar.cs4r f_geoStorPot.cs3r -f_fedemand.cs4r f_fedemand_build.cs4r +f_fedemand_ind.cs4r pm_NuclearConstraint.cs4r pm_risk_premium.cs4r pm_shPPPMER.cs4r diff --git a/modules/04_PE_FE_parameters/iea2014/datainput.gms b/modules/04_PE_FE_parameters/iea2014/datainput.gms index f9d940c06b..af10abd5d5 100644 --- a/modules/04_PE_FE_parameters/iea2014/datainput.gms +++ b/modules/04_PE_FE_parameters/iea2014/datainput.gms @@ -83,12 +83,12 @@ p04_IO_output_beforeFix_Total(t,regi,"fehob") = p04_IO_output_beforeFix(t,regi," + p04_IO_output_beforeFix(t,regi,"seliqfos","fehob","tdfoshob"); *** adjust buildings solids -f04_IO_output("2005",regi,"sesobio","fesob","tdbiosob")$(p04_IO_output_beforeFix_Total("2005",regi,"fesob")) = p04_IO_output_beforeFix("2005",regi,"sesobio","fesob","tdbiosob") * pm_fedemand("2005",regi,"fesob")/p04_IO_output_beforeFix_Total("2005",regi,"fesob"); -f04_IO_output("2005",regi,"sesofos","fesob","tdfossob")$(p04_IO_output_beforeFix_Total("2005",regi,"fesob")) = p04_IO_output_beforeFix("2005",regi,"sesofos","fesob","tdfossob") * pm_fedemand("2005",regi,"fesob")/p04_IO_output_beforeFix_Total("2005",regi,"fesob"); +f04_IO_output("2005",regi,"sesobio","fesob","tdbiosob")$(p04_IO_output_beforeFix_Total("2005",regi,"fesob")) = p04_IO_output_beforeFix("2005",regi,"sesobio","fesob","tdbiosob") * pm_fedemand_build("2005",regi,"fesob")/p04_IO_output_beforeFix_Total("2005",regi,"fesob"); +f04_IO_output("2005",regi,"sesofos","fesob","tdfossob")$(p04_IO_output_beforeFix_Total("2005",regi,"fesob")) = p04_IO_output_beforeFix("2005",regi,"sesofos","fesob","tdfossob") * pm_fedemand_build("2005",regi,"fesob")/p04_IO_output_beforeFix_Total("2005",regi,"fesob"); *** adjust buildings liquids -f04_IO_output("2005",regi,"seliqbio","fehob","tdbiohob")$(p04_IO_output_beforeFix_Total("2005",regi,"fehob")) = p04_IO_output_beforeFix("2005",regi,"seliqbio","fehob","tdbiohob") * pm_fedemand("2005",regi,"fehob")/p04_IO_output_beforeFix_Total("2005",regi,"fehob"); -f04_IO_output("2005",regi,"seliqfos","fehob","tdfoshob")$(p04_IO_output_beforeFix_Total("2005",regi,"fehob")) = p04_IO_output_beforeFix("2005",regi,"seliqfos","fehob","tdfoshob") * pm_fedemand("2005",regi,"fehob")/p04_IO_output_beforeFix_Total("2005",regi,"fehob"); +f04_IO_output("2005",regi,"seliqbio","fehob","tdbiohob")$(p04_IO_output_beforeFix_Total("2005",regi,"fehob")) = p04_IO_output_beforeFix("2005",regi,"seliqbio","fehob","tdbiohob") * pm_fedemand_build("2005",regi,"fehob")/p04_IO_output_beforeFix_Total("2005",regi,"fehob"); +f04_IO_output("2005",regi,"seliqfos","fehob","tdfoshob")$(p04_IO_output_beforeFix_Total("2005",regi,"fehob")) = p04_IO_output_beforeFix("2005",regi,"seliqfos","fehob","tdfoshob") * pm_fedemand_build("2005",regi,"fehob")/p04_IO_output_beforeFix_Total("2005",regi,"fehob"); *** industry solids @@ -97,18 +97,18 @@ p04_IO_output_beforeFix_Total(t,regi,"fesoi") = p04_IO_output_beforeFix(t,regi," f04_IO_output("2005",regi,"sesobio","fesoi","tdbiosoi")$(p04_IO_output_beforeFix_Total("2005",regi,"fesoi")) = p04_IO_output_beforeFix("2005",regi,"sesobio","fesoi","tdbiosoi") - * ( pm_fedemand("2005",regi,"feso_otherInd") - + pm_fedemand("2005",regi,"feso_cement") - + pm_fedemand("2005",regi,"feso_steel") - + pm_fedemand("2005",regi,"feso_chemicals")) + * ( pm_fedemand_ind("2005",regi,"feso_otherInd") + + pm_fedemand_ind("2005",regi,"feso_cement") + + pm_fedemand_ind("2005",regi,"feso_steel") + + pm_fedemand_ind("2005",regi,"feso_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fesoi"); f04_IO_output("2005",regi,"sesofos","fesoi","tdfossoi")$(p04_IO_output_beforeFix_Total("2005",regi,"fesoi")) = p04_IO_output_beforeFix("2005",regi,"sesofos","fesoi","tdfossoi") - * ( pm_fedemand("2005",regi,"feso_otherInd") - + pm_fedemand("2005",regi,"feso_cement") - + pm_fedemand("2005",regi,"feso_steel") - + pm_fedemand("2005",regi,"feso_chemicals")) + * ( pm_fedemand_ind("2005",regi,"feso_otherInd") + + pm_fedemand_ind("2005",regi,"feso_cement") + + pm_fedemand_ind("2005",regi,"feso_steel") + + pm_fedemand_ind("2005",regi,"feso_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fesoi"); *** industry liquids @@ -117,18 +117,18 @@ p04_IO_output_beforeFix_Total(t,regi,"fehoi") = p04_IO_output_beforeFix(t,regi," f04_IO_output("2005",regi,"seliqbio","fehoi","tdbiohoi")$(p04_IO_output_beforeFix_Total("2005",regi,"fehoi")) = p04_IO_output_beforeFix("2005",regi,"seliqbio","fehoi","tdbiohoi") - * ( pm_fedemand("2005",regi,"feli_otherInd") - + pm_fedemand("2005",regi,"feli_cement") - + pm_fedemand("2005",regi,"feli_steel") - + pm_fedemand("2005",regi,"feli_chemicals")) + * ( pm_fedemand_ind("2005",regi,"feli_otherInd") + + pm_fedemand_ind("2005",regi,"feli_cement") + + pm_fedemand_ind("2005",regi,"feli_steel") + + pm_fedemand_ind("2005",regi,"feli_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fehoi"); f04_IO_output("2005",regi,"seliqfos","fehoi","tdfoshoi")$(p04_IO_output_beforeFix_Total("2005",regi,"fehoi")) = p04_IO_output_beforeFix("2005",regi,"seliqfos","fehoi","tdfoshoi") - * ( pm_fedemand("2005",regi,"feli_otherInd") - + pm_fedemand("2005",regi,"feli_cement") - + pm_fedemand("2005",regi,"feli_steel") - + pm_fedemand("2005",regi,"feli_chemicals")) + * ( pm_fedemand_ind("2005",regi,"feli_otherInd") + + pm_fedemand_ind("2005",regi,"feli_cement") + + pm_fedemand_ind("2005",regi,"feli_steel") + + pm_fedemand_ind("2005",regi,"feli_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fehoi"); *** industry gases @@ -137,18 +137,18 @@ p04_IO_output_beforeFix_Total(t,regi,"fegai") = p04_IO_output_beforeFix(t,regi," f04_IO_output("2005",regi,"segabio","fegai","tdbiogai")$(p04_IO_output_beforeFix_Total("2005",regi,"fegai")) = p04_IO_output_beforeFix("2005",regi,"segabio","fegai","tdbiogai") - * ( pm_fedemand("2005",regi,"fega_otherInd") - + pm_fedemand("2005",regi,"fega_cement") - + pm_fedemand("2005",regi,"fega_steel") - + pm_fedemand("2005",regi,"fega_chemicals")) + * ( pm_fedemand_ind("2005",regi,"fega_otherInd") + + pm_fedemand_ind("2005",regi,"fega_cement") + + pm_fedemand_ind("2005",regi,"fega_steel") + + pm_fedemand_ind("2005",regi,"fega_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fegai"); f04_IO_output("2005",regi,"segafos","fegai","tdfosgai")$(p04_IO_output_beforeFix_Total("2005",regi,"fegai")) = p04_IO_output_beforeFix("2005",regi,"segafos","fegai","tdfosgai") - * ( pm_fedemand("2005",regi,"fega_otherInd") - + pm_fedemand("2005",regi,"fega_cement") - + pm_fedemand("2005",regi,"fega_steel") - + pm_fedemand("2005",regi,"fega_chemicals")) + * ( pm_fedemand_ind("2005",regi,"fega_otherInd") + + pm_fedemand_ind("2005",regi,"fega_cement") + + pm_fedemand_ind("2005",regi,"fega_steel") + + pm_fedemand_ind("2005",regi,"fega_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fegai"); @@ -158,7 +158,7 @@ p04_IO_output_beforeFix_Total(t,regi,"fehei") = p04_IO_output_beforeFix(t,regi," f04_IO_output("2005",regi,"sehe","fehei","tdhei")$(p04_IO_output_beforeFix_Total("2005",regi,"fehei")) = p04_IO_output_beforeFix("2005",regi,"sehe","fehei","tdhei") - * ( pm_fedemand("2005",regi,"fehe_otherInd") + * ( pm_fedemand_ind("2005",regi,"fehe_otherInd") ) / p04_IO_output_beforeFix_Total("2005",regi,"fehei"); diff --git a/modules/29_CES_parameters/calibrate/datainput.gms b/modules/29_CES_parameters/calibrate/datainput.gms index 361ab61eb7..8cd3cf3724 100644 --- a/modules/29_CES_parameters/calibrate/datainput.gms +++ b/modules/29_CES_parameters/calibrate/datainput.gms @@ -178,7 +178,8 @@ loop ((ttot,regi,ppfKap_industry_dyn37(in))$( t(ttot-1) AND t(ttot+1) ), ); ); -display pm_fedemand; +display pm_fedemand_ind; +display pm_fedemand_build; *** Change PPP for MER. p29_capitalQuantity(tall,all_regi,all_in) @@ -213,16 +214,19 @@ Execute_Loadpoint 'input' vm_deltaCap; *** Load exogenous Labour, GDP pm_cesdata(t,regi,"inco","quantity") = pm_gdp(t,regi); pm_cesdata(t,regi,"lab","quantity") = pm_lab(t,regi); -*** Load exogenous FE trajectories + +*** Load exogenous FE trajectories for buildings and industry *** Change EJ to TWa -pm_cesdata(t,regi,in,"quantity")$(pm_fedemand(t,regi,in)) = +pm_cesdata(t,regi,in,"quantity")$(pm_fedemand_build(t,regi,in)) = sm_EJ_2_TWa * pm_fedemand_build(t,regi,in) + +pm_cesdata(t,regi,in,"quantity")$(pm_fedemand_ind(t,regi,in)) = $ifthen.industry_subsectors "%industry%" == "subsectors" - pm_fedemand(t,regi,in)$(industry_ue_calibration_target_dyn37(in)) + pm_fedemand_ind(t,regi,in)$(industry_ue_calibration_target_dyn37(in)) + - sm_EJ_2_TWa * pm_fedemand(t,regi,in)$(NOT industry_ue_calibration_target_dyn37(in)); + sm_EJ_2_TWa * pm_fedemand_ind(t,regi,in)$(NOT industry_ue_calibration_target_dyn37(in)); $else.industry_subsectors - sm_EJ_2_TWa * pm_fedemand(t,regi,in) + sm_EJ_2_TWa * pm_fedemand_ind(t,regi,in) $endif.industry_subsectors *** Load exogenous transport demand - required for the EDGE transport module diff --git a/modules/29_CES_parameters/load/not_used.txt b/modules/29_CES_parameters/load/not_used.txt index c5a27b58b4..6bc18055e8 100644 --- a/modules/29_CES_parameters/load/not_used.txt +++ b/modules/29_CES_parameters/load/not_used.txt @@ -19,8 +19,9 @@ sm_tmp2,input,questionnaire pm_ttot_val,input,questionnaire pm_ue_eff_target,parameter,not needed pm_calibrate_eff_scale,parameter,not needed -pm_fedemand,parameter,not needed +pm_fedemand_ind,parameter,not needed +pm_fedemand_build,parameter,not needed pm_energy_limit,, sm_CES_calibration_iteration,scalar,only applicable during calibration cm_H2InBuildOnlyAfter,parameter,??? -p29_building_relaxed_bounds_dyn,set,not needed \ No newline at end of file +p29_building_relaxed_bounds_dyn,set,not needed diff --git a/modules/36_buildings/simple/input/files b/modules/36_buildings/simple/input/files index 8b218bfc09..6a2fd313d3 100644 --- a/modules/36_buildings/simple/input/files +++ b/modules/36_buildings/simple/input/files @@ -1,3 +1,2 @@ f36_floorspace_scen.cs4r f36_uedemand_build.cs4r -f_fedemand_build.cs4r diff --git a/modules/37_industry/subsectors/bounds.gms b/modules/37_industry/subsectors/bounds.gms index a79cea8242..5e7c740d13 100755 --- a/modules/37_industry/subsectors/bounds.gms +++ b/modules/37_industry/subsectors/bounds.gms @@ -28,13 +28,13 @@ $ifthen.rcp_scen "%cm_rcp_scen%" == "none" !! available for increased production. vm_cesIO.up(t,regi,"ue_steel_secondary") = ( ( p37_cesIO_up_steel_secondary(t,regi,"%cm_GDPpopScen%") - / pm_fedemand(t,regi,"ue_steel_secondary") + / pm_fedemand_ind(t,regi,"ue_steel_secondary") - 1 ) / 10 + 1 ) - * pm_fedemand(t,regi,"ue_steel_secondary"); + * pm_fedemand_ind(t,regi,"ue_steel_secondary"); $elseif.rcp_scen "%cm_rcp_scen%" == "rcp85" !! In no-policy scenarios, tight bounds representing usual scrap recycling !! rates apply. Only 10% of the difference between projected secondary @@ -42,13 +42,13 @@ $elseif.rcp_scen "%cm_rcp_scen%" == "rcp85" !! available for increased production. vm_cesIO.up(t,regi,"ue_steel_secondary") = ( ( p37_cesIO_up_steel_secondary(t,regi,"%cm_GDPpopScen%") - / pm_fedemand(t,regi,"ue_steel_secondary") + / pm_fedemand_ind(t,regi,"ue_steel_secondary") - 1 ) / 10 + 1 ) - * pm_fedemand(t,regi,"ue_steel_secondary"); + * pm_fedemand_ind(t,regi,"ue_steel_secondary"); $elseif.rcp_scen "%cm_rcp_scen%" == "rcp60" !! In no-policy scenarios, tight bounds representing usual scrap recycling !! rates apply. Only 10% of the difference between projected secondary @@ -56,13 +56,13 @@ $elseif.rcp_scen "%cm_rcp_scen%" == "rcp60" !! available for increased production. vm_cesIO.up(t,regi,"ue_steel_secondary") = ( ( p37_cesIO_up_steel_secondary(t,regi,"%cm_GDPpopScen%") - / pm_fedemand(t,regi,"ue_steel_secondary") + / pm_fedemand_ind(t,regi,"ue_steel_secondary") - 1 ) / 10 + 1 ) - * pm_fedemand(t,regi,"ue_steel_secondary"); + * pm_fedemand_ind(t,regi,"ue_steel_secondary"); $elseif.rcp_scen "%cm_rcp_scen%" == "rcp45" !! In no-policy scenarios, tight bounds representing usual scrap recycling !! rates apply. Only 10% of the difference between projected secondary @@ -70,13 +70,13 @@ $elseif.rcp_scen "%cm_rcp_scen%" == "rcp45" !! available for increased production. vm_cesIO.up(t,regi,"ue_steel_secondary") = ( ( p37_cesIO_up_steel_secondary(t,regi,"%cm_GDPpopScen%") - / pm_fedemand(t,regi,"ue_steel_secondary") + / pm_fedemand_ind(t,regi,"ue_steel_secondary") - 1 ) / 10 + 1 ) - * pm_fedemand(t,regi,"ue_steel_secondary"); + * pm_fedemand_ind(t,regi,"ue_steel_secondary"); $else.rcp_scen !! In policy scenarios, secondary steel production can be increased up to the !! limit of theoretical scrap availability. diff --git a/modules/37_industry/subsectors/datainput.gms b/modules/37_industry/subsectors/datainput.gms index 3cbfeedb8a..fa0140225f 100644 --- a/modules/37_industry/subsectors/datainput.gms +++ b/modules/37_industry/subsectors/datainput.gms @@ -276,7 +276,7 @@ emiMac2mac("co2otherInd","co2otherInd") = NO; *** data on maximum secondary steel production *** The steel recycling rate limit is assumed to increase from 90 to 99 %. p37_cesIO_up_steel_secondary(tall,all_regi,all_GDPpopScen) - = pm_fedemand(tall,all_regi,"ue_steel_secondary") + = pm_fedemand_ind(tall,all_regi,"ue_steel_secondary") / 0.9 * 0.99; @@ -803,7 +803,7 @@ if (cm_startyear eq 2005, !! 2nd stage tech loop(mat2ue(mat,in), - p37_matFlowHist(ttot,regi,mat) = pm_fedemand(ttot,regi,in) / p37_mat2ue(mat,in) * p37_ue_share(mat,in); + p37_matFlowHist(ttot,regi,mat) = pm_fedemand_ind(ttot,regi,in) / p37_mat2ue(mat,in) * p37_ue_share(mat,in); loop(tePrc2matOut(tePrc,opmoPrc,mat), pm_outflowPrcHist(ttot,regi,tePrc,opmoPrc) = p37_matFlowHist(ttot,regi,mat) * p37_teMatShareHist(tePrc,opmoPrc,mat); ); @@ -824,7 +824,7 @@ if (cm_startyear eq 2005, loop((entyFe,ppfUePrc), p37_demFeTarget(ttot,regi,entyFe,ppfUePrc) = sum(tePrc2ue(tePrc,opmoPrc,ppfUePrc), pm_outflowPrcHist(ttot,regi,tePrc,opmoPrc) * p37_specFeDemTarget(entyFe,tePrc,opmoPrc)); - p37_demFeActual(ttot,regi,entyFe,ppfUePrc) = sum((fe2ppfen_no_ces_use(entyFe,all_in),ue2ppfenPrc(ppfUePrc,all_in)), pm_fedemand(ttot,regi,all_in) * sm_EJ_2_TWa); + p37_demFeActual(ttot,regi,entyFe,ppfUePrc) = sum((fe2ppfen_no_ces_use(entyFe,all_in),ue2ppfenPrc(ppfUePrc,all_in)), pm_fedemand_ind(ttot,regi,all_in) * sm_EJ_2_TWa); ); p37_demFeRatio(ttot,regi,ppfUePrc) = sum(entyFe,p37_demFeActual(ttot,regi,entyFe,ppfUePrc)) / sum(entyFe,p37_demFeTarget(ttot,regi,entyFe,ppfUePrc)); diff --git a/modules/37_industry/subsectors/realization.gms b/modules/37_industry/subsectors/realization.gms index bd620d73e9..4cfc6a06db 100644 --- a/modules/37_industry/subsectors/realization.gms +++ b/modules/37_industry/subsectors/realization.gms @@ -29,7 +29,7 @@ *' q_costOM; techno-economic data is input via generisdata_tech.prn *' - Specific FE demands (arbitrary number of inputs) are used instead of one efficiency eta *' - For historically exisitng tech, specific energy demand follows exogenous convergence from -*' historical values (via pm_fedemand) to the best available technology (BAT) +*' historical values (via pm_fedemand_ind) to the best available technology (BAT) *' - For "new" tech, temporally constant BAT values are assumed for energy efficiency *' - Technologies have specific material demands. Materials can be model-external (e.g. iron ore) *' or outputs of other processes (e.g. DRI); This allows to have process routes consiting of diff --git a/modules/37_industry/subsectors/sets.gms b/modules/37_industry/subsectors/sets.gms index 06e3f02bec..55ab8b8114 100644 --- a/modules/37_industry/subsectors/sets.gms +++ b/modules/37_industry/subsectors/sets.gms @@ -448,7 +448,7 @@ $ifthen.cm_subsec_model_steel "%cm_subsec_model_steel%" == "processes" $endif.cm_subsec_model_steel / -ppfen_no_ces_use(all_in) "FE nodes of all_in that are not part of the CES tree in the process-based industry model; Needed for pm_fedemand data input" +ppfen_no_ces_use(all_in) "FE nodes of all_in that are not part of the CES tree in the process-based industry model; Needed for pm_fedemand_ind data input" / $ifthen.cm_subsec_model_steel "%cm_subsec_model_steel%" == "processes" feso_steel diff --git a/tutorials/12_Calibrating_CES_Parameters.md b/tutorials/12_Calibrating_CES_Parameters.md index 6b1da20070..1e4105a91a 100644 --- a/tutorials/12_Calibrating_CES_Parameters.md +++ b/tutorials/12_Calibrating_CES_Parameters.md @@ -76,7 +76,8 @@ For the calibration process to work, we need both: - `./core/input/f_gdp.cs3r` - `./core/input/f_pop.cs3r` - `./modules/29_CES_parameters/calibrate/input/f29_capitalQuantity.cs4r` - - `./core/input/f_fedemand.cs4r` + - `./core/input/f_fedemand_build.cs4r` + - `./core/input/f_fedemand_ind.cs4r` 2. Prices of `ppf` at the previous iteration. They are calculated using the `input.gdx` provided to the calibration run. User intervention is only required when prices cannot be derived from the `.gdx` @@ -214,8 +215,9 @@ observed problems and suggested solutions. This can happen in new or modified scenario (`GDPscen`, `POPscen`) where the data is missing entirely. Otherwise, check the input files (`./core/input/f_gdp.cs3r`, `./core/input/f_pop.cs3r`, - `./modules/29_CES_parameters/calibrate/input/f29_capitalQuantity.cs4r`, and - `./core/input/f_fedemand.cs4r`) to figure out which data is missing and fix it. + `./modules/29_CES_parameters/calibrate/input/f29_capitalQuantity.cs4r`, + `./core/input/f_fedemand_build.cs4r` and `./core/input/f_fedemand_ind.cs4r`) to + figure out which data is missing and fix it. #### $\xi \lt 0$ This error (_assertion xi gt 0 failed, see .log file for details_) should not From 9264b72d496e92742412566ad5c154769f34343e Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 15 Apr 2026 11:18:39 +0200 Subject: [PATCH 02/11] rename parameters --- core/datainput.gms | 14 ++--- core/declarations.gms | 4 +- .../04_PE_FE_parameters/iea2014/datainput.gms | 58 +++++++++---------- .../29_CES_parameters/calibrate/datainput.gms | 14 ++--- modules/29_CES_parameters/load/not_used.txt | 4 +- modules/37_industry/subsectors/bounds.gms | 16 ++--- modules/37_industry/subsectors/datainput.gms | 6 +- .../37_industry/subsectors/realization.gms | 2 +- modules/37_industry/subsectors/sets.gms | 2 +- 9 files changed, 60 insertions(+), 60 deletions(-) diff --git a/core/datainput.gms b/core/datainput.gms index 54e4287671..12be0009cd 100644 --- a/core/datainput.gms +++ b/core/datainput.gms @@ -1656,18 +1656,18 @@ $offdelim *** use cm_demScen for Industry and Buildings -pm_fedemand_ind(tall,all_regi,in) = f_fedemand_ind(tall,all_regi,"%cm_demScen%",in); -pm_fedemand_build(t,regi,cal_ppf_buildings_dyn36) = f_fedemand_build(t,regi,"%cm_demScen%","%cm_rcp_scen_build%",cal_ppf_buildings_dyn36); +pm_fedemandInd(tall,all_regi,in) = f_fedemand_ind(tall,all_regi,"%cm_demScen%",in); +pm_fedemandBuild(t,regi,cal_ppf_buildings_dyn36) = f_fedemand_build(t,regi,"%cm_demScen%","%cm_rcp_scen_build%",cal_ppf_buildings_dyn36); *** data input for industry FE that is no part of the CES tree -pm_fedemand_ind(tall,all_regi,ppfen_no_ces_use) = f_fedemand_ind(tall,all_regi,"%cm_demScen%",ppfen_no_ces_use); +pm_fedemandInd(tall,all_regi,ppfen_no_ces_use) = f_fedemand_ind(tall,all_regi,"%cm_demScen%",ppfen_no_ces_use); *** Scale FE demand across industry and building sectors $ifthen.scaleDemand not "%cm_scaleDemand%" == "off" loop((tall,tall2,all_regi) $ pm_scaleDemand(tall,tall2,all_regi), *FL* rescaled demand = normal demand * [ scaling factor + (1-scaling factor) * remaining phase-in, between zero and one ] - pm_fedemand_ind(t,all_regi,all_in) = pm_fedemand_ind(t,all_regi,all_in) * ( pm_scaleDemand(tall,tall2,all_regi) + (1-pm_scaleDemand(tall,tall2,all_regi)) * min(1, max(0, tall2.val-t.val) / (tall2.val-tall.val)) ); - pm_fedemand_build(t,all_regi,all_in) = pm_fedemand_build(t,all_regi,all_in) * ( pm_scaleDemand(tall,tall2,all_regi) + (1-pm_scaleDemand(tall,tall2,all_regi)) * min(1, max(0, tall2.val-t.val) / (tall2.val-tall.val)) ); + pm_fedemandInd(t,all_regi,all_in) = pm_fedemandInd(t,all_regi,all_in) * ( pm_scaleDemand(tall,tall2,all_regi) + (1-pm_scaleDemand(tall,tall2,all_regi)) * min(1, max(0, tall2.val-t.val) / (tall2.val-tall.val)) ); + pm_fedemandBuild(t,all_regi,all_in) = pm_fedemandBuild(t,all_regi,all_in) * ( pm_scaleDemand(tall,tall2,all_regi) + (1-pm_scaleDemand(tall,tall2,all_regi)) * min(1, max(0, tall2.val-t.val) / (tall2.val-tall.val)) ); ); $endif.scaleDemand @@ -1693,7 +1693,7 @@ pm_scaleDemandBuildTable(t,regi) $ ( pm_scaleDemandBuildTable(t,regi) le 0) = 1; pm_scaleDemandBuildTable(t,regi) $ (t.val > 2100 ) = pm_scaleDemandBuildTable("2100",regi); !! continue 2100 multiplier until end of time loop( (t,regi,in) $ in_buildings_dyn36(in) , - pm_fedemand_build(t,regi,in) = pm_fedemand_build(t,regi,in) * pm_scaleDemandBuildTable(t,regi) + pm_fedemandBuild(t,regi,in) = pm_fedemandBuild(t,regi,in) * pm_scaleDemandBuildTable(t,regi) ); $endif.scaleDemandBuildTable @@ -1718,7 +1718,7 @@ p_scaleDemandIndTable(t,regi) $ ( p_scaleDemandIndTable(t,regi) le 0) = 1; !! I p_scaleDemandIndTable(t,regi) $ (t.val > 2100 ) = p_scaleDemandIndTable("2100",regi); !! continue 2100 multiplier until end of time loop( (t,regi,in) $ in_industry_dyn37(in) , - pm_fedemand_ind(t,regi,in) = pm_fedemand_ind(t,regi,in) * p_scaleDemandIndTable(t,regi) + pm_fedemandInd(t,regi,in) = pm_fedemandInd(t,regi,in) * p_scaleDemandIndTable(t,regi) ); $endif.scaleDemandIndTable diff --git a/core/declarations.gms b/core/declarations.gms index 482137adeb..b04c6745ab 100644 --- a/core/declarations.gms +++ b/core/declarations.gms @@ -298,8 +298,8 @@ p_co2CCSReference(ttot,all_regi,all_enty,all_enty,all_te,rlf) "Captured CO2 put p_prodAllReference(ttot,all_regi,all_te) "Sum of the above in the reference run. As each technology has only one type of output, the differing units should not be a problem" *** CES calibration tarjectories industry and buildings -pm_fedemand_ind(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in industry [TWa]" -pm_fedemand_build(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in buildings [TWa]" +pm_fedemandInd(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in industry [TWa]" +pm_fedemandBuild(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in buildings [TWa]" *** parameters for setting final energy shares pm_shfe_up(ttot,all_regi,all_enty,emi_sectors) "Final energy shares exogenous upper bounds per sector [share]" diff --git a/modules/04_PE_FE_parameters/iea2014/datainput.gms b/modules/04_PE_FE_parameters/iea2014/datainput.gms index af10abd5d5..7475fe08ae 100644 --- a/modules/04_PE_FE_parameters/iea2014/datainput.gms +++ b/modules/04_PE_FE_parameters/iea2014/datainput.gms @@ -83,12 +83,12 @@ p04_IO_output_beforeFix_Total(t,regi,"fehob") = p04_IO_output_beforeFix(t,regi," + p04_IO_output_beforeFix(t,regi,"seliqfos","fehob","tdfoshob"); *** adjust buildings solids -f04_IO_output("2005",regi,"sesobio","fesob","tdbiosob")$(p04_IO_output_beforeFix_Total("2005",regi,"fesob")) = p04_IO_output_beforeFix("2005",regi,"sesobio","fesob","tdbiosob") * pm_fedemand_build("2005",regi,"fesob")/p04_IO_output_beforeFix_Total("2005",regi,"fesob"); -f04_IO_output("2005",regi,"sesofos","fesob","tdfossob")$(p04_IO_output_beforeFix_Total("2005",regi,"fesob")) = p04_IO_output_beforeFix("2005",regi,"sesofos","fesob","tdfossob") * pm_fedemand_build("2005",regi,"fesob")/p04_IO_output_beforeFix_Total("2005",regi,"fesob"); +f04_IO_output("2005",regi,"sesobio","fesob","tdbiosob")$(p04_IO_output_beforeFix_Total("2005",regi,"fesob")) = p04_IO_output_beforeFix("2005",regi,"sesobio","fesob","tdbiosob") * pm_fedemandBuild("2005",regi,"fesob")/p04_IO_output_beforeFix_Total("2005",regi,"fesob"); +f04_IO_output("2005",regi,"sesofos","fesob","tdfossob")$(p04_IO_output_beforeFix_Total("2005",regi,"fesob")) = p04_IO_output_beforeFix("2005",regi,"sesofos","fesob","tdfossob") * pm_fedemandBuild("2005",regi,"fesob")/p04_IO_output_beforeFix_Total("2005",regi,"fesob"); *** adjust buildings liquids -f04_IO_output("2005",regi,"seliqbio","fehob","tdbiohob")$(p04_IO_output_beforeFix_Total("2005",regi,"fehob")) = p04_IO_output_beforeFix("2005",regi,"seliqbio","fehob","tdbiohob") * pm_fedemand_build("2005",regi,"fehob")/p04_IO_output_beforeFix_Total("2005",regi,"fehob"); -f04_IO_output("2005",regi,"seliqfos","fehob","tdfoshob")$(p04_IO_output_beforeFix_Total("2005",regi,"fehob")) = p04_IO_output_beforeFix("2005",regi,"seliqfos","fehob","tdfoshob") * pm_fedemand_build("2005",regi,"fehob")/p04_IO_output_beforeFix_Total("2005",regi,"fehob"); +f04_IO_output("2005",regi,"seliqbio","fehob","tdbiohob")$(p04_IO_output_beforeFix_Total("2005",regi,"fehob")) = p04_IO_output_beforeFix("2005",regi,"seliqbio","fehob","tdbiohob") * pm_fedemandBuild("2005",regi,"fehob")/p04_IO_output_beforeFix_Total("2005",regi,"fehob"); +f04_IO_output("2005",regi,"seliqfos","fehob","tdfoshob")$(p04_IO_output_beforeFix_Total("2005",regi,"fehob")) = p04_IO_output_beforeFix("2005",regi,"seliqfos","fehob","tdfoshob") * pm_fedemandBuild("2005",regi,"fehob")/p04_IO_output_beforeFix_Total("2005",regi,"fehob"); *** industry solids @@ -97,18 +97,18 @@ p04_IO_output_beforeFix_Total(t,regi,"fesoi") = p04_IO_output_beforeFix(t,regi," f04_IO_output("2005",regi,"sesobio","fesoi","tdbiosoi")$(p04_IO_output_beforeFix_Total("2005",regi,"fesoi")) = p04_IO_output_beforeFix("2005",regi,"sesobio","fesoi","tdbiosoi") - * ( pm_fedemand_ind("2005",regi,"feso_otherInd") - + pm_fedemand_ind("2005",regi,"feso_cement") - + pm_fedemand_ind("2005",regi,"feso_steel") - + pm_fedemand_ind("2005",regi,"feso_chemicals")) + * ( pm_fedemandInd("2005",regi,"feso_otherInd") + + pm_fedemandInd("2005",regi,"feso_cement") + + pm_fedemandInd("2005",regi,"feso_steel") + + pm_fedemandInd("2005",regi,"feso_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fesoi"); f04_IO_output("2005",regi,"sesofos","fesoi","tdfossoi")$(p04_IO_output_beforeFix_Total("2005",regi,"fesoi")) = p04_IO_output_beforeFix("2005",regi,"sesofos","fesoi","tdfossoi") - * ( pm_fedemand_ind("2005",regi,"feso_otherInd") - + pm_fedemand_ind("2005",regi,"feso_cement") - + pm_fedemand_ind("2005",regi,"feso_steel") - + pm_fedemand_ind("2005",regi,"feso_chemicals")) + * ( pm_fedemandInd("2005",regi,"feso_otherInd") + + pm_fedemandInd("2005",regi,"feso_cement") + + pm_fedemandInd("2005",regi,"feso_steel") + + pm_fedemandInd("2005",regi,"feso_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fesoi"); *** industry liquids @@ -117,18 +117,18 @@ p04_IO_output_beforeFix_Total(t,regi,"fehoi") = p04_IO_output_beforeFix(t,regi," f04_IO_output("2005",regi,"seliqbio","fehoi","tdbiohoi")$(p04_IO_output_beforeFix_Total("2005",regi,"fehoi")) = p04_IO_output_beforeFix("2005",regi,"seliqbio","fehoi","tdbiohoi") - * ( pm_fedemand_ind("2005",regi,"feli_otherInd") - + pm_fedemand_ind("2005",regi,"feli_cement") - + pm_fedemand_ind("2005",regi,"feli_steel") - + pm_fedemand_ind("2005",regi,"feli_chemicals")) + * ( pm_fedemandInd("2005",regi,"feli_otherInd") + + pm_fedemandInd("2005",regi,"feli_cement") + + pm_fedemandInd("2005",regi,"feli_steel") + + pm_fedemandInd("2005",regi,"feli_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fehoi"); f04_IO_output("2005",regi,"seliqfos","fehoi","tdfoshoi")$(p04_IO_output_beforeFix_Total("2005",regi,"fehoi")) = p04_IO_output_beforeFix("2005",regi,"seliqfos","fehoi","tdfoshoi") - * ( pm_fedemand_ind("2005",regi,"feli_otherInd") - + pm_fedemand_ind("2005",regi,"feli_cement") - + pm_fedemand_ind("2005",regi,"feli_steel") - + pm_fedemand_ind("2005",regi,"feli_chemicals")) + * ( pm_fedemandInd("2005",regi,"feli_otherInd") + + pm_fedemandInd("2005",regi,"feli_cement") + + pm_fedemandInd("2005",regi,"feli_steel") + + pm_fedemandInd("2005",regi,"feli_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fehoi"); *** industry gases @@ -137,18 +137,18 @@ p04_IO_output_beforeFix_Total(t,regi,"fegai") = p04_IO_output_beforeFix(t,regi," f04_IO_output("2005",regi,"segabio","fegai","tdbiogai")$(p04_IO_output_beforeFix_Total("2005",regi,"fegai")) = p04_IO_output_beforeFix("2005",regi,"segabio","fegai","tdbiogai") - * ( pm_fedemand_ind("2005",regi,"fega_otherInd") - + pm_fedemand_ind("2005",regi,"fega_cement") - + pm_fedemand_ind("2005",regi,"fega_steel") - + pm_fedemand_ind("2005",regi,"fega_chemicals")) + * ( pm_fedemandInd("2005",regi,"fega_otherInd") + + pm_fedemandInd("2005",regi,"fega_cement") + + pm_fedemandInd("2005",regi,"fega_steel") + + pm_fedemandInd("2005",regi,"fega_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fegai"); f04_IO_output("2005",regi,"segafos","fegai","tdfosgai")$(p04_IO_output_beforeFix_Total("2005",regi,"fegai")) = p04_IO_output_beforeFix("2005",regi,"segafos","fegai","tdfosgai") - * ( pm_fedemand_ind("2005",regi,"fega_otherInd") - + pm_fedemand_ind("2005",regi,"fega_cement") - + pm_fedemand_ind("2005",regi,"fega_steel") - + pm_fedemand_ind("2005",regi,"fega_chemicals")) + * ( pm_fedemandInd("2005",regi,"fega_otherInd") + + pm_fedemandInd("2005",regi,"fega_cement") + + pm_fedemandInd("2005",regi,"fega_steel") + + pm_fedemandInd("2005",regi,"fega_chemicals")) / p04_IO_output_beforeFix_Total("2005",regi,"fegai"); @@ -158,7 +158,7 @@ p04_IO_output_beforeFix_Total(t,regi,"fehei") = p04_IO_output_beforeFix(t,regi," f04_IO_output("2005",regi,"sehe","fehei","tdhei")$(p04_IO_output_beforeFix_Total("2005",regi,"fehei")) = p04_IO_output_beforeFix("2005",regi,"sehe","fehei","tdhei") - * ( pm_fedemand_ind("2005",regi,"fehe_otherInd") + * ( pm_fedemandInd("2005",regi,"fehe_otherInd") ) / p04_IO_output_beforeFix_Total("2005",regi,"fehei"); diff --git a/modules/29_CES_parameters/calibrate/datainput.gms b/modules/29_CES_parameters/calibrate/datainput.gms index 8cd3cf3724..bc005cbd2c 100644 --- a/modules/29_CES_parameters/calibrate/datainput.gms +++ b/modules/29_CES_parameters/calibrate/datainput.gms @@ -178,8 +178,8 @@ loop ((ttot,regi,ppfKap_industry_dyn37(in))$( t(ttot-1) AND t(ttot+1) ), ); ); -display pm_fedemand_ind; -display pm_fedemand_build; +display pm_fedemandInd; +display pm_fedemandBuild; *** Change PPP for MER. p29_capitalQuantity(tall,all_regi,all_in) @@ -218,15 +218,15 @@ pm_cesdata(t,regi,"lab","quantity") = pm_lab(t,regi); *** Load exogenous FE trajectories for buildings and industry *** Change EJ to TWa -pm_cesdata(t,regi,in,"quantity")$(pm_fedemand_build(t,regi,in)) = sm_EJ_2_TWa * pm_fedemand_build(t,regi,in) +pm_cesdata(t,regi,in,"quantity")$(pm_fedemandBuild(t,regi,in)) = sm_EJ_2_TWa * pm_fedemandBuild(t,regi,in) -pm_cesdata(t,regi,in,"quantity")$(pm_fedemand_ind(t,regi,in)) = +pm_cesdata(t,regi,in,"quantity")$(pm_fedemandInd(t,regi,in)) = $ifthen.industry_subsectors "%industry%" == "subsectors" - pm_fedemand_ind(t,regi,in)$(industry_ue_calibration_target_dyn37(in)) + pm_fedemandInd(t,regi,in)$(industry_ue_calibration_target_dyn37(in)) + - sm_EJ_2_TWa * pm_fedemand_ind(t,regi,in)$(NOT industry_ue_calibration_target_dyn37(in)); + sm_EJ_2_TWa * pm_fedemandInd(t,regi,in)$(NOT industry_ue_calibration_target_dyn37(in)); $else.industry_subsectors - sm_EJ_2_TWa * pm_fedemand_ind(t,regi,in) + sm_EJ_2_TWa * pm_fedemandInd(t,regi,in) $endif.industry_subsectors *** Load exogenous transport demand - required for the EDGE transport module diff --git a/modules/29_CES_parameters/load/not_used.txt b/modules/29_CES_parameters/load/not_used.txt index 6bc18055e8..50214f04db 100644 --- a/modules/29_CES_parameters/load/not_used.txt +++ b/modules/29_CES_parameters/load/not_used.txt @@ -19,8 +19,8 @@ sm_tmp2,input,questionnaire pm_ttot_val,input,questionnaire pm_ue_eff_target,parameter,not needed pm_calibrate_eff_scale,parameter,not needed -pm_fedemand_ind,parameter,not needed -pm_fedemand_build,parameter,not needed +pm_fedemandInd,parameter,not needed +pm_fedemandBuild,parameter,not needed pm_energy_limit,, sm_CES_calibration_iteration,scalar,only applicable during calibration cm_H2InBuildOnlyAfter,parameter,??? diff --git a/modules/37_industry/subsectors/bounds.gms b/modules/37_industry/subsectors/bounds.gms index 5e7c740d13..2d3e1a1292 100755 --- a/modules/37_industry/subsectors/bounds.gms +++ b/modules/37_industry/subsectors/bounds.gms @@ -28,13 +28,13 @@ $ifthen.rcp_scen "%cm_rcp_scen%" == "none" !! available for increased production. vm_cesIO.up(t,regi,"ue_steel_secondary") = ( ( p37_cesIO_up_steel_secondary(t,regi,"%cm_GDPpopScen%") - / pm_fedemand_ind(t,regi,"ue_steel_secondary") + / pm_fedemandInd(t,regi,"ue_steel_secondary") - 1 ) / 10 + 1 ) - * pm_fedemand_ind(t,regi,"ue_steel_secondary"); + * pm_fedemandInd(t,regi,"ue_steel_secondary"); $elseif.rcp_scen "%cm_rcp_scen%" == "rcp85" !! In no-policy scenarios, tight bounds representing usual scrap recycling !! rates apply. Only 10% of the difference between projected secondary @@ -42,13 +42,13 @@ $elseif.rcp_scen "%cm_rcp_scen%" == "rcp85" !! available for increased production. vm_cesIO.up(t,regi,"ue_steel_secondary") = ( ( p37_cesIO_up_steel_secondary(t,regi,"%cm_GDPpopScen%") - / pm_fedemand_ind(t,regi,"ue_steel_secondary") + / pm_fedemandInd(t,regi,"ue_steel_secondary") - 1 ) / 10 + 1 ) - * pm_fedemand_ind(t,regi,"ue_steel_secondary"); + * pm_fedemandInd(t,regi,"ue_steel_secondary"); $elseif.rcp_scen "%cm_rcp_scen%" == "rcp60" !! In no-policy scenarios, tight bounds representing usual scrap recycling !! rates apply. Only 10% of the difference between projected secondary @@ -56,13 +56,13 @@ $elseif.rcp_scen "%cm_rcp_scen%" == "rcp60" !! available for increased production. vm_cesIO.up(t,regi,"ue_steel_secondary") = ( ( p37_cesIO_up_steel_secondary(t,regi,"%cm_GDPpopScen%") - / pm_fedemand_ind(t,regi,"ue_steel_secondary") + / pm_fedemandInd(t,regi,"ue_steel_secondary") - 1 ) / 10 + 1 ) - * pm_fedemand_ind(t,regi,"ue_steel_secondary"); + * pm_fedemandInd(t,regi,"ue_steel_secondary"); $elseif.rcp_scen "%cm_rcp_scen%" == "rcp45" !! In no-policy scenarios, tight bounds representing usual scrap recycling !! rates apply. Only 10% of the difference between projected secondary @@ -70,13 +70,13 @@ $elseif.rcp_scen "%cm_rcp_scen%" == "rcp45" !! available for increased production. vm_cesIO.up(t,regi,"ue_steel_secondary") = ( ( p37_cesIO_up_steel_secondary(t,regi,"%cm_GDPpopScen%") - / pm_fedemand_ind(t,regi,"ue_steel_secondary") + / pm_fedemandInd(t,regi,"ue_steel_secondary") - 1 ) / 10 + 1 ) - * pm_fedemand_ind(t,regi,"ue_steel_secondary"); + * pm_fedemandInd(t,regi,"ue_steel_secondary"); $else.rcp_scen !! In policy scenarios, secondary steel production can be increased up to the !! limit of theoretical scrap availability. diff --git a/modules/37_industry/subsectors/datainput.gms b/modules/37_industry/subsectors/datainput.gms index fa0140225f..2a5c57b9cd 100644 --- a/modules/37_industry/subsectors/datainput.gms +++ b/modules/37_industry/subsectors/datainput.gms @@ -276,7 +276,7 @@ emiMac2mac("co2otherInd","co2otherInd") = NO; *** data on maximum secondary steel production *** The steel recycling rate limit is assumed to increase from 90 to 99 %. p37_cesIO_up_steel_secondary(tall,all_regi,all_GDPpopScen) - = pm_fedemand_ind(tall,all_regi,"ue_steel_secondary") + = pm_fedemandInd(tall,all_regi,"ue_steel_secondary") / 0.9 * 0.99; @@ -803,7 +803,7 @@ if (cm_startyear eq 2005, !! 2nd stage tech loop(mat2ue(mat,in), - p37_matFlowHist(ttot,regi,mat) = pm_fedemand_ind(ttot,regi,in) / p37_mat2ue(mat,in) * p37_ue_share(mat,in); + p37_matFlowHist(ttot,regi,mat) = pm_fedemandInd(ttot,regi,in) / p37_mat2ue(mat,in) * p37_ue_share(mat,in); loop(tePrc2matOut(tePrc,opmoPrc,mat), pm_outflowPrcHist(ttot,regi,tePrc,opmoPrc) = p37_matFlowHist(ttot,regi,mat) * p37_teMatShareHist(tePrc,opmoPrc,mat); ); @@ -824,7 +824,7 @@ if (cm_startyear eq 2005, loop((entyFe,ppfUePrc), p37_demFeTarget(ttot,regi,entyFe,ppfUePrc) = sum(tePrc2ue(tePrc,opmoPrc,ppfUePrc), pm_outflowPrcHist(ttot,regi,tePrc,opmoPrc) * p37_specFeDemTarget(entyFe,tePrc,opmoPrc)); - p37_demFeActual(ttot,regi,entyFe,ppfUePrc) = sum((fe2ppfen_no_ces_use(entyFe,all_in),ue2ppfenPrc(ppfUePrc,all_in)), pm_fedemand_ind(ttot,regi,all_in) * sm_EJ_2_TWa); + p37_demFeActual(ttot,regi,entyFe,ppfUePrc) = sum((fe2ppfen_no_ces_use(entyFe,all_in),ue2ppfenPrc(ppfUePrc,all_in)), pm_fedemandInd(ttot,regi,all_in) * sm_EJ_2_TWa); ); p37_demFeRatio(ttot,regi,ppfUePrc) = sum(entyFe,p37_demFeActual(ttot,regi,entyFe,ppfUePrc)) / sum(entyFe,p37_demFeTarget(ttot,regi,entyFe,ppfUePrc)); diff --git a/modules/37_industry/subsectors/realization.gms b/modules/37_industry/subsectors/realization.gms index 4cfc6a06db..0620415ab8 100644 --- a/modules/37_industry/subsectors/realization.gms +++ b/modules/37_industry/subsectors/realization.gms @@ -29,7 +29,7 @@ *' q_costOM; techno-economic data is input via generisdata_tech.prn *' - Specific FE demands (arbitrary number of inputs) are used instead of one efficiency eta *' - For historically exisitng tech, specific energy demand follows exogenous convergence from -*' historical values (via pm_fedemand_ind) to the best available technology (BAT) +*' historical values (via pm_fedemandInd) to the best available technology (BAT) *' - For "new" tech, temporally constant BAT values are assumed for energy efficiency *' - Technologies have specific material demands. Materials can be model-external (e.g. iron ore) *' or outputs of other processes (e.g. DRI); This allows to have process routes consiting of diff --git a/modules/37_industry/subsectors/sets.gms b/modules/37_industry/subsectors/sets.gms index 55ab8b8114..58b02d91a5 100644 --- a/modules/37_industry/subsectors/sets.gms +++ b/modules/37_industry/subsectors/sets.gms @@ -448,7 +448,7 @@ $ifthen.cm_subsec_model_steel "%cm_subsec_model_steel%" == "processes" $endif.cm_subsec_model_steel / -ppfen_no_ces_use(all_in) "FE nodes of all_in that are not part of the CES tree in the process-based industry model; Needed for pm_fedemand_ind data input" +ppfen_no_ces_use(all_in) "FE nodes of all_in that are not part of the CES tree in the process-based industry model; Needed for pm_fedemandInd data input" / $ifthen.cm_subsec_model_steel "%cm_subsec_model_steel%" == "processes" feso_steel From 70856d6a218bf9b11c4a3083e9b256b420a4bb59 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 15 Apr 2026 12:11:03 +0200 Subject: [PATCH 03/11] adjust scope for industry parameters --- core/datainput.gms | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/core/datainput.gms b/core/datainput.gms index 12be0009cd..65a293e2bf 100644 --- a/core/datainput.gms +++ b/core/datainput.gms @@ -1638,29 +1638,28 @@ loop(te, *** ---- FE demand trajectories for calibration ------------------------------- Parameter -f_fedemand_ind(tall,all_regi,all_demScen,all_in) "final energy demand in industry" +f_fedemandInd(tall,all_regi,all_demScen,all_in) "final energy demand in industry" / $ondelim $include "./core/input/f_fedemand_ind.cs4r" $offdelim /; +pm_fedemandInd(t,regi,in) = f_fedemandInd(t,regi,"%cm_demScen%",in); +*** data input for industry FE that is no part of the CES tree +*** needed for process-based steel implementation +pm_fedemandInd(t,regi,ppfen_no_ces_use) = f_fedemandInd(t,regi,"%cm_demScen%",ppfen_no_ces_use); + *** RCP-dependent demands in buildings (climate impact) Parameter -f_fedemand_build(tall,all_regi,all_demScen,all_rcp_scen,all_in) "RCP-dependent final energy demand in buildings" +f_fedemandBuild(tall,all_regi,all_demScen,all_rcp_scen,all_in) "RCP-dependent final energy demand in buildings" / $ondelim $include "./core/input/f_fedemand_build.cs4r" $offdelim /; - -*** use cm_demScen for Industry and Buildings -pm_fedemandInd(tall,all_regi,in) = f_fedemand_ind(tall,all_regi,"%cm_demScen%",in); -pm_fedemandBuild(t,regi,cal_ppf_buildings_dyn36) = f_fedemand_build(t,regi,"%cm_demScen%","%cm_rcp_scen_build%",cal_ppf_buildings_dyn36); - -*** data input for industry FE that is no part of the CES tree -pm_fedemandInd(tall,all_regi,ppfen_no_ces_use) = f_fedemand_ind(tall,all_regi,"%cm_demScen%",ppfen_no_ces_use); +pm_fedemandBuild(t,regi,cal_ppf_buildings_dyn36) = f_fedemandBuild(t,regi,"%cm_demScen%","%cm_rcp_scen_build%",cal_ppf_buildings_dyn36); *** Scale FE demand across industry and building sectors $ifthen.scaleDemand not "%cm_scaleDemand%" == "off" From 906b8a547a345f13789a806811740387d5cedda3 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 15 Apr 2026 17:10:50 +0200 Subject: [PATCH 04/11] remove no longer needed realization conditions --- core/loop.gms | 2 -- .../29_CES_parameters/calibrate/datainput.gms | 34 ++++++++----------- .../29_CES_parameters/calibrate/preloop.gms | 12 +------ 3 files changed, 15 insertions(+), 33 deletions(-) diff --git a/core/loop.gms b/core/loop.gms index 7b2d541658..6d73bd3ec8 100644 --- a/core/loop.gms +++ b/core/loop.gms @@ -20,11 +20,9 @@ option solprint = off; o_modelstat = 100; $ifthen.calibrate "%CES_parameters%" == "calibrate" !! CES_parameters -$ifthen.subsectors "%industry%" == "subsectors" !! industry !! Calibrating industry/subsectors lead to random infeasibilities on the order !! of 1e-15. Relaxing this attribute a little solves this problem. hybrid.tolinfeas = 1e-14; -$endif.subsectors $endif.calibrate ***------------------------------------------------------------------- diff --git a/modules/29_CES_parameters/calibrate/datainput.gms b/modules/29_CES_parameters/calibrate/datainput.gms index bc005cbd2c..de411eaa80 100644 --- a/modules/29_CES_parameters/calibrate/datainput.gms +++ b/modules/29_CES_parameters/calibrate/datainput.gms @@ -216,29 +216,28 @@ pm_cesdata(t,regi,"inco","quantity") = pm_gdp(t,regi); pm_cesdata(t,regi,"lab","quantity") = pm_lab(t,regi); *** Load exogenous FE trajectories for buildings and industry -*** Change EJ to TWa +*** Convert EJ to TWa pm_cesdata(t,regi,in,"quantity")$(pm_fedemandBuild(t,regi,in)) = sm_EJ_2_TWa * pm_fedemandBuild(t,regi,in) + +*** Only convert FEs from EJ to TWa, for UEs keep original units pm_cesdata(t,regi,in,"quantity")$(pm_fedemandInd(t,regi,in)) = -$ifthen.industry_subsectors "%industry%" == "subsectors" - pm_fedemandInd(t,regi,in)$(industry_ue_calibration_target_dyn37(in)) - + - sm_EJ_2_TWa * pm_fedemandInd(t,regi,in)$(NOT industry_ue_calibration_target_dyn37(in)); -$else.industry_subsectors - sm_EJ_2_TWa * pm_fedemandInd(t,regi,in) -$endif.industry_subsectors + pm_fedemandInd(t,regi,in)$(industry_ue_calibration_target_dyn37(in)) + + sm_EJ_2_TWa * pm_fedemandInd(t,regi,in)$(NOT industry_ue_calibration_target_dyn37(in)); *** Load exogenous transport demand - required for the EDGE transport module -$ifthen.edgesm %transport% == "edge_esm" -pm_cesdata(t,regi,in,"quantity") $ p29_trpdemand(t,regi,"%cm_GDPpopScen%","%cm_demScen%","%cm_EDGEtr_scen%", in) +pm_cesdata(t,regi,in,"quantity")$p29_trpdemand(t,regi,"%cm_GDPpopScen%","%cm_demScen%","%cm_EDGEtr_scen%", in) = p29_trpdemand(t,regi,"%cm_GDPpopScen%","%cm_demScen%","%cm_EDGEtr_scen%", in); -$endif.edgesm +*** TODO: rename to p29_trpdemand to p29_fedemandTransp *** Load capital quantities pm_cesdata(t,regi,ppfKap,"quantity") = p29_capitalQuantity(t,regi,ppfKap); -$ifthen.subsectors "%industry%" == "subsectors" + +*** TODO: move to input data generation +*** TODO: unify handling of offset_quantity + *** Assume fehe_otherInd at 0.1% of fega_otherInd for regions with zero *** fehe_otherInd in historic periods (IND, LAM, MEA, SSA) loop ((t_29hist(t),regi_dyn29(regi))$( @@ -276,15 +275,11 @@ loop (pf_quantity_shares_37(in,in2), pm_cesdata(t,regi,in,"offset_quantity") eq 0 ) = -pm_cesdata(t,regi,in,"quantity"); ); -$endif.subsectors + +*** end TODO -$ifthen.build_H2_offset "%buildings%" == "simple" -*** Assuming feh2b minimun levels as 5% of fegab to avoid CES numerical calibration issues and allow more aligned efficiencies between gas and h2 -*loop ((t,regi)$(pm_cesdata(t,regi,"feh2b","quantity") lt (0.05 *pm_cesdata(t,regi,"fegab","quantity"))), -* pm_cesdata(t,regi,"feh2b","offset_quantity") = - (0.05 * pm_cesdata(t,regi,"fegab","quantity") - pm_cesdata(t,regi,"feh2b","quantity")); -* pm_cesdata(t,regi,"feh2b","quantity") = 0.05 * pm_cesdata(t,regi,"fegab","quantity"); -*); +*** TODO: where does this come from? *** RK: feh2b offset scaled from 1% in 2025 to 50% in 2050 of fegab quantity pm_cesdata(t,regi,"feh2b","offset_quantity")$(t.val gt cm_H2InBuildOnlyAfter) = @@ -299,7 +294,6 @@ pm_cesdata(t,regi,"feh2b","quantity")$(t.val gt cm_H2InBuildOnlyAfter) = pm_cesdata(t,regi,"feh2b","quantity")$(t.val le cm_H2InBuildOnlyAfter) = 1e-6; pm_cesdata(t,regi,"feh2b","offset_quantity")$(t.val le cm_H2InBuildOnlyAfter) = - pm_cesdata(t,regi,"feh2b","quantity"); -$endif.build_H2_offset *** Add an epsilon to the values which are 0 so that they can fit in the CES *** function. And withdraw this epsilon when going to the ESM side diff --git a/modules/29_CES_parameters/calibrate/preloop.gms b/modules/29_CES_parameters/calibrate/preloop.gms index b74642df9f..9eb0e335f5 100644 --- a/modules/29_CES_parameters/calibrate/preloop.gms +++ b/modules/29_CES_parameters/calibrate/preloop.gms @@ -312,7 +312,6 @@ Display p29_alpha, p29_beta; *** for entrp_frgt_lo (energy transport - freight transport - long distance) *** pass on to pm_cesdata and ensure the resulting price is positive -$ifthen.edge_esm %transport% == "edge_esm" loop (ttot$( ttot.val ge 2005 AND ttot.val lt 2020 ), pm_cesdata(ttot,regi_dyn29(regi),"entrp_frgt_lo","price") @@ -337,8 +336,6 @@ loop (ttot$( ttot.val ge 2005), display "after entrp_frgt_lo smoothening", pm_cesdata; -$endif.edge_esm - *** for all other modes *** pass on to pm_cesdata and ensure the resulting price is positive loop (ttot$( ttot.val ge 2005 AND ttot.val lt 2020), @@ -399,7 +396,6 @@ if (sm_CES_calibration_iteration eq 1, !! first CES calibration iteration put pm_cesdata(t,regi,in,"quantity") /; ); -$ifthen.subsectors "%industry%" == "subsectors" $ifthen.industry_FE_target "%c_CES_calibration_industry_FE_target%" == "1" loop((t_29scen(t),regi_dyn29(regi),in)$( ppfen_industry_dyn37(in) OR ppfKap_industry_dyn37(in) ), @@ -407,7 +403,6 @@ $ifthen.industry_FE_target "%c_CES_calibration_industry_FE_target%" == "1" put pm_cesdata(t,regi,in,"quantity") /; ); $endif.industry_FE_target -$endif.subsectors putclose file_CES_calibration; ); @@ -723,13 +718,11 @@ if (card(ppf_beyondcalib_29) >= 1, !! if there are any nodes in beyond calib = p29_CESderivative(t,regi,out,in); ); -$ifthen.subsectors "%industry%" == "subsectors" $ifthen.FE_target "%c_CES_calibration_industry_FE_target%" == "1" !! c_CES_calibration_industry_FE_target !! set minimum price on ppf_industry pm_cesdata(t,regi_dyn29(regi),ppf_industry_dyn37(in),"price")$(NOT ue_industry_dyn37(in)) = max(pm_cesdata(t,regi,in,"price"), 1e-5); $endif.FE_target -$endif.subsectors !! smooth historical prices pm_cesdata(t_29hist(t),regi_dyn29(regi),in,"price")$( @@ -915,7 +908,6 @@ loop ((t_29hist_last(t2),regi_dyn29(regi),cesOut2cesIn(out,in))$( ***_____________________________ START OF: BEYOND CALIBRATION PART II ________________________________________ -$ifthen.subsectors "%industry%" == "subsectors" $ifthen.industry_FE_target "%c_CES_calibration_industry_FE_target%" == "1" *** c_CES_calibration_industry_FE_target == 1 means that @@ -1123,7 +1115,7 @@ loop (cesOut2cesIn(in_industry_dyn37(out),in)$( ); ); $endif.industry_FE_target -$endif.subsectors + ***_____________________________ END OF: BEYOND CALIBRATION PART II ________________________________________ @@ -1294,7 +1286,6 @@ loop ((ttot(t),regi_dyn29(regi),industry_ue_calibration_target_dyn37(out))$( ); ); -$ifthen.subsectors "%industry%" == "subsectors" !! subsectors if (sm_tmp eq 1, put logfile, "Assertion of industry energy limits failed: " /; loop ((regi_dyn29(regi),ttot(t),industry_ue_calibration_target_dyn37(out))$( @@ -1318,6 +1309,5 @@ if (sm_tmp eq 1, execute_unload "abort.gdx"; abort "Assertion of industry energy limits failed. See .log file for details."; ); -$endif.subsectors *** EOF ./modules/29_CES_parameters/calibrate/preloop.gms From f2f6c59da0f9b22952a8ec2aaad8b31951390257 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 15 Apr 2026 17:15:22 +0200 Subject: [PATCH 05/11] rename p29_trpdemand to p29_fedemandTransp --- modules/29_CES_parameters/calibrate/datainput.gms | 7 +++---- modules/29_CES_parameters/calibrate/declarations.gms | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/29_CES_parameters/calibrate/datainput.gms b/modules/29_CES_parameters/calibrate/datainput.gms index de411eaa80..34c14be34b 100644 --- a/modules/29_CES_parameters/calibrate/datainput.gms +++ b/modules/29_CES_parameters/calibrate/datainput.gms @@ -144,7 +144,7 @@ ipf_beyond_last(out) = YES; *** End of Sets calculation Parameter -p29_trpdemand "transport demand" +p29_fedemandTransp "transport demand" / $ondelim $include "./modules/29_CES_parameters/calibrate/input/f29_trpdemand.cs4r" @@ -227,10 +227,9 @@ pm_cesdata(t,regi,in,"quantity")$(pm_fedemandInd(t,regi,in)) = + sm_EJ_2_TWa * pm_fedemandInd(t,regi,in)$(NOT industry_ue_calibration_target_dyn37(in)); *** Load exogenous transport demand - required for the EDGE transport module -pm_cesdata(t,regi,in,"quantity")$p29_trpdemand(t,regi,"%cm_GDPpopScen%","%cm_demScen%","%cm_EDGEtr_scen%", in) - = p29_trpdemand(t,regi,"%cm_GDPpopScen%","%cm_demScen%","%cm_EDGEtr_scen%", in); +pm_cesdata(t,regi,in,"quantity")$p29_fedemandTransp(t,regi,"%cm_GDPpopScen%","%cm_demScen%","%cm_EDGEtr_scen%", in) + = p29_fedemandTransp(t,regi,"%cm_GDPpopScen%","%cm_demScen%","%cm_EDGEtr_scen%", in); -*** TODO: rename to p29_trpdemand to p29_fedemandTransp *** Load capital quantities pm_cesdata(t,regi,ppfKap,"quantity") = p29_capitalQuantity(t,regi,ppfKap); diff --git a/modules/29_CES_parameters/calibrate/declarations.gms b/modules/29_CES_parameters/calibrate/declarations.gms index 7620151661..086b720bda 100644 --- a/modules/29_CES_parameters/calibrate/declarations.gms +++ b/modules/29_CES_parameters/calibrate/declarations.gms @@ -18,7 +18,7 @@ Parameters p29_cesdata_load(tall,all_regi,all_in,cesParameter) "pm_cesdata from the gdx file" p29_cesIO_load(tall,all_regi,all_in) "production factor vm_cesIO from input.gdx" p29_effGr(tall,all_regi,all_in) "growth of factor efficiency from input.gdx" - p29_trpdemand(tall,all_regi,all_GDPpopScen,all_demScen,EDGE_scenario_all,all_in) "transport demand for the edge_esm transport module, unit: trillion passenger/ton km" + p29_fedemandTransp(tall,all_regi,all_GDPpopScen,all_demScen,EDGE_scenario_all,all_in) "transport demand for the edge_esm transport module [trillion passenger/ton km"] p29_efficiency_growth(tall,all_regi,all_in) "efficency level paths for ppf beyond calibration" p29_capitalQuantity(tall,all_regi,all_in) "capital quantities" p29_capitalPrice(tall,all_regi) "capital prices" From 5af875c5454d209f0a7bdfd9a9acc6b233cdb31d Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 15 Apr 2026 17:29:17 +0200 Subject: [PATCH 06/11] correct unit documentation --- core/declarations.gms | 4 ++-- modules/04_PE_FE_parameters/iea2014/declarations.gms | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/declarations.gms b/core/declarations.gms index b04c6745ab..3eb8d8d78c 100644 --- a/core/declarations.gms +++ b/core/declarations.gms @@ -298,8 +298,8 @@ p_co2CCSReference(ttot,all_regi,all_enty,all_enty,all_te,rlf) "Captured CO2 put p_prodAllReference(ttot,all_regi,all_te) "Sum of the above in the reference run. As each technology has only one type of output, the differing units should not be a problem" *** CES calibration tarjectories industry and buildings -pm_fedemandInd(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in industry [TWa]" -pm_fedemandBuild(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in buildings [TWa]" +pm_fedemandInd(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in industry [EJ, Gt, $tn]" +pm_fedemandBuild(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in buildings [EJ]" *** parameters for setting final energy shares pm_shfe_up(ttot,all_regi,all_enty,emi_sectors) "Final energy shares exogenous upper bounds per sector [share]" diff --git a/modules/04_PE_FE_parameters/iea2014/declarations.gms b/modules/04_PE_FE_parameters/iea2014/declarations.gms index fc903823eb..8422706070 100644 --- a/modules/04_PE_FE_parameters/iea2014/declarations.gms +++ b/modules/04_PE_FE_parameters/iea2014/declarations.gms @@ -7,7 +7,7 @@ *** SOF ./modules/04_PE_FE_parameters/iea2014/declarations.gms parameter -pm_IO_input(all_regi,all_enty,all_enty,all_te) "Energy input based on IEA data" +pm_IO_input(all_regi,all_enty,all_enty,all_te) "Energy input based on IEA data [TWa]" pm_IO_output(tall,all_regi,all_enty,all_enty,all_te) "Historical energy output per technology based on IEA data [TWa]" p04_IO_output(all_regi,all_enty,all_enty,all_te) "Energy output based on IEA data" p04_x_enty2te_dyn04(all_regi,all_enty,all_enty,all_te,all_te) "parameter for the allocation of energy flow to technologies" From 4375c2cde2abb144c0ff5238f510464a765e47e0 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Thu, 16 Apr 2026 12:34:19 +0200 Subject: [PATCH 07/11] add comments --- core/datainput.gms | 2 +- core/declarations.gms | 2 +- modules/29_CES_parameters/calibrate/datainput.gms | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/datainput.gms b/core/datainput.gms index 65a293e2bf..9b4a12ab25 100644 --- a/core/datainput.gms +++ b/core/datainput.gms @@ -1647,7 +1647,7 @@ $offdelim pm_fedemandInd(t,regi,in) = f_fedemandInd(t,regi,"%cm_demScen%",in); *** data input for industry FE that is no part of the CES tree -*** needed for process-based steel implementation +*** needed for process-based steel implementation, where these items are not part of "in" pm_fedemandInd(t,regi,ppfen_no_ces_use) = f_fedemandInd(t,regi,"%cm_demScen%",ppfen_no_ces_use); *** RCP-dependent demands in buildings (climate impact) diff --git a/core/declarations.gms b/core/declarations.gms index 3eb8d8d78c..72807914c4 100644 --- a/core/declarations.gms +++ b/core/declarations.gms @@ -298,7 +298,7 @@ p_co2CCSReference(ttot,all_regi,all_enty,all_enty,all_te,rlf) "Captured CO2 put p_prodAllReference(ttot,all_regi,all_te) "Sum of the above in the reference run. As each technology has only one type of output, the differing units should not be a problem" *** CES calibration tarjectories industry and buildings -pm_fedemandInd(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in industry [EJ, Gt, $tn]" +pm_fedemandInd(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in industry [EJ, ue_primary_steel, ue_secondary_steel: Gt, ue_otherInd: $tn]" pm_fedemandBuild(tall,all_regi,all_in) "read-in parameter for final energy and production trajectories used for the CES parameter calibration in buildings [EJ]" *** parameters for setting final energy shares diff --git a/modules/29_CES_parameters/calibrate/datainput.gms b/modules/29_CES_parameters/calibrate/datainput.gms index 34c14be34b..d310f803e5 100644 --- a/modules/29_CES_parameters/calibrate/datainput.gms +++ b/modules/29_CES_parameters/calibrate/datainput.gms @@ -235,7 +235,7 @@ pm_cesdata(t,regi,ppfKap,"quantity") = p29_capitalQuantity(t,regi,ppfKap); *** TODO: move to input data generation -*** TODO: unify handling of offset_quantity +*** TODO: unify handling of offset_quantity accross all sectors? *** Assume fehe_otherInd at 0.1% of fega_otherInd for regions with zero *** fehe_otherInd in historic periods (IND, LAM, MEA, SSA) @@ -275,10 +275,7 @@ loop (pf_quantity_shares_37(in,in2), = -pm_cesdata(t,regi,in,"quantity"); ); -*** end TODO - -*** TODO: where does this come from? *** RK: feh2b offset scaled from 1% in 2025 to 50% in 2050 of fegab quantity pm_cesdata(t,regi,"feh2b","offset_quantity")$(t.val gt cm_H2InBuildOnlyAfter) = @@ -289,6 +286,10 @@ pm_cesdata(t,regi,"feh2b","quantity")$(t.val gt cm_H2InBuildOnlyAfter) = (0.05 + 0.45 * min(1, max(0, (t.val - 2025) / (2050 - 2025)))) * pm_cesdata(t,regi,"fegab","quantity"); + +*** end TODO + + *** for the years that H2 buildings is fixed to zero, set offset to the exact value of the calibrated quantity to ignore it after calibration pm_cesdata(t,regi,"feh2b","quantity")$(t.val le cm_H2InBuildOnlyAfter) = 1e-6; pm_cesdata(t,regi,"feh2b","offset_quantity")$(t.val le cm_H2InBuildOnlyAfter) = - pm_cesdata(t,regi,"feh2b","quantity"); From 044089d2684e2c7c8fd030bd7012fb93ee33d8ba Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Thu, 7 May 2026 14:40:02 +0200 Subject: [PATCH 08/11] fix typo --- .../calibrate/declarations.gms | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/29_CES_parameters/calibrate/declarations.gms b/modules/29_CES_parameters/calibrate/declarations.gms index 086b720bda..b6609db80e 100644 --- a/modules/29_CES_parameters/calibrate/declarations.gms +++ b/modules/29_CES_parameters/calibrate/declarations.gms @@ -13,23 +13,23 @@ Scalars Parameters p29_CESderivative(tall,all_regi,all_in,all_in) "derivative of the CES function for calculating prices" - p29_alpha(all_regi,all_in) "XXX" - p29_beta(all_regi,all_in) "XXX" + p29_alpha(all_regi,all_in) "XXX" + p29_beta(all_regi,all_in) "XXX" p29_cesdata_load(tall,all_regi,all_in,cesParameter) "pm_cesdata from the gdx file" - p29_cesIO_load(tall,all_regi,all_in) "production factor vm_cesIO from input.gdx" - p29_effGr(tall,all_regi,all_in) "growth of factor efficiency from input.gdx" - p29_fedemandTransp(tall,all_regi,all_GDPpopScen,all_demScen,EDGE_scenario_all,all_in) "transport demand for the edge_esm transport module [trillion passenger/ton km"] - p29_efficiency_growth(tall,all_regi,all_in) "efficency level paths for ppf beyond calibration" + p29_cesIO_load(tall,all_regi,all_in) "production factor vm_cesIO from input.gdx" + p29_effGr(tall,all_regi,all_in) "growth of factor efficiency from input.gdx" + p29_fedemandTransp(tall,all_regi,all_GDPpopScen,all_demScen,EDGE_scenario_all,all_in) "transport demand for the edge_esm transport module [trillion passenger/ton km]" + p29_efficiency_growth(tall,all_regi,all_in) "efficency level paths for ppf beyond calibration" p29_capitalQuantity(tall,all_regi,all_in) "capital quantities" - p29_capitalPrice(tall,all_regi) "capital prices" + p29_capitalPrice(tall,all_regi) "capital prices" - p29_test_CES_recursive(tall,all_regi,all_in) "test the technological consistency of pm_cesdata" + p29_test_CES_recursive(tall,all_regi,all_in) "test the technological consistency of pm_cesdata" - p29_esubGrowth "long term growth of the elasticity of substitution" + p29_esubGrowth "long term growth of the elasticity of substitution" - p29_t_tmp(tall) "tmp value for calculations over t" + p29_t_tmp(tall) "tmp value for calculations over t" - p29_share_H2HTH_traj_indst(ttot,all_regi,all_in) "H2 and electricity HTH baseline trajectories as share of gas (for H2) and low-temperature electricity (for HTH electricity) trajectories in industry" + p29_share_H2HTH_traj_indst(ttot,all_regi,all_in) "H2 and electricity HTH baseline trajectories as share of gas (for H2) and low-temperature electricity (for HTH electricity) trajectories in industry" ; *** Load calibration iteration number from environment variable From e234a92f52147c17493db80fa0414fbbf3f83b4e Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Thu, 7 May 2026 14:53:18 +0200 Subject: [PATCH 09/11] fix typo --- modules/29_CES_parameters/calibrate/datainput.gms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/29_CES_parameters/calibrate/datainput.gms b/modules/29_CES_parameters/calibrate/datainput.gms index d310f803e5..b2dfdcbfad 100644 --- a/modules/29_CES_parameters/calibrate/datainput.gms +++ b/modules/29_CES_parameters/calibrate/datainput.gms @@ -218,7 +218,7 @@ pm_cesdata(t,regi,"lab","quantity") = pm_lab(t,regi); *** Load exogenous FE trajectories for buildings and industry *** Convert EJ to TWa -pm_cesdata(t,regi,in,"quantity")$(pm_fedemandBuild(t,regi,in)) = sm_EJ_2_TWa * pm_fedemandBuild(t,regi,in) +pm_cesdata(t,regi,in,"quantity")$(pm_fedemandBuild(t,regi,in)) = sm_EJ_2_TWa * pm_fedemandBuild(t,regi,in); *** Only convert FEs from EJ to TWa, for UEs keep original units From ec47823e9d9eabee09697dc311ef874ba592024f Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 20 May 2026 10:22:22 +0200 Subject: [PATCH 10/11] update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfc6ca62e0..c66a0f08a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). [[#2332](https://github.com/remindmodel/remind/pull/2332)] - **scripts** Use `quitte::write.gdx` in `climateAssessmentInterimRun.R` to dump climate assessment results to gdx [[#2334](https://github.com/remindmodel/remind/pull/2334)] +- **inputdata** Split final energy demands into buildings and industry specific parameters + [[#2329](https://github.com/remindmodel/remind/pull/2329/)] ### added - From 88d17a5ca59bfbd74096938d58146cfcfabf2336 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Mon, 1 Jun 2026 08:28:34 +0200 Subject: [PATCH 11/11] rename files and increment input data version --- config/default.cfg | 2 +- core/datainput.gms | 4 ++-- core/input/files | 4 ++-- tutorials/12_Calibrating_CES_Parameters.md | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/default.cfg b/config/default.cfg index 9e407e6216..5ea3737970 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -28,7 +28,7 @@ cfg$regionmapping <- "config/regionmappingH12.csv" cfg$extramappings_historic <- "" #### Current input data revision (.) #### -cfg$inputRevision <- "7.90fedem" +cfg$inputRevision <- "7.95" #### Current CES parameter and GDX revision (commit hash) #### cfg$CESandGDXversion <- "dec24b712ce59db95bb4385ba71ec9a4cd921041" diff --git a/core/datainput.gms b/core/datainput.gms index 14a4807a1e..c58f2ec223 100644 --- a/core/datainput.gms +++ b/core/datainput.gms @@ -1640,7 +1640,7 @@ Parameter f_fedemandInd(tall,all_regi,all_demScen,all_in) "final energy demand in industry" / $ondelim -$include "./core/input/f_fedemand_ind.cs4r" +$include "./core/input/f_fedemandInd.cs4r" $offdelim /; @@ -1654,7 +1654,7 @@ Parameter f_fedemandBuild(tall,all_regi,all_demScen,all_rcp_scen,all_in) "RCP-dependent final energy demand in buildings" / $ondelim -$include "./core/input/f_fedemand_build.cs4r" +$include "./core/input/f_fedemandBuild.cs4r" $offdelim /; diff --git a/core/input/files b/core/input/files index bb24581746..7afb3656b3 100644 --- a/core/input/files +++ b/core/input/files @@ -40,8 +40,8 @@ p_boundCapCCS.cs4r p_CapacityBounds.cs4r p_boundCapBiochar.cs4r f_geoStorPot.cs3r -f_fedemand_build.cs4r -f_fedemand_ind.cs4r +f_fedemandBuild.cs4r +f_fedemandInd.cs4r pm_NuclearConstraint.cs4r pm_risk_premium.cs4r pm_shPPPMER.cs4r diff --git a/tutorials/12_Calibrating_CES_Parameters.md b/tutorials/12_Calibrating_CES_Parameters.md index 1e4105a91a..379c5f2e90 100644 --- a/tutorials/12_Calibrating_CES_Parameters.md +++ b/tutorials/12_Calibrating_CES_Parameters.md @@ -76,8 +76,8 @@ For the calibration process to work, we need both: - `./core/input/f_gdp.cs3r` - `./core/input/f_pop.cs3r` - `./modules/29_CES_parameters/calibrate/input/f29_capitalQuantity.cs4r` - - `./core/input/f_fedemand_build.cs4r` - - `./core/input/f_fedemand_ind.cs4r` + - `./core/input/f_fedemandBuild.cs4r` + - `./core/input/f_fedemandInd.cs4r` 2. Prices of `ppf` at the previous iteration. They are calculated using the `input.gdx` provided to the calibration run. User intervention is only required when prices cannot be derived from the `.gdx` @@ -216,7 +216,7 @@ observed problems and suggested solutions. is missing entirely. Otherwise, check the input files (`./core/input/f_gdp.cs3r`, `./core/input/f_pop.cs3r`, `./modules/29_CES_parameters/calibrate/input/f29_capitalQuantity.cs4r`, - `./core/input/f_fedemand_build.cs4r` and `./core/input/f_fedemand_ind.cs4r`) to + `./core/input/f_fedemandBuild.cs4r` and `./core/input/f_fedemandInd.cs4r`) to figure out which data is missing and fix it. #### $\xi \lt 0$