Skip to content

Enhance the set_attr_grid processing logic to support input files lacking a grid definition #1729

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Enhancement

When reading gridded data, often from NetCDF files, the parsing of the grid can cause the MET tool to error out. That means that the grid information in the NetCDF file is either missing or inconsistent. It may be the case that the user is aware of the problem but still wants to process the data in MET. In this situation, it would be nice for users to supply the "set_attr_grid" option to manually define the grid information.

The set_attr_grid option does work BUT only if the library code was successful in actually parsing the grid information from the original files. Any errors in that process will cause the tool to error out. Two options to consider are:

(1) Change the NetCDF library errors to warning messages to prevent the tools from erroring out. But ignoring those warning would lead to bad output.

(2) Check for set_attr_grid PRIOR TO calling the NetCDF library code. Only attempt to parse the grid information from the file if it has not already been set.

Run the following commands with the attached file to demonstrate:

mv MITLL.ProxyEchoTopsCalibratedMosaic.20200831_235328_v_20200831_235328.nc.txt MITLL.ProxyEchoTopsCalibratedMosaic.20200831_235328_v_20200831_235328.nc
plot_data_plane MITLL.ProxyEchoTopsCalibratedMosaic.20200831_235328_v_20200831_235328.nc ~/plot.ps 'name="ProxyEchoTopsCalibratedMosaic"; level="(*,*)";'

This errors out, and defining a grid using "set_attr_grid" does NOT prevent that.

MITLL.ProxyEchoTopsCalibratedMosaic.20200831_235328_v_20200831_235328.nc.txt

Time Estimate

1 day

Sub-Issues

Consider breaking the enhancement down into sub-issues.
No sub-issues required.

Relevant Deadlines

Would be nice to include in 10.0.0 if possible

Funding Source

None

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required: John HG
  • Select scientist(s) or no scientist required: Michelle

Labels

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

Projects and Milestone

  • Review projects and select relevant Repository and Organization ones or add "alert:NEED PROJECT ASSIGNMENT" label
  • Select milestone to next major version milestone 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), Project(s), Milestone, and Linked issues
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions