dtcenter / MET

Model Evaluation Tools
https://dtcenter.org/community-code/model-evaluation-tools-met
Apache License 2.0
74 stars 22 forks source link

Refine Error messages written by PB2NC #2912

Closed JohnHalleyGotway closed 3 weeks ago

JohnHalleyGotway commented 3 weeks ago

Describe the Enhancement

As discussed by @malloryprow during the METplus NOAA User Telecon on June 10, 2024 (see notes), the PB2NC tool is writing the following error message:

ERROR  : compute_pbl() Excluded 7 records

However it continues processing and does not return bad status.

Writing Error messages like this should be reserved for situations where further processing is not possible and should also result in bad status being returned. This is not one of those cases.

Writing Error and Warning messages is extremely problematic when running MET operationally on NOAA machines. This issue is to review the Error and Warning messages being written by PB2NC and revise the logic so that Errors are only written when further processing is not possible.

In addition, pb2nc.cc contains 5 instances of the following:

   if (unit > MAX_FORTRAN_FILE_ID || unit < MIN_FORTRAN_FILE_ID) {
      mlog << Error << "\n" << method_name
           << "Invalid file ID [" << unit << "] between 1 and 99.\n\n";
   }

Recommend consolidating into and calling a single utility function instead. Confirm with @hsoh-u that PB2NC should actually exit with bad status in this case.

Time Estimate

4 hours

Sub-Issues

Consider breaking the enhancement down into sub-issues. None needed

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

Labels

Milestone and Projects

Define Related Issue(s)

Consider the impact to the other METplus components.

Enhancement Checklist

See the METplus Workflow for details.

malloryprow commented 3 weeks ago

@JohnHalleyGotway I put a test file on Hera at /scratch1/NCEPDEV/stmp4/Mallory.Row/gdas.prepbufr.2024060918.

DEBUG 2: Processing 995471 PrepBufr messages... DEBUG 2: PrepBufr Time Center: 20240609_180000 DEBUG 2: Searching Time Window: 20240609_173000 to 20240609_183000 ERROR : ERROR : compute_pbl() Excluded 2 records ERROR : ERROR : compute_pbl() Excluded 13 records