Skip to content
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

Per #2542 develop gheidke #2543

Merged
merged 2 commits into from
May 15, 2023
Merged

Per #2542 develop gheidke #2543

merged 2 commits into from
May 15, 2023

Conversation

JohnHalleyGotway
Copy link
Collaborator

Expected Differences

This PR updates the error checking logic for the ContingencyTable class gheidke(), gheidke_ec(), gkuiper(), and gerrity() functions. Rather than erroring out for empty contingency tables, just return bad data.

  • Do these changes introduce new tools, command line arguments, or configuration file options? [No]

    If yes, please describe:

  • Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]

    If yes, please describe:

Pull Request Testing

  • Describe testing already performed for these changes:

    Replicated the problem using output from the nightly build on seneca. Confirmed that the fix works as expected.

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    Review the code changes and observe the very slightly modified unit test output.

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
    None needed.

  • Do these changes include sufficient testing updates? [Yes]
    Slightly tweaked an existing unit test to demonstrate this fix.

  • Will this PR result in changes to the test suite? [Yes]

    If yes, describe the new output and/or changes to the existing output:

    For issue Bugfix: Fix the TC-Stat RIRW runtime error when computing CTS statistics from an empty contingency table #2542, @sethlinden added added an 8th job to the TC-Stat unit test. I modified that job by adding -by amodel. 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. The only modified output file should be tc_stat/ALAL2010_rirw.stat.

  • Please complete this pull request review by [Wed May 17, 2023].

Pull Request Checklist

See the METplus Workflow for details.

  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s)
    Select: Organization level software support Project or Repository level development cycle Project
    Select: Milestone as the version that will include these changes
  • After submitting the PR, select Development issue with the original issue number.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

…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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look reasonable to me.

@sethlinden
Copy link
Contributor

I reviewed the changes to the config file and to the contable_stats.cc. All looks good to me.

@sethlinden sethlinden merged commit caf4bd7 into develop May 15, 2023
Copy link
Contributor

@sethlinden sethlinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of the changes.

JohnHalleyGotway pushed a commit that referenced this pull request May 15, 2023
Co-authored-by: John Halley Gotway <[email protected]>
Co-authored-by: Seth Linden <[email protected]>
Co-authored-by: jprestop <[email protected]>
Co-authored-by: Daniel Adriaansen <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: Howard Soh <[email protected]>
Co-authored-by: hsoh-u <[email protected]>
Co-authored-by: MET Tools Test Account <[email protected]>
Co-authored-by: Seth Linden <[email protected]>
Co-authored-by: lisagoodrich <[email protected]>
Co-authored-by: davidalbo <[email protected]>
Co-authored-by: Lisa Goodrich <[email protected]>
Co-authored-by: metplus-bot <[email protected]>
Co-authored-by: j-opatz <[email protected]>
fix #2389 develop flowchart (#2392)
Fix Python environment issue (#2407)
fix definitions of G172 and G220 based on comments in NOAA-EMC/NCEPLIBS-w3emc#157. (#2406)
fix #2380 develop override (#2382)
fix #2408 develop empty config (#2410)
fix #2390 develop compile zlib (#2404)
fix #2412 develop climo (#2422)
fix #2437 develop convert (#2439)
fix for develop, for #2437, forgot one reference to the search_parent for a dictionary lookup.
fix #2452 develop airnow (#2454)
fix #2449 develop pdf (#2464)
fix #2402 develop sonarqube (#2468)
fix #2426 develop buoy (#2475)
fix 2518 dtypes appf docs (#2519)
fix 2531 compilation errors (#2533)
fix #2531 compilation_errors_configure (#2535)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Bugfix: Fix the TC-Stat RIRW runtime error when computing CTS statistics from an empty contingency table
2 participants