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

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

Closed
22 tasks
JohnHalleyGotway opened this issue Dec 2, 2022 · 0 comments · Fixed by #2371 or #2376
Closed
22 tasks
Assignees
Labels
component: user support User support issue MET: Python Embedding priority: medium Medium Priority reporting: DTC NCAR Base NCAR Base DTC Project reporting: DTC NOAA R2O NOAA Research to Operations DTC Project requestor: Community General Community type: bug Fix something that is not working
Milestone

Comments

@JohnHalleyGotway
Copy link
Collaborator

JohnHalleyGotway commented Dec 2, 2022

Describe the Problem

This issue arose while investigating dtcenter/METplus#1931. The specific issue for this discussion topic can be seen on this line of grid_stat_conf_info.cc. When using python embedding to read U and V wind data, the calls to req_level_name() return empty ConcatStrings. However, since empty ConcatStrings are NOT considered to be equal, the code never finds U/V matches, and never writes VL1L2 output.

Could modify the is_uv_match() logic to handle the fact that these requested level strings are always empty. This enables the python U/V matching logic to succeed. However, we would NOT be able distinguish between multiple levels being provided via python embedding.

We could also support the specification of level string in python embedding. That'd enable us to distinguish between different levels.

When checking for U/V matches, look for MULTIPLE matches and print a warning message if that happens.

Expected Behavior

Provide a clear and concise description of what you expected to happen here.

Environment

Describe your runtime environment:
1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop)
2. OS: (e.g. RedHat Linux, MacOS)
3. Software version number(s)

To Reproduce

Describe the steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
Post relevant sample data following these instructions:
https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk#ftp

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Organization level Project for support of the current coordinated release
  • Select Repository level Project for development toward the next official release or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next bugfix version

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of main_<Version>.
    Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
  • Fix the bug and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Linked issues
    Select: Organization level software support Project for the current coordinated release
    Select: Milestone as the next bugfix version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    Branch name: bugfix_<Issue Number>_develop_<Description>
    Pull request: bugfix <Issue Number> develop <Description>
    Select: Reviewer(s) and Linked issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added type: bug Fix something that is not working component: user support User support issue requestor: Community General Community alert: NEED ACCOUNT KEY Need to assign an account key to this issue MET: Python Embedding labels Dec 2, 2022
@JohnHalleyGotway JohnHalleyGotway added this to the MET 11.0.0 milestone Dec 2, 2022
@JohnHalleyGotway JohnHalleyGotway self-assigned this Dec 2, 2022
JohnHalleyGotway added a commit that referenced this issue Dec 5, 2022
…() function. Only enforce this check if the requested levels are non-empty. Note that they ARE empty for python embedding.
@JohnHalleyGotway JohnHalleyGotway changed the title Fix ConcatString logic so that empty strings are considered to be equal. Fix logic to support processing of U/V winds with python embedding in Grid-Stat and Point-Stat. Dec 6, 2022
JohnHalleyGotway added a commit that referenced this issue Dec 6, 2022
…nt a warning message if multiple matches are found. Should this be an error instead?
@JohnHalleyGotway JohnHalleyGotway linked a pull request Dec 6, 2022 that will close this issue
15 tasks
JohnHalleyGotway added a commit that referenced this issue Dec 7, 2022
…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.
JohnHalleyGotway added a commit that referenced this issue Dec 7, 2022
… processing via python embedding using fake data.
@JohnHalleyGotway JohnHalleyGotway removed the alert: NEED ACCOUNT KEY Need to assign an account key to this issue label Dec 9, 2022
@JohnHalleyGotway JohnHalleyGotway changed the title Fix logic to support processing of U/V winds with python embedding in Grid-Stat and Point-Stat. Fix Point-Stat and Grid-Stat for processing U/V winds with python embedding Dec 9, 2022
@JohnHalleyGotway JohnHalleyGotway changed the title Fix Point-Stat and Grid-Stat for processing U/V winds with python embedding Fix Point-Stat and Grid-Stat logic for processing U/V winds with python embedding Dec 9, 2022
@JohnHalleyGotway JohnHalleyGotway linked a pull request Dec 12, 2022 that will close this issue
@TaraJensen TaraJensen added reporting: DTC NCAR Base NCAR Base DTC Project reporting: DTC NOAA R2O NOAA Research to Operations DTC Project labels Jan 25, 2023
@JohnHalleyGotway JohnHalleyGotway added the priority: medium Medium Priority label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: user support User support issue MET: Python Embedding priority: medium Medium Priority reporting: DTC NCAR Base NCAR Base DTC Project reporting: DTC NOAA R2O NOAA Research to Operations DTC Project requestor: Community General Community type: bug Fix something that is not working
Projects
No open projects
2 participants