US-EPA-CAMD / easey-ui

Project Management repo for EPA Clean Air Markets Division (CAMD) Business Suite of applications
MIT License
0 stars 0 forks source link

Consecutive Hours column in EM evaluation report is inaccurate #5991

Open esaber76 opened 7 months ago

esaber76 commented 7 months ago

Found during regression testing in ecmps-tst.app.cloud.gov v2.0.90.

Logged in as saber_ds (Submitter), imported 2023 Q2 emissions from historical for 6071, MS-2A, MS-2B, 2 and evaluated data.

Received multiple MATSDHV-10-B and HOURDHV-24-E errors related to reporting formula IDs for SO2 and SO2RH that are not active in the MP. This issue will be handled by #5990 .

The other issue is that the Consecutive Hours column in the EM evaluation report is not considering hours spanning multiple days. Ex. 5/10, hour 11 - 5/11, hour 16 only displays 5 consecutive hours. For a single day, it is also only displaying the difference between the hours and either not including the first or last hour. Ex. 5/10, hour 11 - 5/10, hour 12 would display as 1 instead of 2.

Trimble County.PNG
yonatan-dp commented 1 month ago

Further details from @esaber76

Attached is a different example to shed some light on this. Look at the Consecutive Hours column. Using the 1st HOURDHV-29-B row as an example, 7/1, hour 0 -> 7/7, hour 2 indicates 2 consecutive hours. It should be 147 consecutive hours. It needs to include hours between days and also include the begin date/hour and end date/hour in the count.

[Uploading 404_4_ECMPS_2.0.pdf…]()

annalbrecht commented 1 month ago

Also test daily errors and QA status errors.

esaber76 commented 1 month ago

@yonatan-dp - See the screenshot below. This does not appear to affect the Test Data Errors section. We flag the tests individually. The QA Status Errors section does have the same problem though.

image

yonatan-dp commented 1 month ago

@esaber76 The other problem is in the daily error results (not test data errors as indicated above). The column list is exactly as the QA status errors and the Hourly data errors (the original ticket was against the hourly data errors). Can you check the daily data errors)?

esaber76 commented 1 month ago

@yonatan-dp - are you referring to the Daily Emissions Data Errors section? If so, it appears 1.0 displayed the column as "Days" instead of "Hours" in this section and really didn't take a count for consecutive days.

image

yonatan-dp commented 1 month ago

@esaber76 yes, this is the one I was referring to. I see the code is making the same error in the other two. So, it looks like this needs to be fixed as well?

esaber76 commented 1 month ago

@yonatan-dp yes, I would just fix this as well unless it's going to be complicated and time-consuming. It's all the same report.

yonatan-dp commented 1 month ago

No, it is not complicated. Easy fix. Will do.

esaber76 commented 1 month ago
  1. Remove the decimal point and all trailing zeros to the right of the decimal point for all 3 sections (QA Status Errors, Hourly Data Errors, Daily Emissions Data Errors).
  2. For errors where only 1 hour (or day) is affected, the report is displaying a zero instead of 1 (all 3 sections).
  3. For the Daily Emissions Data Errors section, rename the "Consecutive Hours" column to "Consecutive Days". This column will always display 1. Hour ranges are not involved for daily checks. The entire day is flagged and contains one row per day flagged.

Error report from 2.0 application showing the above issues:

EM_EVAL_Moss Landing Power Plant_260.zip

Error report from 1.0 application showing the correct values:

260_1A_1_0.pdf

Emissions file used to create the error report in 2.0:

Emissions _ Export - Moss Landing Power Plant (1A) - 2023 - Q3.json

yonatan-dp commented 1 month ago

Hi @esaber76, please retest the above. Fix has been deployed to dev.

esaber76 commented 1 month ago

The Daily Emissions Data Errors section is not displaying anything in the Consecutive Hours column. Can this column be renamed to Consecutive Days in this section and always display "1" for each affected row? This would align with ECMPS 1.0. If this is an issue based on how the reports were originally designed, we can discuss with others during the next standup.

2.0 report as of now:

image

1.0 report:

image

yonatan-dp commented 1 month ago

@esaber76 Can you retest? The database updates must have somehow been rolled back and I just applied them again. Thank you.

esaber76 commented 1 month ago

Acceptance Test:

  1. Log in and check out ORIS 260, 1A.
  2. Revert to official.
  3. Import and evaluate the attached file to produce the needed errors in the QA Status Errors, Hourly Data Errors, and Daily Emissions Data Errors sections of the Emissions Evaluation Report.
  4. Confirm the Consecutive Hours/Days column of the report match the attached 1.0 version of the report.

Emissions _ Export - Moss Landing Power Plant (1A) - 2023 - Q3.json

1.0 report:

260_1A_1_0.pdf

Note: Other issues/enhancement ideas for this report were logged to #6300 after taking a closer look at this.

ntknguyen commented 1 week ago

Verified this issue is fixed.