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 1965 ioda2nc same input #2006

Merged
merged 6 commits into from
Jan 12, 2022
Merged

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Jan 11, 2022

  • The duplicated variable names are filtered.
  • The output variable names from the config file are processed just before saving NetCDF file
  • Use the raw variable names for internal processing.

Expected Differences

  • 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:

Ran two commands: with/without -iodafile

Command 1: without -iodafile option (no error)

/d1/personal/hsoh/git/pull_request/MET_feature_1965_ioda2nc_same_input/met/bin/ioda2nc /d1/personal/hsoh/data/IODA_files/ioda.NC001007.2020031012.nc out_ioda.NC001007.2020031012.nc_units.nc /d1/projects/MET/MET_regression/develop/NB20210916/MET-develop/test/config/IODA2NCConfig_mask -v 2

Command 2: with -iodafile and the same input file name (failed to generate output before)

/d1/personal/hsoh/git/pull_request/MET_feature_1965_ioda2nc_same_input/met/bin/ioda2nc /d1/personal/hsoh/data/IODA_files/ioda.NC001007.2020031012.nc out_ioda.NC001007.2020031012.nc_units.nc /d1/projects/MET/MET_regression/develop/NB20210916/MET-develop/test/config/IODA2NCConfig_mask -iodafile /d1/personal/hsoh/data/IODA_files/ioda.NC001007.2020031012.nc -v 2

The problem was the same variable names were added twice into the variable name list.

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

Do the similar test with different input file or run unit test for ioda2nc.
Or run METplus script you have.

  • 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? [Yes]

Added one more unit test, "ioda2nc_same_input".

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

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

One more output file from the unit test: ioda2nc/ioda.NC001007.2020031012.same_input.nc

  • Please complete this pull request review by [Fill in date].

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.

@hsoh-u hsoh-u added this to the MET 10.1.0 milestone Jan 11, 2022
@hsoh-u hsoh-u linked an issue Jan 11, 2022 that may be closed by this pull request
22 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.

I ran some tests using the feature branch executable on kiowa and confirmed that the expected behavior occurred. I modified the IODA2NC.conf METplus use case conf file to include a duplicate input file. I ran the use case using this branch and confirmed that it ran successfully and skipped the duplicate file. I ran the use case again on the latest MET beta on kiowa and confirmed that it fails.

I made one inline comment about a variable that appears to be uninitialized when it is used unless it is being set by the command in the if-block that is run before the line in question. Once that is fixed or if I am misunderstanding what is happening here, then I approve of this pull request.

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.

I misunderstood the logic in my first review. The changes look good.

@hsoh-u hsoh-u merged commit 1e97085 into develop Jan 12, 2022
@hsoh-u hsoh-u deleted the feature_1965_ioda2nc_same_input branch January 12, 2022 01:12
@hsoh-u hsoh-u restored the feature_1965_ioda2nc_same_input branch January 12, 2022 18:19
@hsoh-u hsoh-u deleted the feature_1965_ioda2nc_same_input branch January 12, 2022 21:36
JohnHalleyGotway added a commit that referenced this pull request Jan 16, 2022
#2016)

Co-authored-by: Julie Prestopnik <[email protected]>
Co-authored-by: johnhg <[email protected]>
Co-authored-by: Seth Linden <[email protected]>
Co-authored-by: John Halley Gotway <[email protected]>
Co-authored-by: j-opatz <[email protected]>
Co-authored-by: Howard Soh <[email protected]>
Co-authored-by: John Halley Gotway <[email protected]>
Co-authored-by: jprestop <[email protected]>
Co-authored-by: Seth Linden <[email protected]>
Co-authored-by: hsoh-u <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: John Halley Gotway <[email protected]>
Co-authored-by: MET Tools Test Account <[email protected]>
Co-authored-by: mo-mglover <[email protected]>
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 IODA2NC to handle the same input file being provided multiple times
2 participants