Skip to content

Fix Ensemble-Stat failure when verifying against gridded ECMWF GRIB1 files. #1879

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Problem

This issue was raised via METplus Support in dtcenter/METplus#1066.

Ensemble-Stat fails when verifying against gridded ECMWF GRIB1 files with the following error message:

ERROR  : 
ERROR  : VarInfoGrib::add_grib_code() -> unrecognized GRIB1 field abbreviation 'GH' for table version 128
ERROR  :

However multiple GRIB1 records for "GH" do in fact exist:

musial6:met johnhg$ grep '"GH"' data/table_files/grib1_*.txt
data/table_files/grib1_ecmwf_128_98.txt:156 128 98 -1 "GH" "Height" "gpm"
data/table_files/grib1_ecmwf_129_98.txt:156 129 98 -1 "GH" "Height" "m"
data/table_files/grib1_ecmwf_160_98.txt:156 160 98 -1 "GH" "Height" "m"
data/table_files/grib1_ecmwf_200_98.txt:156 200 98 -1 "GH" "Height" "m"

Expected Behavior

This should run without error.

Investigation revealed two issues.

  • In Ensemble-Stat, verifying against grid and point observations are both optional. When verifying against point observations, the obs_info is stored as type VarInfoGrib, by convention. However, the VarInfo::add_grib_code() function was always being called whether or not any point observations were provided. Change this logic to only call add_grib_code() if point obs are actually provided.
  • In the VarInfoGrib::add_grib_code() function, if the user does not specify a value for the center and subcenter using GRIB1_center and GRIB1_subcenter, respectively, then the default values of 7 and 1 are used during lookup. But that's what causes the GH variable not to be found. Recommend the use of these default values in this case.

Environment

Describe your runtime environment:
1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop)
2. OS: (e.g. RedHat Linux, MacOS)
3. Software version number(s)

To Reproduce

Describe the steps to reproduce the behavior:
See dtcenter/METplus#1066 for the command/data to test.

Relevant Deadlines

Include in the MET version 10.0.1 bugfix.

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: John HG
  • Select scientist(s) or no scientist required: no scientist required

Labels

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

Projects and Milestone

  • Select Organization level Project for support of the current coordinated release
  • Select Repository level Project for development toward the next official release or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next bugfix version

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 Linked issues
    Select: Organization level software support Project for the current coordinated release
    Select: Milestone as the next bugfix version
  • 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 Linked issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions