The cleaning and allocation procedure fails at the plant level for years 2019, 2020, 2021 and 2022. For years 2018 and earlier the procedure fails for both the plant level and the subplant level.
This PR handles the plant vs subplant cases.
What the code is doing
Add a else statement for handling the plant level case. Also, the subplant emission factors are set to None for the plant level case.
Testing
Tested manually (see below). Note that the procedure has not been tested at the subplant level for years 2018 and earlier
Where to look
The only edits are in the oge.data_cleaning_module
Usage Example/Visuals
>>> gen_fuel_allocated, primary_fuel_table, _ = oge.data_cleaning.clean_eia923(
... 2022, small=False, add_subplant_id=False)
2024-05-06 17:31:43 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:478 The granular data tables contain 82.0% of the fuel and 57.7% of net generation in the higher-coverage generation_fuel_eia923 table.
2024-05-06 17:31:43 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1579 Distributing 0.1% annually reported records to months.
2024-05-06 17:32:11 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1579 Distributing 0.3% annually reported records to months.
2024-05-06 17:32:21 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1039 Associating and allocating 95 (0.0%) records with unexpected prime_mover_code.
2024-05-06 17:32:22 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1039 Associating and allocating 1001 (0.2%) records with unexpected prime_mover_code.
2024-05-06 17:32:24 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1244 Ratio calc types:
All gens w/in generation table: 91475#, 1.6e+07 MW
Some gens w/in generation table: 1075#, 5.6e+04 MW
No gens w/in generation table: 308034#, 8.9e+06 MW
2024-05-06 17:32:26 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1965 0.006% of records have are partially off from their 'IDX_PM_ESC' group
2024-05-06 17:32:26 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1977 gen v fuel table net gen diff: 57.7%
2024-05-06 17:32:26 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1981 new v fuel table net gen diff: 100.0%
2024-05-06 17:32:26 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2018 1.57% of generator records are more that 5% off from the net generation table
2024-05-06 17:32:26 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1360 Ratio calc types:
All gens w/in boiler fuel table: 73781#, 1.3e+07 MW
Some gens w/in boiler fuel table: 3100#, 9.3e+05 MW
No gens w/in boiler fuel table: 323703#, 1.1e+07 MW
2024-05-06 17:32:28 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2076 net_generation_mwh: 0.1% of allocated plant/year's are off by more than 5%
2024-05-06 17:32:28 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2087 net_generation_mwh: Min and max differnce are x0.0 and x1.14
2024-05-06 17:32:28 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2076 fuel_consumed_mmbtu: 0.0% of allocated plant/year's are off by more than 5%
2024-05-06 17:32:28 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2087 fuel_consumed_mmbtu: Min and max differnce are x0.0 and x1.0
2024-05-06 17:32:28 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2076 fuel_consumed_for_electricity_mmbtu: 0.0% of allocated plant/year's are off by more than 5%
2024-05-06 17:32:28 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2087 fuel_consumed_for_electricity_mmbtu: Min and max differnce are x0.0 and x1.0
2024-05-06 17:32:28 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:412 FRACTION DROPPED: 0.0, NUM RECORDS DROPPED: 0
2024-05-06 17:32:28 [WARNING] oge.oge.data_cleaning:84 Bad input fuel data detected for the following generators:
2024-05-06 17:32:29 [WARNING] oge.oge.data_cleaning:85 report_date plant_id_eia generator_id energy_source_code prime_mover_code fuel_consumed_mmbtu ba_code
0 2022-05-01 10613 TG10 WDS ST -23653.975904 NBSO
1 2022-05-01 10613 TG11 WDS ST -27562.024096 NBSO
2024-05-06 17:32:29 [WARNING] oge.oge.data_cleaning:104 These values will be treated as missing values
2024-05-06 17:32:29 [WARNING] oge.oge.data_cleaning:84 Bad input fuel data detected for the following generators:
2024-05-06 17:32:29 [WARNING] oge.oge.data_cleaning:85 report_date plant_id_eia generator_id energy_source_code prime_mover_code fuel_consumed_for_electricity_mmbtu ba_code
0 2022-05-01 10613 TG10 WDS ST -23653.975904 NBSO
1 2022-05-01 10613 TG11 WDS ST -27562.024096 NBSO
2024-05-06 17:32:29 [WARNING] oge.oge.data_cleaning:104 These values will be treated as missing values
2024-05-06 17:32:32 [WARNING] oge.oge.validation:77 There are 469 plant/fuel combinations that are either in EIA-923 Input or allocated EIA-923 but not in both
2024-05-06 17:32:32 [WARNING] oge.oge.validation:92 There are 60 plant/fuel combinations in EIA-923 Input but not in allocated EIA-923. There are 3 rows with non-zero or missing values
2024-05-06 17:32:32 [WARNING] oge.oge.validation:108 There are 409 plant/fuel combinations in allocated EIA-923 but not in EIA-923 Input. There are 0 rows with non-zero or missing values
2024-05-06 17:32:32 [WARNING] oge.oge.validation:128 There are 7 plant/fuel combinations with non-zero (missing) net generation or fuel consumed that are different in allocated EIA-923 and EIA-923 Input
2024-05-06 17:32:32 [WARNING] oge.oge.validation:137 Percentage Difference:
2024-05-06 17:32:32 [WARNING] oge.oge.validation:138
net_generation_mwh fuel_consumed_mmbtu fuel_consumed_for_electricity_mmbtu ba_code
plant_id_eia energy_source_code
1316 NG 8.704314e-02 0.000000 0.000000 SWPP
10613 WDS 1.171735e-16 0.056065 0.558523 NBSO
54724 GEO -1.000000e+00 -1.000000 -1.000000 IID
58256 MWH -1.000000e+00 0.000000 0.000000 PNM
59817 SUN -1.000000e+00 -1.000000 -1.000000 PACE
59825 WND -1.000000e+00 -1.000000 -1.000000 CPLE
65498 WND -1.000000e+00 -1.000000 -1.000000 MISO
2024-05-06 17:32:32 [WARNING] oge.oge.validation:141 EIA-923 Input Totals:
2024-05-06 17:32:32 [WARNING] oge.oge.validation:142
net_generation_mwh fuel_consumed_mmbtu fuel_consumed_for_electricity_mmbtu ba_code
plant_id_eia energy_source_code
1316 NG 413.588 14274.0 14274.0 SWPP
10613 WDS 31047.793 913514.0 91699.0 NBSO
54724 GEO 98804.000 337120.0 337120.0 IID
58256 MWH -83.000 0.0 0.0 PNM
59817 SUN 98.000 336.0 336.0 PACE
59825 WND 9972.000 34024.0 34024.0 CPLE
65498 WND 1158.000 3950.0 3950.0 MISO
2024-05-06 17:32:32 [WARNING] oge.oge.validation:148 Allocated Totals:
2024-05-06 17:32:32 [WARNING] oge.oge.validation:149
net_generation_mwh fuel_consumed_mmbtu fuel_consumed_for_electricity_mmbtu ba_code
plant_id_eia energy_source_code
1316 NG 449.588 14274.0 14274.0 SWPP
10613 WDS 31047.793 964730.0 142915.0 NBSO
54724 GEO 0.000 0.0 0.0 IID
58256 MWH NaN NaN NaN PNM
59817 SUN 0.000 0.0 0.0 PACE
59825 WND NaN NaN NaN CPLE
65498 WND NaN NaN NaN MISO
2024-05-06 17:32:32 [INFO] oge.oge.validation:411 Checking that there are no missing energy source codes associated with non-zero fuel consumption...
2024-05-06 17:32:32 [INFO] oge.oge.validation:422 OK
2024-05-06 17:32:32 [INFO] oge.oge.validation:222 Checking that fuel and emissions values are positive...
2024-05-06 17:32:32 [INFO] oge.oge.validation:296 OK
2024-05-06 17:32:33 [WARNING] oge.oge.validation:206 There are 119 plants where the assigned primary fuel doesn't match the capacity-based primary fuel.
It is possible that these plants will categorized as a different fuel in EIA-930
2024-05-06 17:32:34 [WARNING] oge.oge.validation:209
plant_id_eia plant_primary_fuel_from_capacity_mw plant_primary_fuel plant_primary_fuel_from_capacity_mw_category plant_primary_fuel_category ba_code
0 63 DFO WAT petroleum hydro AKMS
1 91 DFO WAT petroleum hydro AKMS
2 160 NG SUB natural_gas coal WALC
3 165 NG SUB natural_gas coal SWPP
4 557 JF WAT petroleum hydro ISNE
5 667 BIT NG coal natural_gas JEA
...
2024-05-06 17:32:36 [WARNING] oge.oge.emissions:728 NOx emission factors are missing for the following boiler types. A prime mover-fuel level factor will be used if available.
2024-05-06 17:32:36 [WARNING] oge.oge.emissions:731 Missing factors for FC prime movers are currently expected
2024-05-06 17:32:36 [WARNING] oge.oge.emissions:732
prime_mover_code energy_source_code wet_dry_bottom boiler_firing_type
24496 FC LFG none none
14490 FC NG none none
24735 FC OBG none none
2024-05-06 17:32:36 [WARNING] oge.oge.emissions:760
After filling with PM-fuel factors, NOx emission factors are still missing for the following boiler types.
An emission factor of zero will be used for these boilers.
Missing factors for FC prime movers are currently expected.
2024-05-06 17:32:36 [WARNING] oge.oge.emissions:766
prime_mover_code energy_source_code wet_dry_bottom boiler_firing_type
24496 FC LFG none none
14490 FC NG none none
24735 FC OBG none none
2024-05-06 17:32:37 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1579 Distributing 0.1% annually reported records to months.
2024-05-06 17:32:40 [WARNING] oge.oge.emissions:1467 SO2 emission factors are missing for the following boiler types. A prime mover-fuel level factor will be used if available.
2024-05-06 17:32:40 [WARNING] oge.oge.emissions:1470 Missing factors for FC prime movers are currently expected
2024-05-06 17:32:40 [WARNING] oge.oge.emissions:1471
prime_mover_code energy_source_code boiler_firing_type
24496 FC LFG none
14490 FC NG none
24735 FC OBG none
2024-05-06 17:32:41 [WARNING] oge.oge.emissions:1497 SO2 emission factors are missing for the following boiler types. An emission factor of zero will be used for these boilers.
2024-05-06 17:32:41 [WARNING] oge.oge.emissions:1500 Missing factors for FC prime movers are currently expected
2024-05-06 17:32:41 [WARNING] oge.oge.emissions:1501
prime_mover_code energy_source_code boiler_firing_type
24496 FC LFG none
14490 FC NG none
24735 FC OBG none
2024-05-06 17:32:43 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1579 Distributing 0.1% annually reported records to months.
2024-05-06 17:32:45 [INFO] oge.oge.validation:392 Checking that total fuel consumed >= fuel consumed for electricity...
2024-05-06 17:32:45 [INFO] oge.oge.validation:404 OK
2024-05-06 17:32:45 [INFO] oge.oge.validation:723 Checking that adjusted emission values are less than total emissions...
2024-05-06 17:32:45 [INFO] oge.oge.validation:829 OK
2024-05-06 17:32:46 [INFO] oge.oge.data_cleaning:696 Removing 0 plants that are not grid-connected
2024-05-06 17:32:46 [INFO] oge.oge.data_cleaning:660 Removing 1 plants located in the following states: ['PR']
2024-05-06 17:32:46 [INFO] oge.oge.validation:222 Checking that fuel and emissions values are positive...
2024-05-06 17:32:46 [INFO] oge.oge.validation:296 OK
and
>>> gen_fuel_allocated, primary_fuel_table, _ = oge.data_cleaning.clean_eia923(
... 2018, small=False, add_subplant_id=False)
2024-05-06 17:33:08 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:478 The granular data tables contain 60.6% of the fuel and 61.5% of net generation in the higher-coverage generation_fuel_eia923 table.
2024-05-06 17:33:09 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1579 Distributing 0.1% annually reported records to months.
2024-05-06 17:33:33 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1579 Distributing 0.2% annually reported records to months.
2024-05-06 17:33:41 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1039 Associating and allocating 119 (0.0%) records with unexpected prime_mover_code.
2024-05-06 17:33:42 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1039 Associating and allocating 1104 (0.3%) records with unexpected prime_mover_code.
2024-05-06 17:33:44 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1244 Ratio calc types:
All gens w/in generation table: 100931#, 1.7e+07 MW
Some gens w/in generation table: 597#, 7.9e+04 MW
No gens w/in generation table: 267684#, 8.1e+06 MW
2024-05-06 17:33:45 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1965 0.008% of records have are partially off from their 'IDX_PM_ESC' group
2024-05-06 17:33:45 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1977 gen v fuel table net gen diff: 61.2%
2024-05-06 17:33:45 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1981 new v fuel table net gen diff: 100.0%
2024-05-06 17:33:45 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2018 1.97% of generator records are more that 5% off from the net generation table
2024-05-06 17:33:46 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1360 Ratio calc types:
All gens w/in boiler fuel table: 81339#, 1.5e+07 MW
Some gens w/in boiler fuel table: 3806#, 7e+05 MW
No gens w/in boiler fuel table: 284067#, 9.5e+06 MW
2024-05-06 17:33:47 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2076 net_generation_mwh: 0.0% of allocated plant/year's are off by more than 5%
2024-05-06 17:33:47 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2087 net_generation_mwh: Min and max differnce are x0.0 and x1.07
2024-05-06 17:33:47 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2076 fuel_consumed_mmbtu: 0.0% of allocated plant/year's are off by more than 5%
2024-05-06 17:33:47 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2087 fuel_consumed_mmbtu: Min and max differnce are x0.0 and x1.0
2024-05-06 17:33:47 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2076 fuel_consumed_for_electricity_mmbtu: 0.0% of allocated plant/year's are off by more than 5%
2024-05-06 17:33:47 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:2087 fuel_consumed_for_electricity_mmbtu: Min and max differnce are x0.0 and x1.0
2024-05-06 17:33:47 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:412 FRACTION DROPPED: 0.0, NUM RECORDS DROPPED: 0
2024-05-06 17:33:49 [WARNING] oge.oge.validation:77 There are 371 plant/fuel combinations that are either in EIA-923 Input or allocated EIA-923 but not in both
2024-05-06 17:33:49 [WARNING] oge.oge.validation:92 There are 62 plant/fuel combinations in EIA-923 Input but not in allocated EIA-923. There are 1 rows with non-zero or missing values
2024-05-06 17:33:49 [WARNING] oge.oge.validation:108 There are 309 plant/fuel combinations in allocated EIA-923 but not in EIA-923 Input. There are 0 rows with non-zero or missing values
2024-05-06 17:33:49 [WARNING] oge.oge.validation:128 There are 4 plant/fuel combinations with non-zero (missing) net generation or fuel consumed that are different in allocated EIA-923 and EIA-923 Input
2024-05-06 17:33:49 [WARNING] oge.oge.validation:137 Percentage Difference:
2024-05-06 17:33:49 [WARNING] oge.oge.validation:138
net_generation_mwh fuel_consumed_mmbtu fuel_consumed_for_electricity_mmbtu ba_code
plant_id_eia energy_source_code
617 NG 0.000000 -0.000095 -0.000095 FPL
56052 MWH -1.000000 0.000000 0.000000 PJM
59012 OBG -0.374502 -0.374502 -0.374502 PJM
59395 NG -1.000000 -1.000000 -1.000000 CISO
2024-05-06 17:33:49 [WARNING] oge.oge.validation:141 EIA-923 Input Totals:
2024-05-06 17:33:49 [WARNING] oge.oge.validation:142
net_generation_mwh fuel_consumed_mmbtu fuel_consumed_for_electricity_mmbtu ba_code
plant_id_eia energy_source_code
617 NG 6896328.163 46598679.0 46598679.0 FPL
56052 MWH -4837.000 0.0 0.0 PJM
59012 OBG 56561.000 930598.0 565218.0 PJM
59395 NG 2115.000 18051.0 18051.0 CISO
2024-05-06 17:33:49 [WARNING] oge.oge.validation:148 Allocated Totals:
2024-05-06 17:33:49 [WARNING] oge.oge.validation:149
net_generation_mwh fuel_consumed_mmbtu fuel_consumed_for_electricity_mmbtu ba_code
plant_id_eia energy_source_code
617 NG 6.896328e+06 4.659426e+07 4.659426e+07 FPL
56052 MWH NaN NaN NaN PJM
59012 OBG 3.537879e+04 5.820872e+05 3.535427e+05 PJM
59395 NG 0.000000e+00 0.000000e+00 0.000000e+00 CISO
2024-05-06 17:33:50 [INFO] oge.oge.validation:411 Checking that there are no missing energy source codes associated with non-zero fuel consumption...
2024-05-06 17:33:50 [INFO] oge.oge.validation:422 OK
2024-05-06 17:33:50 [INFO] oge.oge.validation:222 Checking that fuel and emissions values are positive...
2024-05-06 17:33:50 [INFO] oge.oge.validation:296 OK
2024-05-06 17:33:51 [WARNING] oge.oge.validation:206 There are 158 plants where the assigned primary fuel doesn't match the capacity-based primary fuel.
It is possible that these plants will categorized as a different fuel in EIA-930
2024-05-06 17:33:51 [WARNING] oge.oge.validation:209
plant_id_eia plant_primary_fuel_from_capacity_mw plant_primary_fuel plant_primary_fuel_from_capacity_mw_category plant_primary_fuel_category ba_code
0 30 NG DFO natural_gas petroleum MISO
1 63 DFO WAT petroleum hydro AKMS
2 66 DFO WAT petroleum hydro AKMS
3 91 DFO WAT petroleum hydro AKMS
4 477 BIT NG coal natural_gas PSCO
5 544 KER NG petroleum natural_gas ISNE
...
2024-05-06 17:33:53 [WARNING] oge.oge.emissions:728 NOx emission factors are missing for the following boiler types. A prime mover-fuel level factor will be used if available.
2024-05-06 17:33:53 [WARNING] oge.oge.emissions:731 Missing factors for FC prime movers are currently expected
2024-05-06 17:33:53 [WARNING] oge.oge.emissions:732
prime_mover_code energy_source_code wet_dry_bottom boiler_firing_type
6616 CA BIT none other
26008 FC LFG none none
15946 FC NG none none
26782 FC OBG none none
8986 ST OBS dry stoker
3225 ST PG wet cyclone_firing
2024-05-06 17:33:54 [WARNING] oge.oge.emissions:760
After filling with PM-fuel factors, NOx emission factors are still missing for the following boiler types.
An emission factor of zero will be used for these boilers.
Missing factors for FC prime movers are currently expected.
2024-05-06 17:33:54 [WARNING] oge.oge.emissions:766
prime_mover_code energy_source_code wet_dry_bottom boiler_firing_type
26008 FC LFG none none
15946 FC NG none none
26782 FC OBG none none
2024-05-06 17:33:54 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1579 Distributing 0.1% annually reported records to months.
2024-05-06 17:33:58 [WARNING] oge.oge.emissions:1467 SO2 emission factors are missing for the following boiler types. A prime mover-fuel level factor will be used if available.
2024-05-06 17:33:58 [WARNING] oge.oge.emissions:1470 Missing factors for FC prime movers are currently expected
2024-05-06 17:33:58 [WARNING] oge.oge.emissions:1471
prime_mover_code energy_source_code boiler_firing_type
6616 CA BIT other
26008 FC LFG none
15946 FC NG none
26782 FC OBG none
2024-05-06 17:33:58 [WARNING] oge.oge.emissions:1497 SO2 emission factors are missing for the following boiler types. An emission factor of zero will be used for these boilers.
2024-05-06 17:33:58 [WARNING] oge.oge.emissions:1500 Missing factors for FC prime movers are currently expected
2024-05-06 17:33:58 [WARNING] oge.oge.emissions:1501
prime_mover_code energy_source_code boiler_firing_type
26008 FC LFG none
15946 FC NG none
26782 FC OBG none
2024-05-06 17:34:00 [WARNING] oge.oge.emissions:1666 Sulfur content data is missing in EIA-923 for the below units.
2024-05-06 17:34:00 [WARNING] oge.oge.emissions:1667
plant_id_eia generator_id prime_mover_code energy_source_code ba_code
0 557 10 GT JF ISNE
1 2364 GT1 GT JF ISNE
2 2364 GT2 GT JF ISNE
3 2369 GT1 GT JF ISNE
4 3954 JF1 GT JF PJM
5 6223 1 GT JF SWPP
...
2024-05-06 17:34:01 [ INFO] catalystcoop.pudl.analysis.allocate_gen_fuel:1579 Distributing 0.1% annually reported records to months.
2024-05-06 17:34:02 [WARNING] oge.oge.emissions:1288 SO2 emission factors are missing for the above records
2024-05-06 17:34:02 [WARNING] oge.oge.emissions:1289 Missing factors for FC prime movers are currently expected
2024-05-06 17:34:03 [WARNING] oge.oge.emissions:1290
report_date plant_id_eia energy_source_code prime_mover_code generator_id ba_code
0 2018-01-01 557 JF GT 10 ISNE
1 2018-01-01 2364 JF GT GT1 ISNE
2 2018-01-01 2364 JF GT GT2 ISNE
3 2018-01-01 2369 JF GT GT1 ISNE
4 2018-01-01 3954 JF GT JF1 PJM
5 2018-01-01 6223 JF GT 1 SWPP
...
2024-05-06 17:34:04 [INFO] oge.oge.validation:392 Checking that total fuel consumed >= fuel consumed for electricity...
2024-05-06 17:34:04 [INFO] oge.oge.validation:404 OK
2024-05-06 17:34:04 [INFO] oge.oge.validation:723 Checking that adjusted emission values are less than total emissions...
2024-05-06 17:34:04 [INFO] oge.oge.validation:829 OK
2024-05-06 17:34:04 [INFO] oge.oge.data_cleaning:696 Removing 3 plants that are not grid-connected
2024-05-06 17:34:04 [INFO] oge.oge.data_cleaning:660 Removing 1 plants located in the following states: ['PR']
2024-05-06 17:34:05 [INFO] oge.oge.validation:222 Checking that fuel and emissions values are positive...
2024-05-06 17:34:05 [INFO] oge.oge.validation:296 OK
>>>
Review estimate
10 min
Future work
N/A
Checklist
[x] Update the documentation to reflect changes made in this PR
[x] Format all updated python files using black
[x] Clear outputs from all notebooks modified
[x] Add docstrings and type hints to any new functions created
Purpose
The cleaning and allocation procedure fails at the plant level for years 2019, 2020, 2021 and 2022. For years 2018 and earlier the procedure fails for both the plant level and the subplant level.
This PR handles the plant vs subplant cases.
What the code is doing
Add a else statement for handling the plant level case. Also, the subplant emission factors are set to None for the plant level case.
Testing
Tested manually (see below). Note that the procedure has not been tested at the subplant level for years 2018 and earlier
Where to look
The only edits are in the
oge.data_cleaning_module
Usage Example/Visuals
and
Review estimate
10 min
Future work
N/A
Checklist
black