singularity-energy / open-grid-emissions

Tools for producing high-quality hourly generation and emissions data for U.S. electric grids
MIT License
67 stars 4 forks source link

Fallback behavior for so2 calculations when boiler firing type not available #178

Open grgmiller opened 1 year ago

grgmiller commented 1 year ago

@grgmiller on a related note, would it be possible to have a fallback behavior for SO2 calculations when boiler information isn't available?

Is the issue that the pipeline is unable to map a boiler_id to a unit, or that an SO2 emission factor is not available for a specific fuel/firing type/prime mover combination? If it is the latter, the intent is that we could use the warning message to identify and add emission factors manually as needed, with the hope that over time we identify all possible combinations. If this is the latter, if you can share the error message of the boiler types that are missing factors, I can work on adding these.

Sorry,I should have been more specific!

Before 2013, the 6_2_EnviroEquip_Y[YEAR].xlsx is missing, which causes calculate_so2_from_fuel_consumption -> calculate_generator_so2_ef_per_unit_from_boiler_type -> load_boiler_firing_type(year) -> load_boiler_design_parameters_eia860 to fail. As a result, SO2 emissions can't be calculated using firing type information, although the fuel type (and maybe prime mover?) should still be available.

I was thinking that we could use some kind of average emission factor for each fuel type + prime mover combination as the fallback for pre-2013 years? That might have been what you were doing before implementing a better method that applies firing type information.

Originally posted by @miloknowles in https://github.com/singularity-energy/open-grid-emissions/issues/176#issuecomment-1217020160

grgmiller commented 1 year ago

So defaulting to PM-fuel specific factors is pretty straightforward when boiler firing type is not available. Emissions control data in the current format is available from 2014, and boiler design data in the current format is available from 2013.

Making the data cleaning process work for years prior to 2019 also requires updating the pudl allocate_net_gen module due to some duplicate keys that are created in the allocation process. I'm not sure exactly why these duplicates are being created (I think it's because of some questionable boiler-generator associations), but I do have a patch that will fix this issue.

However, I'm realizing that there are a number of other issues that are raised when you start trying to run NOx and SO2 calculations for historical years. None of these are insurmountable, but they will require some manual work to improve the coverage of the emission factor tables and default fallbacks:

These issues are related to #117

@miloknowles at this point all of these other issues will also break the EIA-923 data cleaning process unless resolved. Let me know how you want to move forward with this.

miloknowles commented 1 year ago

@grgmiller thank you for outlining these issues! I will start working on those manual fixes today and let you know if I run into any problems.