-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev/feedstocks review #6
Changes from all commits
6086222
4c646c6
3b4dda1
d787eb6
82081ae
8c7f07c
576be8b
8833a78
f093da3
b6da625
374064e
3c8d6ef
c20ec68
f701461
6d27211
cf5e671
d5c0d05
c5fa360
2baede0
f5698a2
f5b9a66
fd19be3
eaee352
0269115
eafe50c
d7dba4d
f7786ef
1bed621
fe3617c
3518dbb
aeb68e9
2d23164
637280e
76598cd
8ad444d
0b5d50c
cfb93d4
dfd92b0
39296c3
2722c76
6d426a8
ace0c5a
b3dc515
66713eb
a6819d4
a17adfa
c7acd43
fe1df9e
39b0d27
a4fc992
ab3813c
a24287c
8b6a7aa
9aa92ef
9019040
3573494
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1461,6 +1461,40 @@ pm_emifac(ttot,regi,"seliqfos","fehos","tdfoshos","co2") = p_ef_dem(regi,"fehos" | |
pm_emifac(ttot,regi,"seliqfos","fepet","tdfospet","co2") = p_ef_dem(regi,"fepet") / (sm_c_2_co2*1000*sm_EJ_2_TWa); !! GtC/TWa | ||
pm_emifac(ttot,regi,"seliqfos","fedie","tdfosdie","co2") = p_ef_dem(regi,"fedie") / (sm_c_2_co2*1000*sm_EJ_2_TWa); !! GtC/TWa | ||
|
||
***------ Read in emission factors for process emissions in chemicals sector--- | ||
*' calculated using IEA data on feedstocks flows and UNFCCC data on chem sector process emissions | ||
***TO DO: remove the "*" by modif the input file (fegas instead of gases, etc.) | ||
*** "non-energy emission factors [GtC per ZJ]" | ||
parameter f_nechem_emissionFactors(ttot,all_regi,*) | ||
/ | ||
$ondelim | ||
$include "./core/input/f_nechem_emissionFactors.cs4r" | ||
$offdelim | ||
/ | ||
; | ||
|
||
pm_emifacNonEnergy(ttot,regi,'segafos','fegas','indst','co2') = f_nechem_emissionFactors(ttot,regi,"gases") / s_zj_2_twa; | ||
pm_emifacNonEnergy(ttot,regi,'seliqfos','fehos','indst','co2') = f_nechem_emissionFactors(ttot,regi,"liquids") / s_zj_2_twa; | ||
pm_emifacNonEnergy(ttot,regi,'sesofos','fesos','indst','co2') = f_nechem_emissionFactors(ttot,regi,"solids") / s_zj_2_twa; | ||
|
||
pm_emifacNonEnergy(ttot,regi,'segabio','fegas','indst','co2') = f_nechem_emissionFactors(ttot,regi,"gases") / s_zj_2_twa; | ||
pm_emifacNonEnergy(ttot,regi,'seliqbio','fehos','indst','co2') = f_nechem_emissionFactors(ttot,regi,"liquids") / s_zj_2_twa; | ||
pm_emifacNonEnergy(ttot,regi,'sesobio','fesos','indst','co2') = f_nechem_emissionFactors(ttot,regi,"solids") / s_zj_2_twa; | ||
|
||
pm_emifacNonEnergy(ttot,regi,'segasyn','fegas','indst','co2') = f_nechem_emissionFactors(ttot,regi,"gases") / s_zj_2_twa; | ||
pm_emifacNonEnergy(ttot,regi,'seliqsyn','fehos','indst','co2') = f_nechem_emissionFactors(ttot,regi,"liquids") / s_zj_2_twa; | ||
Comment on lines
+1476
to
+1485
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use double quotes, as per coding style. |
||
|
||
***------ Read in projections for incineration rates of plastic waste--- | ||
*** "incineration rates [fraction]" | ||
parameter f_incinerationShares(ttot,all_regi) "incineration rate of plastic waste" | ||
/ | ||
$ondelim | ||
$include "./core/input/f_incinerationShares.cs4r" | ||
$offdelim | ||
/ | ||
; | ||
pm_incinerationRate(ttot,all_regi)=f_incinerationShares(ttot,all_regi); | ||
|
||
*** some balances are not matching by small amounts; | ||
*** the differences are cancelled out here!!! | ||
pm_cesdata(ttot,regi,in,"offset_quantity")$(ttot.val ge 2005) = 0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,11 +122,16 @@ p_extRegiccsinjecrateRegi(ext_regi) "Regional CCS inject | |
pm_dataeta(tall,all_regi,all_te) "regional eta data" | ||
p_emi_quan_conv_ar4(all_enty) "conversion factor for various gases to GtCeq" | ||
pm_emifac(tall,all_regi,all_enty,all_enty,all_te,all_enty) "emission factor by technology for all types of emissions in emiTe" | ||
pm_emifacNonEnergy(ttot,all_regi,all_enty,all_enty,emi_sectors,all_enty) "emission factor for non-energy fedstocks. For now only for Chemicals Industry [GtC per TWa]" | ||
pm_incinerationRate(ttot,all_regi) "share of plastic waste that gets incinerated [fraction]" | ||
pm_omeg (all_regi,opTimeYr,all_te) "technical depreciation parameter, gives the share of a capacity that is still usable after tlt. [none/share, value between 0 and 1]" | ||
p_aux_lifetime(all_regi,all_te) "auxiliary parameter for calculating life times, calculated externally in excel sheet" | ||
pm_pedem_res(ttot,all_regi,all_te) "Demand for pebiolc residues, needed for enhancement of residue potential [TWa]" | ||
p_ef_dem(all_regi,all_enty) "Demand side emission factor of final energy carriers [MtCO2/EJ]" | ||
|
||
*** share of plastic waste that is incinerated REDUNDANT; DELETE ME | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tip: use one marker comment (like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ouch, yeah |
||
pm_incinerationShares(ttot,all_regi) "Share of plastic waste that gets incinerated [fraction]" | ||
|
||
pm_secBioShare(ttot,all_regi,all_enty,emi_sectors) "share of biomass per carrier for each sector" | ||
|
||
p_avCapFac2015(all_regi,all_te) "average capacity factor of non-bio renewables in 2015 in REMIND" | ||
|
@@ -389,6 +394,7 @@ vm_prodPe(ttot,all_regi,all_enty) "pe production. [TWa, Urani | |
vm_demSe(ttot,all_regi,all_enty,all_enty,all_te) "se demand. [TWa]" | ||
vm_prodSe(tall,all_regi,all_enty,all_enty,all_te) "se production. [TWa]" | ||
vm_prodFe(ttot,all_regi,all_enty,all_enty,all_te) "fe production. [TWa]" | ||
vm_demFENonEnergySector(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "energy flows of non-energy feedstocks [TWa]" | ||
vm_demFeSector(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "fe demand per sector and emission market. Taxes should be applied to this variable or variables closer to the supply side whenever possible so the marginal prices include the tax effects. [TWa]" | ||
vm_demFeSector_afterTax(ttot,all_regi,all_enty,all_enty,emi_sectors,all_emiMkt) "fe demand per sector and emission market after tax. Demand sectors should use this variable in their fe balance equations so demand side marginals include taxes effects. [TWa]" | ||
v_costFu(ttot,all_regi) "fuel costs" | ||
|
@@ -421,6 +427,12 @@ v_shGasLiq_fe(ttot,all_regi,emi_sectors) "share of gases and liquids | |
|
||
vm_emiCdrAll(ttot,all_regi) "all CDR emissions" | ||
|
||
vm_FeedstocksCarbon(ttot,all_regi,all_enty,all_enty,all_emiMkt) "carbon contained in chemical feedstocks [GtC]" | ||
vm_plasticsCarbon(ttot,all_regi,all_enty,all_enty,all_emiMkt) "carbon contained in plastics [GtC]" | ||
vm_feedstockEmiUnknownFate(ttot,all_regi,all_enty,all_enty,all_emiMkt) "carbon contained in plastics with unknown fate (assumed to go back into the atmosphere) [GtC]" | ||
vm_incinerationEmi(ttot,all_regi,all_enty,all_enty,all_emiMkt) "Emissions from incineration of plastic waste [GtC]" | ||
vm_nonIncineratedPlastics(ttot,all_regi,all_enty,all_enty,all_emiMkt) "carbon contained in plastics that are not incinerated [GtC]" | ||
Comment on lines
+430
to
+434
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could use a little more rigour in the naming and describing. Five variables, that are all defined over the same sets -- notably And it is not apparent what the different fates of plastics are. They can be incinerated, they can not be incinerated (that is landfilled?), and is there something else happening to them (unknown). or is there some part of plastics for which we do not know what happens to them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ups yeah, one description is wrong. I'll extend them so it's more clear |
||
|
||
v_changeProdStartyearAdj(ttot,all_regi,all_te) "Absolute effect size of changing output with respect to the reference run for each te" | ||
vm_changeProdStartyearCost(ttot,all_regi,all_te) "Costs for changing output with respect to the reference run for each te" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -511,26 +511,33 @@ q_emiTe(t,regi,emiTe(enty)).. | |
*' from secondary to final energy transformation (some air pollutants), or | ||
*' transformations within the chain of CCS steps (Leakage). | ||
***----------------------------------------------------------------------------- | ||
|
||
q_emiTeDetailMkt(t,regi,enty,enty2,te,enty3,emiMkt)$(emi2te(enty,enty2,te,enty3) OR (pe2se(enty,enty2,te) AND sameas(enty3,"cco2")) ) .. | ||
q_emiTeDetailMkt(t,regi,enty,enty2,te,enty3,emiMkt)$( | ||
emi2te(enty,enty2,te,enty3) | ||
OR (pe2se(enty,enty2,te) AND sameas(enty3,"cco2")) ) .. | ||
vm_emiTeDetailMkt(t,regi,enty,enty2,te,enty3,emiMkt) | ||
=e= | ||
sum(emi2te(enty,enty2,te,enty3), | ||
( | ||
sum(pe2se(enty,enty2,te), | ||
pm_emifac(t,regi,enty,enty2,te,enty3) | ||
* vm_demPE(t,regi,enty,enty2,te) | ||
) | ||
+ sum((ccs2Leak(enty,enty2,te,enty3),teCCS2rlf(te,rlf)), | ||
pm_emifac(t,regi,enty,enty2,te,enty3) | ||
* vm_co2CCS(t,regi,enty,enty2,te,rlf) | ||
) | ||
)$(sameas(emiMkt,"ETS")) | ||
+ sum(se2fe(enty,enty2,te), | ||
( sum(pe2se(enty,enty2,te), | ||
pm_emifac(t,regi,enty,enty2,te,enty3) | ||
* sum(sector$(entyFe2Sector(enty2,sector) AND sector2emiMkt(sector,emiMkt)), vm_demFeSector(t,regi,enty,enty2,sector,emiMkt)) | ||
) | ||
) | ||
* vm_demPE(t,regi,enty,enty2,te) | ||
) | ||
+ sum((ccs2Leak(enty,enty2,te,enty3),teCCS2rlf(te,rlf)), | ||
pm_emifac(t,regi,enty,enty2,te,enty3) | ||
* vm_co2CCS(t,regi,enty,enty2,te,rlf) | ||
) | ||
)$( sameas(emiMkt,"ETS") ) | ||
+ sum(se2fe(enty,enty2,te), | ||
pm_emifac(t,regi,enty,enty2,te,enty3) | ||
* sum(sector$( entyFe2Sector(enty2,sector) | ||
AND sector2emiMkt(sector,emiMkt) ), | ||
vm_demFeSector(t,regi,enty,enty2,sector,emiMkt) | ||
!! substract FE used for non-energy purposes (as feedstocks) so it does | ||
!! not create energy-related emissions | ||
- sum(entyFe2sector2emiMkt_NonEn(enty2,sector,emiMkt), | ||
vm_demFENonEnergySector(t,regi,enty,enty2,sector,emiMkt)) | ||
) | ||
) | ||
) | ||
; | ||
|
||
***-------------------------------------------------- | ||
|
@@ -558,44 +565,76 @@ q_emiEnFuelEx(t,regi,emiTe(enty)).. | |
***-------------------------------------------------- | ||
*' Total energy-emissions per emission market, region and timestep | ||
***-------------------------------------------------- | ||
q_emiTeMkt(t,regi,emiTe(enty),emiMkt).. | ||
q_emiTeMkt(t,regi,emiTe(enty),emiMkt) .. | ||
vm_emiTeMkt(t,regi,enty,emiMkt) | ||
=e= | ||
*** emissions from fuel combustion | ||
!! emissions from fuel combustion | ||
sum(emi2te(enty2,enty3,te,enty), | ||
vm_emiTeDetailMkt(t,regi,enty2,enty3,te,enty,emiMkt) | ||
) | ||
*** energy emissions fuel extraction | ||
+ v_emiEnFuelEx(t,regi,enty)$(sameas(emiMkt,"ETS")) | ||
*** Industry CCS emissions | ||
- ( sum(emiMac2mac(emiInd37_fuel,enty2), | ||
vm_emiIndCCS(t,regi,emiInd37_fuel) | ||
)$( sameas(enty,"co2") ) | ||
)$(sameas(emiMkt,"ETS")) | ||
*** LP, Valve from cco2 capture step, to mangage if capture capacity and CCU/CCS capacity don't have the same lifetime | ||
+ ( v_co2capturevalve(t,regi)$( sameas(enty,"co2") ) )$(sameas(emiMkt,"ETS")) | ||
*** JS CO2 from short-term CCU (short term CCU co2 is emitted again in a time period shorter than 5 years) | ||
!! energy emissions fuel extraction | ||
+ v_emiEnFuelEx(t,regi,enty)$(sameas(emiMkt,"ETS")) | ||
!! Industry CCS emissions | ||
- ( sum(emiMac2mac(emiInd37_fuel,enty2), | ||
vm_emiIndCCS(t,regi,emiInd37_fuel) | ||
)$( sameas(enty,"co2") ) | ||
)$(sameas(emiMkt,"ETS") ) | ||
!! substract carbon from biogenic or synthetic origin contained in | ||
!! plastics that don't get incinerated ("plastic removals") | ||
- sum(entyFe2sector2emiMkt_NonEn(entyFe,"indst",emiMkt), | ||
sum(se2fe(entySe,entyFe,te)$( entySeBio(entySe) OR entySeSyn(entySe) ), | ||
vm_nonIncineratedPlastics(t,regi,entySe,entyFe,emiMkt) | ||
) | ||
)$( sameas(enty,"co2") ) | ||
!! add emissions from plastics incineration. CHECK FOR DOUBLE-COUNTING RISK | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another instance where |
||
+ sum(entyFe2sector2emiMkt_NonEn(entyFe,"indst",emiMkt), | ||
sum(se2fe(entySe,entyFe,te), | ||
vm_incinerationEmi(t,regi,entySe,entyFe,emiMkt) | ||
) | ||
)$( sameas(enty,"co2") ) | ||
!! add emissions from chemical feedstock with unknown fate | ||
+ sum(entyFe2sector2emiMkt_NonEn(entyFe,"indst",emiMkt), | ||
sum(se2fe(entySe,entyFe,te), | ||
vm_feedstockEmiUnknownFate(t,regi,entySe,entyFe,emiMkt) | ||
) | ||
)$( sameas(enty,"co2") ) | ||
!! Valve from cco2 capture step, to mangage if capture capacity and CCU/CCS | ||
!! capacity don't have the same lifetime | ||
+ v_co2capturevalve(t,regi)$( sameas(enty,"co2") AND sameas(emiMkt,"ETS") ) | ||
!! CO2 from short-term CCU (short term CCU co2 is emitted again in a time | ||
!! period shorter than 5 years) | ||
+ sum(teCCU2rlf(te2,rlf), | ||
vm_co2CCUshort(t,regi,"cco2","ccuco2short",te2,rlf)$( sameas(enty,"co2") ) | ||
)$(sameas(emiMkt,"ETS")) | ||
vm_co2CCUshort(t,regi,"cco2","ccuco2short",te2,rlf)$( sameas(enty,"co2") ) | ||
)$(sameas(emiMkt,"ETS")) | ||
; | ||
|
||
***-------------------------------------------------- | ||
*' Total emissions | ||
***-------------------------------------------------- | ||
q_emiAllMkt(t,regi,emi,emiMkt).. | ||
q_emiAllMkt(t,regi,emi,emiMkt) .. | ||
vm_emiAllMkt(t,regi,emi,emiMkt) | ||
=e= | ||
vm_emiTeMkt(t,regi,emi,emiMkt) | ||
*** Non-energy sector emissions. Note: These are emissions from all MAC curves. | ||
*** So, this includes fugitive emissions, which are sometimes also subsumed under the term energy emissions. | ||
+ sum(emiMacSector2emiMac(emiMacSector,emiMac(emi))$macSector2emiMkt(emiMacSector,emiMkt), | ||
vm_emiMacSector(t,regi,emiMacSector) | ||
) | ||
*** CDR from CDR module | ||
+ vm_emiCdr(t,regi,emi)$(sameas(emi,"co2") AND sameas(emiMkt,"ETS")) | ||
*** Exogenous emissions | ||
+ pm_emiExog(t,regi,emi)$(sameas(emiMkt,"other")) | ||
=e= | ||
vm_emiTeMkt(t,regi,emi,emiMkt) | ||
!! Non-energy sector emissions. Note: These are emissions from all MAC | ||
!! curves. So, this includes fugitive emissions, which are sometimes also | ||
!! subsumed under the term energy emissions. | ||
+ sum((emiMacSector2emiMac(emiMacSector,emiMac(emi)), | ||
macSector2emiMkt(emiMacSector,emiMkt)), | ||
vm_emiMacSector(t,regi,emiMacSector) | ||
) | ||
!! CDR from CDR module | ||
+ vm_emiCdr(t,regi,emi)$( sameas(emi,"co2") AND sameas(emiMkt,"ETS") ) | ||
!! Exogenous emissions | ||
+ pm_emiExog(t,regi,emi)$( sameas(emiMkt,"other") ) | ||
!! non energy emi from chem sector (process emissions from feedstocks): | ||
+ sum((entyFe2sector2emiMkt_NonEn(entyFe,sector,emiMkt), | ||
se2fe(entySe,entyFe,te)), | ||
vm_demFENonEnergySector(t,regi,entySe,entyFe,sector,emiMkt) | ||
* pm_emifacNonEnergy(t,regi,entySe,entyFe,sector,emi) | ||
) | ||
!!emissions from plastics incineration | ||
|
||
!!emissions from chemical feedstock with unknown fate (assumed to go into the atmosphere) | ||
; | ||
|
||
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you change this file intentionally, or was that some merging error? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. merging error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly is going to be removed? What stays?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to remove the
*
here:parameter f_nechem_emissionFactors(ttot,all_regi,*)
because I don't know if using that trick is proper coding for us. This means introducing some changes in data preparation inmrremind
that I was postponing for the final cleaning before merging. Or can I just leave it like that?