Skip to content

Bugfix: Fix NetCDF CF convention support to read Stage IV precipitation files #3358

Description

@JohnHalleyGotway

Describe the Problem

Stage IV precipitation data is available publicly from a few different sources, for different regions and accumulation intervals, and in different file formats.

The NCAR GDEX record d507005 provides it in GRIB2 format, with the data lagging approx 1 month behind. It contains files for 1, 6, and 24 hour accumulations. That data is useful for retrospective studies. And MET processes this data just fine.

NOAA also now provides StageIV data in a CF-compliant NetCDF format, described at https://water.noaa.gov/about/precipitation-data-access. However, MET errors out when attempting to read this data.

Expected Behavior

This issue is to fix MET's support of the NetCDF CF convention so that it can parse these NetCDF Stage IV dataset without error.

To Reproduce

Describe the steps to reproduce the behavior:

> wget https://water.noaa.gov/resources/downloads/precip/stageIV/2026/01/13/nws_precip_1day_20260113_conus.nc
> met-12.2.0/bin/plot_data_plane nws_precip_1day_20260113_conus.nc st4.ps 'name="observation"; level="(*,*)";'
WARNING: NcCfFile::get_grid_mapping_polar_stereographic() -> The X coordinates (Meter) must be in meters or kilometers for MET.
ERROR  : NcCfFile::update_grid(Grid &) -> Grid is not ready

I'll note that changing the units from Meter to meter does indeed enable MET to read the data, although other problems are revealed by the resulting plot:

met-12.2.0/bin/plot_data_plane nws_precip_1day_20260113_conus_PATCH.nc plot.ps 'name="observation"; level="(*,*)";'
Image

Replotting with the range (0, 5) improves things slightly:

met-12.2.0/bin/plot_data_plane nws_precip_1day_20260113_conus_PATCH.nc plot.ps 'name="observation"; level="(*,*)";' -plot_range 0 5
Image

Here are 3 issues:

  1. Update the MET library code to make unit checking case-insensitive.
  2. Clearly the grid is upside down in MET. That should be fixed.
  3. For some reason, there are spurious values of -10000 over Canada. But that's likely a data problem and not a software problem.

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

  • Review default alert labels
  • Select component(s)
  • Select priority
  • Select requestor(s)

Milestone and Projects

  • Select Milestone as the next bugfix version
  • Select METplus-X.Y Support project for support of the current coordinated release
  • Select MET-X.Y Development project for development toward the next coordinated release

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 Development issue
    Select: Milestone as the next bugfix version
    Select: METplus-X.Y Support project for support of the current coordinated release
  • 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 Development issue
    Select: Milestone as the next official version
    Select: MET-X.Y Development project for development toward the next coordinated release
  • Close this issue.

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
🩺 Needs Triage
Status
🩺 Needs Triage

Relationships

None yet

Development

No branches or pull requests

Issue actions