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 #2586 GenVxMask improvements #2833

Merged
merged 11 commits into from
Dec 19, 2024

Conversation

georgemccabe
Copy link
Collaborator

Change Summary

  • Add function to properly parse gen_vx_mask command line options to handle options that support multiple items separated by comma within a given option, e.g. -type lat,lon. See commit 191d858
  • Enhanced GenVxMask wrapper to be find input files consistent with other wrappers (part of Enhancement: Refactor wrappers to consistently find input files #2492)
  • Added support for setting file window range separately for input files and mask files
  • Other code cleanup to appease SonarQube and move towards consistent wrappers with fewer wrapper-specific overrides of common functions, e.g. get_command.

Pull Request Testing

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

Review code changes and ensure all tests pass (note land_surface:0 will likely report diffs that are unrelated to the changes in this PR)

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

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

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

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

  • Do these changes introduce new SonarQube findings? [No]

    If yes, please describe:

It should reduce them!

  • Please complete this pull request review by 12/20/2024.

Pull Request Checklist

See the METplus Workflow for details.

  • Add any new Python packages to the METplus Components Python Requirements table.
  • For any new datasets, an entry to the METplus Verification Datasets Guide.
  • 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) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or METplus-Wrappers-X.Y.Z Development project for official releases
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • 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.

…d line arguments that can now contain comma-separated lists that should not be split up into separate items
…MASK_OBS_FILE_WINDOW_BEGIN. This just adds support for an additional variation of the config variable names
… files, progress towards #2492. Allow file window range to be specified separately for mask and input files. Other cleanup to move towards consistent wrappers with fewer wrapper-specific overrides of functions like get_command
…low file window range to be specified separately for mask and input files
@georgemccabe georgemccabe added this to the METplus-6.1.0 milestone Dec 13, 2024
@georgemccabe georgemccabe linked an issue Dec 13, 2024 that may be closed by this pull request
23 tasks
@georgemccabe georgemccabe marked this pull request as ready for review December 13, 2024 22:06
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.

I see that all the tests passed for this PR, including the newly added ones, which is great. So there's no issues with the logic. And I looked through the code changes themselves and don't see any obvious issues.

However, I would recommend modifying the naming conventions for the newly added METplus config options. You added options for GEN_VX_MASK_OBS_FILE... and GEN_VX_MASK_MASK_FILE... to correspond to the setting of gen_vx_mask -input and -mask command line options.

For consistency and clarity, I'd recommend renaming the GEN_VX_MASK_OBS_FILE... options as GEN_VX_MASK_INPUT_FILE... throughout since they control the values for the -input command line option. In the context of gen_vx_mask, there's no distinguishing between forecast and observation. It just process generic data that could come from any source.

…t multiple inputs with labels (used by GridDiag and UserScript wrappers) and typical inputs (all other wrappers). Prior to this change only input templates that have the FCST or OBS identifier were read properly via get_input_templates
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.

I approve of these changes.

@georgemccabe I see that you made the switch from GEN_VX_MASK_OBS_FILE... config options to GEN_VX_MASK_INPUT_FILE... and that all the tests have passed.

Thanks!

@georgemccabe georgemccabe merged commit c1e94d4 into develop Dec 19, 2024
77 checks passed
@georgemccabe georgemccabe deleted the feature_2586_gen_vx_mask_solar_time branch December 19, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

Enhance GenVxMask wrapper to compute time-varying masks using Local Solar Time
2 participants