NCAR / NCAR/wrf-python

Potential Layer Selection Error in Storm Motion Calculation (`wrf_relhl.f90`)

Open
#286 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
498
Forks
178
PR merge metrics
No merged PRs in 30d

Description

Issue Description:​

In wrf_relhl.f90, the storm motion vector is estimated as 75% of the mean wind speed and 30° to the right of the mean wind direction (lines 103-113). This method is similar to Maddox et al. (1976), which computes the mean wind using surface, 850-, 700-, 500-, 300-, and 200-hPa levels. However, a potential layer selection issue exists in the mean wind calculation between 3000–10,000 m AGL:

  1. The code identifies k3(layer at/above 3000 m AGL) and k10(layer at/above 10,000 m AGL) (lines 70–81)
  2. The current loop DO k = k3, k10, -1(lines 87–92) likely includes data abovethe target heights, not strictly between3000–10,000 m AGL.

Proposed Fix:​​

Change the loop to DO k = k3+1, k10+1, -1 to ensure averaging only layers within 3000–10,000 m AGL

​Questions:​​

  1. Why is the 3000–10,000 m AGL layer used? Is the current inclusion of heights outside this range intentional?
  2. Is the proposed fix appropriate to align with the physical intent?

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect wrf_relhl.f90 around lines 70–113, starting with how k3 and k10 are selected and how the DO k = k3, k10, -1 loop averages wind layers. Check the Maddox et al. reference and the physical intent of the 3000–10,000 m AGL range. Done means determining whether the indexing is intentional and documenting or implementing the correct bounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.