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

Fix bug with CEMS missing CO2 data filling #280

Closed grgmiller closed 1 year ago

grgmiller commented 1 year ago

This PR closes https://github.com/singularity-energy/open-grid-emissions/issues/279 and fixes CAR-1913 and CAR-1912.

Updates:

TODO:

grgmiller commented 1 year ago

After fixing this and comparing the annual plant level data to the v0.2.1 data, it looks like this bug substantially affected 32 plants spread across 10 BAs (AEC, CPLE, ERCO, ISNE, MISO, NYIS, PJM, SOCO, SWPP, and TVA). Most of these plants (14) were in SOCO, but there were also 5 plants in MISO and 5 plants in SWPP that were affected. This error was resulting in about 65 billion lb of CO2 missing from the final results, or about 2% of the total CO2 for electricity.

grgmiller commented 1 year ago

So with the previous data before fixing this, this is what the comparison to eGRID BA-level data looked like for the regions with the largest disrepancies (5th column of numbers is the percentage difference in regional emission rate that we are focusing on):

net_generation_mwh  fuel_consumed_mmbtu fuel_consumed_for_electricity_mmbtu co2_mass_lb generated_co2_rate_lb_per_mwh   num_plants
SOCO    0.00    0.01    0.01    -0.19   -0.19   6.0
HST 0.01    0.00    0.00    -0.13   -0.14   0.0
PGE 0.23    0.09    0.09    0.12    -0.08   0.0
IID 0.00    0.00    0.00    -0.08   -0.08   0.0
HECO    0.19    0.18    0.17    0.14    -0.04   11.0
CISO    0.04    -0.00   -0.01   0.01    -0.03   7.0
PACW    0.00    -0.01   -0.01   -0.02   -0.02   0.0
...
TEPC    -0.23   -0.27   -0.27   -0.21   0.03    0.0
TVA 0.00    -0.00   -0.00   0.03    0.03    0.0
TEC 0.01    0.06    0.06    0.06    0.04    0.0
PSEI    0.00    0.04    0.02    0.05    0.05    0.0
AZPS    0.00    0.07    0.07    0.05    0.05    0.0
SRP 0.07    0.17    0.17    0.15    0.08    3.0
TAL 0.00    0.09    0.09    0.09    0.09    0.0
AEC 0.00    0.00    0.00    0.27    0.27    0.0

After fixing this, the comparison looks like:

       net_generation_mwh  fuel_consumed_mmbtu  fuel_consumed_for_electricity_mmbtu  co2_mass_lb  generated_co2_rate_lb_per_mwh  num_plants
HST                  0.01                 0.00                                 0.00        -0.13                          -0.14         0.0
PGE                  0.23                 0.09                                 0.09         0.12                          -0.08         0.0
IID                  0.00                 0.00                                 0.00        -0.08                          -0.08         0.0
HECO                 0.19                 0.18                                 0.17         0.14                          -0.04        11.0
CISO                 0.04                -0.00                                -0.01         0.01                          -0.03         7.0
PACW                 0.00                -0.01                                -0.01        -0.02                          -0.02         0.0
...
TEPC                -0.23                -0.27                                -0.27        -0.21                           0.03         0.0
TEC                  0.01                 0.06                                 0.06         0.06                           0.04         0.0
PSEI                 0.00                 0.04                                 0.02         0.05                           0.05         0.0
AZPS                 0.00                 0.07                                 0.07         0.05                           0.05         0.0
SRP                  0.07                 0.17                                 0.17         0.15                           0.08         3.0
TAL                  0.00                 0.09                                 0.09         0.09                           0.09         0.0

So the worst issues on either end of the scale (SOCO and AEC) have been fixed, but this specific bug was not affecting some of the other, smaller discrepancies in regions like HST, PGE, AZPS, SRP, TAL. These might be caused by other issues.

One interesting thing is that previously the total US co2 mass in OGE was only 1% higher than eGRID, and now it is about 2% higher. This is more in line with what we would expect if we think that OGE is able to include more data than eGRID might be dropping due to the crosswalking algorithm that we use.