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

Bugfix 1886 main_v10.0 grid_diag #1887

Closed
wants to merge 2 commits into from

Conversation

JohnHalleyGotway
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway commented Aug 20, 2021

Pull Request Testing

@georgemccabe I'm including you on this PR for your code review but also to alert you that the Grid-Diag output variables will change from type int to int64. Note that ncdiff does NOT flag this as a difference.

Also note that I'll be submitting a similar PR to fix this in develop but will include a couple more changes.

  • Describe testing already performed for these changes:

    Manually tested a run of grid_diag using MET version 10.0.0 that replicates the integer overflow problem. Switched from vectors of type to vectors of type , retested, and confirmed that the overflow problem is gone. Also histograms in the NetCDF output files are now of type ncInt64 instead of int.

Ran unit_grid_diag.xml to confirm that all existing tests run fine.

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

    Review the code changes.

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No]
    The existing grid_diag documentation makes no mention of the NetCDF output variable type. So there's no documentation to update.

  • Do these changes include sufficient testing updates? [No]
    I chose not to add a new unit test to exercise integer overflow. Adding a time/compute intensive unit test doesn't seem worth it.

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

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

    The variable types for all existing grid_diag NetCDF output files will change from "int" to "int64".

  • Please complete this pull request review by [8/23/2021].

Pull Request Checklist

See the METplus Workflow for details.

  • 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 Linked issues 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.

…of type long long (<long long>) to avoid integer overflow in the grid_diag tool. Also, update grid_diag to write int64 NetCDF variables instead of int.
@JohnHalleyGotway JohnHalleyGotway linked an issue Aug 20, 2021 that may be closed by this pull request
23 tasks
Copy link
Collaborator

@georgemccabe georgemccabe left a comment

Choose a reason for hiding this comment

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

The change appear to be isolated to changing the C data type from int to long long and the NetCDF data type from ncInt to ncInt64 for a single field. This will likely cause differences in the METplus use case tests because these values will slightly change in the stat output. After this PR and the develop equivalent are merged, the METplus tests should be rerun to ensure that the new differences are isolated to these expected changes. I approve of these changes.

@JohnHalleyGotway JohnHalleyGotway deleted the bugfix_1886_main_v10.0_grid_diag branch August 23, 2021 21:30
@JohnHalleyGotway
Copy link
Collaborator Author

Since @jwolff-ncar is able to run using MET version 10.0.0 after setting up her configuration the way she intended, I will proceed with PR #1888 to fix this in the develop branch and fix it in version 10.1.0. But I will NOT merge in the changes for PR #1887 to fix this for MET version 10.0.1. Changing the Grid-Diag NetCDF output variable from int to int64 seems like too big of a change for a bugfix release, especially since we don't have a user who actually needs it right now.

@JohnHalleyGotway JohnHalleyGotway removed this from the met-10.0.1 (bugfix) milestone Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix integer overflow in Grid-Diag.
2 participants