What's wrong?
While upgrading petss/1.4.5, I found that diffoutputdirs reported changes in WMO headers between production and parallel runs. This was concerning for what was intended to be a minimal upgrade. Output from diffoutputdirs can be found at:
/lfs/h1/nco/idsb/noscrub/russell.manser/projects/petss_v1_4_5/diffoutputdirs/prod_para/diffoutputdirs.*etss.20260628.log
After some discussion with other team members and the developers, I compared WMO headers with the following short script.
#!/bin/bash
# Search for WMO headers in two files, then compare the results
#
# See the following: https://www.weather.gov/tg/headef
file1=$1
file2=$2
if [[ -z "${file1}" || -z "${file2}" ]]; then
echo "Usage $0: file1 file2"
exit 1
fi
diff <(strings "${file1}" | grep -E "[A-Z]{4}[0-9]{2}\ .*\ [0-9]{6}") \
<(strings "${file2}" | grep -E "[A-Z]{4}[0-9]{2}\ .*\ [0-9]{6}")
This script did not report any differences in WMO headers.
Proposed Solution
I suggest adding unit tests for diffoutputdirs to identify its intended behavior and locate any bugs. Once that is complete, I optionally suggest refactoring the script and improving its readability.
What's wrong?
While upgrading petss/1.4.5, I found that
diffoutputdirsreported changes in WMO headers between production and parallel runs. This was concerning for what was intended to be a minimal upgrade. Output fromdiffoutputdirscan be found at:/lfs/h1/nco/idsb/noscrub/russell.manser/projects/petss_v1_4_5/diffoutputdirs/prod_para/diffoutputdirs.*etss.20260628.logAfter some discussion with other team members and the developers, I compared WMO headers with the following short script.
This script did not report any differences in WMO headers.
Proposed Solution
I suggest adding unit tests for
diffoutputdirsto identify its intended behavior and locate any bugs. Once that is complete, I optionally suggest refactoring the script and improving its readability.