Skip to content

Fix TC-Stat event equalization logic to include any model name requested using -amodel. #1932

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Problem

@malloryprow raised this issue during the METplus NOAA User Support telecon on 10/5/2021. Here are those meeting notes.

Here's Mallory's comment...
I ran tc_pairs on 4 models (we will call the AMODEL names for them M001, M002, M003, and M004). The files for M001, M002, and M003 all contain paired lines in them, but M004 does not (this is fine/expected). Then I run tc_stat to get track and intensity error by lead for each model (-by LEAD,AMODEL). I also run with -event_equal TRUE. I figured since M004 had no data then the results from tc_stat would be nothing, but there were still results but just for M001, M002, and M003.

This task it to update the event equalization logic for TC-Stat and make sure each model specified using the "-amodel" job command option is included in that logic. Also add or modify a TC-Stat unit test to ensure that the changes work as expected.

Expected Behavior

Any model names specified with "-amodel" should be included in the event equalization logic, whether they actually appear in the data or not.

Environment

Describe your runtime environment:
1. Machine: applies to all
2. OS: applies to all
3. Software version number(s): MET version 10.0.0

To Reproduce

Describe the steps to reproduce the behavior:

  1. Run:
tc_stat -lookin alal2015_PROBRIRW.tcst -job summary -line_type PROBRIRW -column TK_ERR -amodel COMN,GPMN,MISSING -by AMODEL,LEAD -event_equal TRUE

alal2015_PROBRIRW.tcst.gz
2. Inspect the output:

COL_NAME: COLUMN AMODEL    LEAD TOTAL VALID      MEAN  MEAN_NCL  MEAN_NCU     STDEV      MIN       P10       P25       P50       P75       P90        MAX       IQR      RANGE         SUM TS_INT TS_IND FSP_TOTAL FSP_BEST FSP_TIES FSP
SUMMARY:  TK_ERR   COMN 0240000   260   260 222.72978 208.78619 236.67336 114.71309 52.8124   84.07898 123.71341 222.72855 284.23889 367.87103  704.17383 160.52548  651.36143 57909.74188     NA     NA         0        0        0  NA
SUMMARY:  TK_ERR   COMN 0480000   228   228 351.63751 320.96358 382.31145 236.31366 34.39412 115.92493 199.15691 274.34402 454.05481 634.3729  1426.48192 254.8979  1392.0878  80173.35333     NA     NA         0        0        0  NA
SUMMARY:  TK_ERR   COMN 0720000   192   192 472.43013 418.46536 526.3949  381.51611 43.38415 103.88346 234.61319 328.08768 678.68804 874.01067 1886.03088 444.07484 1842.64673 90706.5853      NA     NA         0        0        0  NA
SUMMARY:  TK_ERR   GPMN 0240000   130   130  45.40465  41.42969  49.37961  23.12365  5.64173  18.46281  26.7882   42.72731  58.32256  78.30917  123.71258  31.53436  118.07085  5902.60426     NA     NA         0        0        0  NA
SUMMARY:  TK_ERR   GPMN 0480000   228   228  85.79019  80.32981  91.25056  42.067    5.45977  37.80466  55.23943  81.26444 116.93925 133.75388  218.38121  61.69982  212.92144 19560.16252     NA     NA         0        0        0  NA
SUMMARY:  TK_ERR   GPMN 0720000   192   192 154.07763 141.16071 166.99455  91.31907 11.19544  61.00199  84.73798 128.63001 200.29452 282.93517  426.85334 115.55655  415.6579  29582.90544     NA     NA         0        0        0  NA
  1. This produces output for 6 cases, but there should be no output because MISSING doesn't exist!

  2. Additionally, there is a bug in the develop branch. The formatting of the LEAD output is not correct in develop:

COL_NAME: COLUMN AMODEL    LEAD TOTAL VALID      MEAN  MEAN_NCL  MEAN_NCU     STDEV      MIN      P10       P25       P50       P75       P90        MAX       IQR      RANGE          SUM TS_INT TS_IND FSP_TOTAL FSP_BEST FSP_TIES     FSP
SUMMARY:  TK_ERR   COMN 0000001   680   680 336.45541 315.88665 357.02418 273.66203 34.39412 96.15287 164.1326  260.49815 407.34043 677.11683 1886.03088 243.20783 1851.63676 228789.68051     NA     NA       680       74      354 0.10882
SUMMARY:  TK_ERR   GPMN 0000001   550   550 100.08304  93.84523 106.32085  74.63898  5.45977 29.06728  50.43702  80.49223 123.55049 198.03374  426.85334  73.11347  421.39357  55045.67222     NA     NA       680      252      354 0.37059

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

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

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.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions