Skip to content

Fix bug in the computation of the climatological CDF value. #1638

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Problem

When testing the verification of the climatology-based probabilities for NOAA/CPC with Grid-Stat, John Opatz discovered an apparent bug in MET's computation of the climatological cumulative distribution function values.

While the issue was identified using CPC data, it is also apparent in the existing unit test output:
climatology/grid_stat_PROB_GFS_CLIMO_1.0DEG_150000L_20120409_120000V_pairs.nc

I also found a bug in derive_climo_prob(). When the observation threshold is defined relative to climatology (e.g. >CDP67), the climatological probability value should be constant. However, the constant value should depend on the inequality type, where <CDP{N} has climo probability p=N/100 while >CDP{N} has probability 1.0-p.

This task is to fix both of these bugs.

Expected Behavior

The climo CDF value is computed as the area (between 0 and 1) of the climo distribution to the left of the observation value. However, MET is not computing that correctly.

Environment

Describe your runtime environment:
1. Machine: NB output on kiowa.

To Reproduce

Describe the steps to reproduce the behavior:
1. Inspect the file: climatology/grid_stat_PROB_GFS_CLIMO_1.0DEG_150000L_20120409_120000V_pairs.nc
2. Using ncview, note the values for i=8, j=77:
obs = 13.1514, climo_mean = 3.21593, climo_stdev = 7.9448, climo_cdf = 0.359584
3. Note that the obs > climo_mean but climo_cdf < 0.5. When the obs value greater than the climo mean, the CDF should be greater than 0.5.

So there's a bug in this computation!

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

2788881

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

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

Projects and Milestone

  • Review projects and select relevant Repository and Organization ones or add "alert:NEED PROJECT ASSIGNMENT" label
  • Select milestone to relevant bugfix version

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), Project(s), Milestone, and Linked issues
  • 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>
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions