Skip to content

Bugfix: Fix STAT-Analysis handling of zero-length vectors when aggregating MPR inputs and writing WDIR or VCNT outputs #3210

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Problem

As described in the dtcenter/METplus#3061 discussion from @JohnWagner, three fixes are needed for the STAT-Analysis WDIR job:

  1. There is an obvious bug where the value cnt_logic is logged to the output where wind_logic should clearly be used.
  2. When computing WDIR output in the main_v11.0 and main_v11.1 branches (e.g. v11.0.3 tag), 0-length vectors, for which the wind direction is undefined, are automatically excluded from the ROW_MEAN_WDIR output. This check was removed from main_v12.0 for issue Add new wind direction verification statistics for RMSE, Bias, and MAE #2395 to provide generate consistent output from the VCNT line type when computed by Point-Stat and STAT-Analysis.

Recommend revisiting and refining this logic by restoring that check, but only applying it when WDIR output is requested. For other vector outputs, like VCNT and VL1L2, use the same logic applied in Point-Stat.

  1. When aggregating vector MPR inputs and writing VCNT outputs, the counts in the TOTAL_DIR column do not match the output from Point-Stat. Instead, TOTAL_DIR = TOTAL when it should be that TOTAL_DIR = TOTAL minus the number pairs containing zero length vectors.

Recommend correcting this behavior in the main_v12.0, main_v12.1, and develop branches.

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 the next bugfix version
  • Select METplus-X.Y Support project for support of the current coordinated release
  • Select MET-X.Y Development project for development toward the next coordinated release

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.
  • Push local changes to GitHub.
  • Submit a pull request to merge into main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next bugfix version
    Select: METplus-X.Y Support project for support of the current coordinated release
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    Branch name: bugfix_<Issue Number>_develop_<Description>
    Pull request: bugfix <Issue Number> develop <Description>
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next official version
    Select: MET-X.Y Development project for development toward the next coordinated release
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

Status

🏁 Done

Status

🏁 Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions