Skip to content

Fix IODA2NC bug rejecting all input observations in unit tests #1922

@hsoh-u

Description

@hsoh-u

Replace italics below with details for this issue.

Describe the Problem

The unitest of ioda2nc was failed with the nightly build. It was not duplicated by the manual runs of ioda2nc unit-test. But it happened rarely. The log message shows all records were rejected by station_id ("KEKA" only, should be 2 records for KEKA station) when this happened.

Command at unit test:

export MASK_GRID=''
export MASK_POLY=''
export MESSAGE_TYPE=''
export STATION_ID='"KEKA"'

/d1/projects/MET/MET_regression/develop/NB20210916/MET-develop/met/share/met/../../bin/ioda2nc   /d1/projects/MET/MET_test_data/unit_test/obs_data/ioda/ioda.NC001007.2020031012.nc ioda.NC001007.2020031012.mask_sid.nc -config /d1/projects/MET/MET_regression/develop/NB20210916/MET-develop/test/config/IODA2NCConfig_mask -v 2

Log messages when the problem happened:

DEBUG 2: Total records processed                = 10
DEBUG 2: Rejected based on message type         = 0
DEBUG 2: Rejected based on station id           = 10  (should be 8)
DEBUG 2: Rejected based on valid time           = 0
DEBUG 2: Rejected based on masking grid         = 0
DEBUG 2: Rejected based on masking polygon      = 0
DEBUG 2: Rejected based on elevation            = 0
DEBUG 2: Rejected based on zero observations    = 0
DEBUG 2: Total Records retained                 = 0
DEBUG 2: Total observations retained or derived = 0
DEBUG 1: Obs time between 19700101_000000 and 19700101_000000
WARNING:
WARNING: process_ioda_file()  -> No IODA records retained from file: /d1/projects/MET/MET_test_data/unit_test/obs_data/ioda/ioda.NC001007.2020031012.nc
WARNING:
ERROR  :
ERROR  : write_netcdf_hdr_data() -> No IODA records retained.  Nothing to write.
ERROR  :

Expected Behavior

It should retain 2 records and no failure with the unit test.

Environment

Describe your runtime environment:
1. Machine: (Linux Workstation: liowa)
2. OS: (e.g. RedHat Linux)
3. Software version number(s): 10.1.0 beta 3

To Reproduce

Describe the steps to reproduce the behavior:

Command to test:

export MASK_GRID=''
export MASK_POLY=''
export MESSAGE_TYPE=''
export STATION_ID='"KEKA"'

./ioda2nc   /d1/projects/MET/MET_test_data/unit_test/obs_data/ioda/ioda.NC001007.2020031012.nc ioda.NC001007.2020031012.mask_sid.nc -config /d1/projects/MET/MET_regression/develop/NB20210916/MET-develop/test/config/IODA2NCConfig_mask -v 2

Expected log messages:

DEBUG 2: Total records processed                = 10
DEBUG 2: Rejected based on message type         = 0
DEBUG 2: Rejected based on station id           = 8
DEBUG 2: Rejected based on valid time           = 0
DEBUG 2: Rejected based on masking grid         = 0
DEBUG 2: Rejected based on masking polygon      = 0
DEBUG 2: Rejected based on elevation            = 0
DEBUG 2: Rejected based on zero observations    = 0
DEBUG 2: Total Records retained                 = 2
DEBUG 2: Total observations retained or derived = 2
DEBUG 1: Obs time between 19700101_000000 and 19700101_000000
and no WARNING nor ERROR 

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: no scientist

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

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions