-
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
Conversation
…mfHxcvx5J7JoaOhFSs5mncnisTJJ6q/remind into feedstocks-emissions
…unting in chemicals subsector
…n/remind-1 into feedstocks-emissions
…tions to the relevant FE carriers, sectors, markets
…gy and chemical process emissions, only temporary purpose
fix subsetting sums of feedstocks implementation to only apply equation to relevant FE carriers, sectors, markets
…ic fuels in industry feedstocks
remove feedstock carbon from capture potential and fix declaration of pm_emifacNonEnergy
…l carbon stored in feedstocks from energy emissions as this generates negative emissions
…that feedstocks in v_demFeNonEnergySector need to be supplied by the energy system, that is, need to be part of vm_demFeSector
…tion of feedstocks, can be deleted once everything checked
- constraint that all feedstocks should be fossil in baseline - add penalty cost to avoid switching between biogenic and synthetic feedstocks between time steps (small fuel switching cost) - subtracting non-fossil (biogenic and synthetic) feedstocks carbon from energy emissions (new form of CDR! -> please discuss with Jess and others!) - correct FE2CES industry demand equation for feedstocks; this forces the model to actuallly supply the amount of biogenic, synthetic, fossil liquids etc. in vm_demFeSector that is used by vm_demFENonEnergySector. Before it was possible that there was, for instance, more bioliquids in vm_demFENonEnergySector than was in the total vm_demFeSector for indst. Eventually I think this should be refactored such that we define indst and indst_feed as two different sectors and only go with one variable, vm_demFeSector and have two different FE2CES balance equations one for indst and one for indst_feed. The current solution is cumbersome but functional. - I added some further parameters in postsolve in industry to check whether the things I was subtracting/adding to various equations actually have the values I wanted them to have. This is just to check whether everything works and can be deleted later on
…remind-1 into feedstocks-updated
…to feedstocks-updated
changes, remove last.dump.rda file
…tor. And clean code
…ict demFENonEnergySector definition to ETS
…feedstocks-updated
…oaOhFSs5mncnisTJJ6q/remind into michaja-feedstocks-updated and fix sefe() mapping
…lve conflicts, and fix sefe() mapping
@@ -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.) |
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 in mrremind
that I was postponing for the final cleaning before merging. Or can I just leave it like that?
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; |
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.
Use double quotes, as per coding style.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Tip: use one marker comment (like FIXME
or TODO
) and describe what to change. You have at least DELETE ME
and TO DO
. Good luck remembering and finding all of them.
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.
ouch, yeah
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]" |
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.
This could use a little more rigour in the naming and describing. Five variables, that are all defined over the same sets -- notably all_emiMkt
, so they all look like emissions.
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 comment
The 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
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Another instance where FIXME
would have been safer.
v02_NegInconvPenNonEnSwitch.l(t,regi,entySe,entyFe,sector,emiMkt) | ||
+ v02_NegInconvPenNonEnSwitch.l(t,regi,entySe,entyFe,sector,emiMkt) |
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.
As above: why is this two times the negative variable, not positive and negative?
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'm running tests now to investigate the effect of fixing this mistake
v02_NegInconvPenNonEnSwitch.l(t,regi,entySe,entyFe,sector,emiMkt) | ||
+ v02_NegInconvPenNonEnSwitch.l(t,regi,entySe,entyFe,sector,emiMkt) | ||
) | ||
/ 1e3 |
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.
Again, where does the magic number come from?
@@ -198,6 +198,13 @@ $endif.process_based_steel | |||
feh2_otherInd, fehe_otherInd, feelhth_otherInd) | |||
/ | |||
|
|||
in_chemicals_37(all_in) "chemicals FE that can provide feedstocks" |
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.
A more descriptive name would be welcome. Somebody sometime will mistake this for all the production factors in the chemicals subsector.
/ | ||
fesos | ||
fehos | ||
fegas | ||
/ | ||
|
||
entySE_emiFac_feedstocks(all_enty,all_enty) "SE type of emissions factor that should be used to calculate carbon contained in feedstocks" |
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.
Appears to be unused.
*** carriers, no biofuels or synfuels | ||
q37_FossilFeedstock_Base(t,regi,entyFE,emiMkt)$( | ||
entyFE2sector2emiMkt_NonEn(entyFE,"indst",emiMkt) | ||
AND cm_emiscen eq 1 ) .. |
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.
Not sure if that is (still) sufficient, ince we more or less replaced baseline by NPi.
Should this be the case for NPi runs, too?
See remindmodel#1342.
Reworked `checkClimatePercentiles.R`
Purpose of this PR
Type of change
(Make sure to delete from the Type-of-change list the items not relevant to your PR)
Checklist:
remind2
where it was neededforbiddenColumnNames
in readCheckScenarioConfig.R in case the PR leads to deprecated switchesFAIL 0
in the output ofmake test
)Further information (optional):