Skip to content

Fix Gen-Vx-Mask to handle named grids and grid specification strings for -type grid #1993

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Enhancement

While developing commands to enhance the online tutorial for gen_vx_mask, we ran into two commands that we expected to work that do not. The usage statement indicates that calling gen_vx_mask in this way should work. This issue is to fix gen_vx_mask to handle the following:

  • Run with "-type grid" where "mask_file" is set to a named grid.
gen_vx_mask G004 G130 named_grid_mask.nc -type grid
ERROR  : grd_file_type() -> file does not exist "G130"
  • Run with "-type grid" where "mask_file" is set to a grid specification string.
gen_vx_mask G004 "latlon 200 100 -40 -50 0.5 0.5" grid_spec_mask.nc -type grid
ERROR  : grd_file_type() -> file does not exist "latlon 200 100 -40 -50 0.5 0.5"

Here's a selection from the gen_vx_mask usage statement:

"mask_file" defines the masking information (required).
...
For "grid" masking, specify a named grid, the path to a gridded data file, or an explicit grid specification.

So the two examples listed above should work! Once fixed, be sure to update unit_gen_vx_mask.xml to include these new variations.

Time Estimate

1 day.

Sub-Issues

Consider breaking the enhancement down into sub-issues.
None needed.

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: @JohnHalleyGotway
  • Select scientist(s) or no scientist required: no scientist needed

Labels

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

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

Enhancement 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 develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development 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 develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Linked issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions