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 #2366 pyembed_winds #2371

Merged
merged 7 commits into from
Dec 7, 2022
Merged

Conversation

JohnHalleyGotway
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway commented Dec 6, 2022

This PR includes the following changes:

  1. Enable the level string to be defined for python embedding and stored in VarInfo::LevelInfo::ReqName. This is useful when finding U/V matches.
  2. Refine the Point-Stat and Grid-Stat logic when searching for U/V matches. Only check that the level strings match if at least one of them is non-empty.
  3. Print DEBUG(3) log message to list out which U/V fields array entries match.
    Should I include the magic string (i.e. name/level) in the log message or is the number sufficient?
DEBUG 3: U-wind field array entry 1 matches V-wind field array entry 2.
DEBUG 3: V-wind field array entry 2 matches U-wind field array entry 1.
  1. Print DEBUG(3) log message when U/V matches are not found.
DEBUG 3: U-wind field array entry 3 has no matching V-wind field array entry.
DEBUG 3: V-wind field array entry 4 has no matching U-wind field array entry.
  1. Print WARNING message is multiple U/V matches are found.
    Should this WARNING actually be an error?
DEBUG 3: U-wind field array entry 1 matches V-wind field array entry 2.
DEBUG 3: U-wind field array entry 1 matches V-wind field array entry 4.
WARNING: 
WARNING: GridStatConfInfo::process_config() -> For U-wind, found multiple matching V-wind field array entries! Set the "level" strings to differentiate between them.
WARNING: 

Expected Differences

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

    If yes, please describe:

    While there's no NEW config file option, it does allow the level string to be defined for python embedding.

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

  • Tested Grid-Stat with python embedding for both fcst/obs to get successful runs and trigger Debug/Warning messages.

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

  • Review the code changes.

  • Ensure all GHA runs pass and produce no diffs.

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

  • Do these changes include sufficient testing updates? [Yes or No]
    No new unit tests added.

  • 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 [Wed 12/7/22].

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 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.

…() function. Only enforce this check if the requested levels are non-empty. Note that they ARE empty for python embedding.
…nt a warning message if multiple matches are found. Should this be an error instead?
@JohnHalleyGotway JohnHalleyGotway added this to the MET 11.1.0 milestone Dec 6, 2022
@JohnHalleyGotway JohnHalleyGotway marked this pull request as ready for review December 6, 2022 21:51
…int-Stat and Grid-Stat to call it. Update logic to use the FIRST U/V match found and indicate that in the log message.
… processing via python embedding using fake data.
@JohnHalleyGotway
Copy link
Collaborator Author

JohnHalleyGotway commented Dec 7, 2022

@georgemccabe based on our discussion on 12/6/22, I made the changes seen in these 2 commits:

Note that this will change the contents of an existing output file from the unit tests and will be flagged as a difference.

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.

These changes look good. @JohnHalleyGotway and I met briefly yesterday to discuss the changes. John made some adjustments based on our conversation to reduce duplicate logic and added a unit test to ensure that the new functionality works as expected. The only failed check is due to new output data being generated from the changes to the unit tests.

The truth data will need to be updated after this PR is merged. I approve.

@JohnHalleyGotway JohnHalleyGotway merged commit e81cf04 into develop Dec 7, 2022
@JohnHalleyGotway JohnHalleyGotway deleted the feature_2366_pyembed_winds branch December 7, 2022 19:23
JohnHalleyGotway added a commit that referenced this pull request Dec 12, 2022
Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: Dave Albo <dave@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: Seth Linden <linden@seneca.rap.ucar.edu>
Co-authored-by: johnhg <johnhg@ucar.edu>
Co-authored-by: Lisa Goodrich <lisag@seneca.rap.ucar.edu>
Co-authored-by: jprestop <jpresto@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: Julie Prestopnik <jpresto@seneca.rap.ucar.edu>
Co-authored-by: Jonathan Vigh <jvigh@ucar.edu>
Co-authored-by: hsoh-u <hsoh@ucar.edu>
Co-authored-by: bikegeek <3753118+bikegeek@users.noreply.github.com>
Co-authored-by: davidalbo <dave@ucar.edu>
Co-authored-by: Seth Linden <linden@ucar.edu>
Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
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
Development

Successfully merging this pull request may close these issues.

Fix Point-Stat and Grid-Stat logic for processing U/V winds with python embedding
2 participants