-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Describe the New Feature
This is a request from the UK MetOffice made during the METplus MetOffice telecon on 5/5/2022. @robdarvell ran gen_vx_mask on a rotated lat/lon grid and was surprised by the result. Using a polyline consisting of 4 points, he found that the edges of the resulting mask were curved rather than straight lines.
The existing -type poly
option is performed in lat/lon space. The user provides a polyline consisting of lat/lon points. gen_vx_mask loops through all of the grid points, converts each from (x, y) to (lat, lon) space, and determines if that (lat, lon) point falls inside the lat/lon polyline.
The task here is to add a new option for -type poly_xy
. While the user still provides a polyline consisting of lat/lon points, those points are converted into grid (x, y) space. gen_vx_mask loops through all of the grid points and determines if each (x, y) grid point falls inside the x/y polyline.
The former produces straight lines on the earth while the latter produces straight lines on the grid. Both are reasonable approaches.
Also note that the MetOffice would like to add a coordinates
variable attribute to gridded NetCDF output written by MET. That change would apply to masks written by Gen-Vx-Mask as well as the many other MET tools that write gridded NetCDF output.
Acceptance Testing
- Add new
-type poly_xy
option and add a unit test to demonstrate it. - Confirm that the gridded NetCDF output files written by MET include the
coordinates = "lat lon";
variable attribute.
Time Estimate
4 hours.
Sub-Issues
Consider breaking the new feature down into sub-issues.
None needed.
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
MetOffice support key (2799991)
Define the Metadata
Assignee
- Select engineer(s) or no engineer required: @JohnHalleyGotway
- Select scientist(s) or no scientist required: @robdarvell
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.
- METplus, MET, METdatadb, METviewer, METexpress, METcalcpy, METplotpy
- Coordinate with @georgemccabe to determine if an update to the Gen-Vx-Mask wrapper is needed.
New Feature 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.