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

Feature 1852 netcdf api for exceeding the start and the count #1854

Merged
merged 2 commits into from
Jul 16, 2021

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Jul 13, 2021

Pull Request Testing

  • Describe testing already performed for these changes:

None. I have no case of this. John reported this happened with madis2nc on Mac but he was not duplicate the problem on kiowa.

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

Running the regular unit test and making sure nothing is changed.

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

  • Do these changes include sufficient testing updates? [No]

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

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

  • Please complete this pull request review by [7/16/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.

Summary:

  • nc_utils.cc
    • Check the start and the count exceed the actual data range before calling NetCDF API and give the proper log message
  • madis2nc.
    • Removed nc_buf_size was initialized but not used.
    • Make "long *cur" and "long *dim" the same size
    • madis2nc allocates the memory for 3D and uses it for 2D variables, too because they are handled by the NetCDF API. (It checks the variable dimension and reconstructs the cur array and the dim array)

@hsoh-u hsoh-u added this to the MET 10.1.0 milestone Jul 13, 2021
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

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

These changes look fine to me, enhancing MET to print more useful error messages prior to the NetCDF library exiting out with less useful error messages.

@hsoh-u hsoh-u merged commit 4860a62 into develop Jul 16, 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.

2 participants