Refine `ERROR` messages written by PB2NC
Closed this issue · 1 comments
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
- 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 a MET-X.Y.Z version, Consider for Next Release, or Backlog of Development Ideas
- For a MET-X.Y.Z version, select the MET-X.Y.Z Development project
Define Related Issue(s)
Consider the impact to the other METplus components.
Enhancement 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 develop.
Branch name:feature_<Issue Number>_<Description>
- Complete the development 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 develop.
Pull request:feature <Issue Number> <Description>
- Define the pull request metadata, as permissions allow.
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 - Iterate until the reviewer(s) accept and merge your changes.
- Delete your fork or branch.
- Close this issue.
@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