dtcenter / MET

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

Feature #2911 tc_stat_set_hdr #2916

Closed JohnHalleyGotway closed 2 weeks ago

JohnHalleyGotway commented 3 weeks ago

These changes enhance TC-Stat to support the -set_hdr job command option. This is already supported by Stat-Analysis but needs to be added for TC-Stat. There are many more files modified here than I originally intended.

This is now supported for both the -job filter and -job rirw job types. While implementing this for TC-Stat, I decided to add StatHdrColumns::apply_set_hdr_opts() and TCHdrColumns::apply_set_hdr_opts() member functions. With those in place, I updated Stat-Analysis and the GSI tools to call that common library functionality. This should help with providing and maintaining consistent functionality across tools.

I had to make some mods to core libraries to support these changes.

Expected Differences

Pull Request Testing

Pull Request Checklist

See the METplus Workflow for details.

JohnHalleyGotway commented 3 weeks ago

Here are the differences flagged in the GHA testing.yml workflow:

COMPARING tc_stat/ALAL2010_AHWI_ri.tcst
file1: /data/output/met_test_truth/tc_stat/ALAL2010_AHWI_ri.tcst
file2: /data/output/met_test_output/tc_stat/ALAL2010_AHWI_ri.tcst
ERROR: header information mismatch in column DESC

SUMMARY for non-bootstrap numerical values
# comparisons: 0
# differences: 0

ERROR: failed tests for TCST_TCMPR: hdr

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

COMPARING tc_stat/ALAL2010_AHWI_rw.tcst
file1: /data/output/met_test_truth/tc_stat/ALAL2010_AHWI_rw.tcst
file2: /data/output/met_test_output/tc_stat/ALAL2010_AHWI_rw.tcst
ERROR: header information mismatch in column DESC

SUMMARY for non-bootstrap numerical values
# comparisons: 0
# differences: 0

ERROR: failed tests for TCST_TCMPR: hdr

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

COMPARING tc_stat/ALAL2010_rirw.stat
file1: /data/output/met_test_truth/tc_stat/ALAL2010_rirw.stat
file2: /data/output/met_test_output/tc_stat/ALAL2010_rirw.stat
ERROR: header information mismatch in column DESC
ERROR: header information mismatch in column DESC

SUMMARY for non-bootstrap numerical values
# comparisons: 0
# differences: 0

ERROR: failed tests for CTC: hdr
ERROR: failed tests for CTS: hdr

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

COMPARING tc_stat/PROBRIRW_filter_ee.tcst
file1: /data/output/met_test_truth/tc_stat/PROBRIRW_filter_ee.tcst
file2: /data/output/met_test_output/tc_stat/PROBRIRW_filter_ee.tcst
ERROR: header information mismatch in column DESC
ERROR: header information mismatch in column DESC

I manually inspected the diffs in these files and confirmed that they're all intended based on the -set_hdr options I added to the existing TC-Stat jobs.