-
Notifications
You must be signed in to change notification settings - Fork 24
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
Bugfix: Fix the TC-Stat RIRW runtime error when computing CTS statistics from an empty contingency table #2542
Comments
Note that for the HSS statistic in the CTS line type, MET calls For the HSS_EC statistic in the CTS line type, MET calls So that explains why this issue didn't show up for the HSS statistic but does show up for HSS_EC. |
…c(), gkuiper(), and gerrity() to return bad data for empty contingency tables rather than erroring out.
…2425 by adding the option. That produces output for both the AHWI and BCLP model names. The BCLP contingency table is empty which triggers this runtime error. Tweaking this newly added tests and confirming that it now runs without error demonstrate the fix.
* Per #2542, in the ContingencyTable class, update gheidke(), gheidke_ec(), gkuiper(), and gerrity() to return bad data for empty contingency tables rather than erroring out. * Per #2542, modify TC-Stat config file job number 8 that was added for #2425 by adding the option. That produces output for both the AHWI and BCLP model names. The BCLP contingency table is empty which triggers this runtime error. Tweaking this newly added tests and confirming that it now runs without error demonstrate the fix.
Describe the Problem
This issue was identified based on feedback from the NOAA METplus Telecon on 5/15/2023 from Olivia Ostwald. TC-Stat produces a runtime error when attempting to compute CTS statistics from an empty contingency table. A short-term solution of only requesting CTC output with
-out_line_type CTC
will work for the time being. Recommend fixing this in thedevelop
branch for MET version 11.1.0 but not providing a patch in themain_v11.0
branch.Expected Behavior
Computing CTS stats for an empty contingency table produces a runtime error from
ContingencyTable::gheidke_ec(double)
. Recommend removing the empty table check and just return bad data instead. The error goes away if you only request-out_line_type CTC
output, and the contingency table counts for that empty table are indeed written:Testing this same situation using MET version 10.1.0, prior to the addition of the HSS_EC column, an empty contingency table from the RIRW job just produced a CTC line with all stats computed as NA. Recommend fixing the code to do the same... do not error out because of an empty table.
Environment
Can be reproduced on seneca.
To Reproduce
Run the following on seneca:
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
Define the source of funding and account keys here or state NONE.
Define the Metadata
Assignee
Labels
Projects and Milestone
Define Related Issue(s)
Consider the impact to the other METplus components.
None.
Bugfix Checklist
See the METplus Workflow for details.
Branch name:
bugfix_<Issue Number>_main_<Version>_<Description>
Pull request:
bugfix <Issue Number> main_<Version> <Description>
Select: Reviewer(s) and Development issue
Select: Organization level software support Project for the current coordinated release
Select: Milestone as the next bugfix version
Branch name:
bugfix_<Issue Number>_develop_<Description>
Pull request:
bugfix <Issue Number> develop <Description>
Select: Reviewer(s) and Development issue
Select: Repository level development cycle Project for the next official release
Select: Milestone as the next official version
The text was updated successfully, but these errors were encountered: