Skip to content

Bugfix: Fix the parsing of level values for GRIB2 template 4.48 data #2782

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Problem

While working on verification of the RRFS smoke output, @michelleharrold ran into an issue with GRIB2 support in MET version 11.1.0. The MET GRIB2 internal library lacks support for Table 4.48 in which MASSDEN data is stored:

1:0:d=2023121700:MASSDEN:8 m above ground:36 hour fcst:aerosol=Particulate organic matter dry:aerosol_size <2.5e-06:
2:3572352:d=2023121700:MASSDEN:8 m above ground:36 hour fcst:aerosol=Dust dry:aerosol_size <2.5e-06:
3:6906561:d=2023121700:MASSDEN:8 m above ground:36 hour fcst:aerosol=Dust dry:aerosol_size >=2.5e-06,<1e-05:

This issue is to:

  1. (For MET-12.0.0 and MET-11.1.1) Fix the MetGrib2DataFile::read_grib2_record_list() function to support data stored in template 4.48, ensuring that the level type and value match Z8 as expected for the data listed below.
  2. (For MET-12.0.0 and MET-11.1.1) Update these log messages listed below to include the template number (4.48) in them to make it easier to find the GRIB2 documentation:
 MetGrib2DataFile::data_plane() -> Using the first of 3 matching records for "MASSDEN/L0":
WARNING: record 806 field 1: ipdtmpl[26] = 20, 0, 62010, 0, 7, 25, 0, 0, 255, 0, 0, 0, 0, 2, 0, 134, 0, 0, 1, 36, 103, 0, 8, 255, 0, 0
WARNING: record 807 field 1: ipdtmpl[26] = 20, 0, 62001, 0, 7, 25, 0, 0, 255, 0, 0, 0, 0, 2, 0, 134, 0, 0, 1, 36, 103, 0, 8, 255, 0, 0
WARNING: record 808 field 1: ipdtmpl[26] = 20, 0, 62001, 2, 7, 25, 7, 100, 255, 0, 0, 0, 0, 2, 0, 134, 0, 0, 1, 36, 103, 0, 8, 255, 0, 0
  1. (Only for MET-12.0.0) Add new GRIB2 filtering options for GRIB2_aerosol_type = integer and GRIB2_aerosol_size = threshold to filter these MASSDEN records without resorting to using the fallback GRIB2_ipdtmpl_index and GRIB2_ipdtmpl_val options.

Expected Behavior

Parse GRIB2 data for Table 4.48.

Environment

Describe your runtime environment:
Tested on both Mac and on the NOAA/Jet HPC machine.

To Reproduce

Describe the steps to reproduce the behavior:
Use sample file rrfs_MASSDEN.grib2.gz to run:

plot_data_plane rrfs_MASSDEN.grib2 plot.ps 'name="MASSDEN"; level="L0";'
# Note these warnings
WARNING: 
WARNING: MetGrib2DataFile::data_plane() -> Using the first of 3 matching records for "MASSDEN/L0":
WARNING: record 806 field 1: ipdtmpl[26] = 20, 0, 62010, 0, 7, 25, 0, 0, 255, 0, 0, 0, 0, 2, 0, 134, 0, 0, 1, 36, 103, 0, 8, 255, 0, 0
WARNING: record 807 field 1: ipdtmpl[26] = 20, 0, 62001, 0, 7, 25, 0, 0, 255, 0, 0, 0, 0, 2, 0, 134, 0, 0, 1, 36, 103, 0, 8, 255, 0, 0
WARNING: record 808 field 1: ipdtmpl[26] = 20, 0, 62001, 2, 7, 25, 7, 100, 255, 0, 0, 0, 0, 2, 0, 134, 0, 0, 1, 36, 103, 0, 8, 255, 0, 0
WARNING: Try setting the 0-based "GRIB2_ipdtmpl_index" and "GRIB2_ipdtmpl_val" config file options to select one.
WARNING:

Enhance MET to support:

plot_data_plane rrfs_MASSDEN.grib2 plot.ps 'name="MASSDEN"; level="Z8"; GRIB2_aerosol_type=62010; GRIB2_aersol_size=<2.5e-06;'

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

2784533 - NOAA R2O RRFS TnE2

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

Metadata

Metadata

Type

No type

Projects

Status

🏁 Done

Relationships

None yet

Development

No branches or pull requests

Issue actions