updraft_helicity (calc_uh.f90): vorticity divides by MAPFAC_M instead of multiplying — UH biased by 1/m²
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
Hướng nghiên cứu
Start by reading fortran/calc_uh.f90 in DCALCUH and trace how mapfct is supplied by get_uh in g_helicity.py. Compare the map-factor handling with the WRF and wrf-python vorticity implementations cited in the issue, then validate against UP_HELI_MAX on a Mercator-domain wrfout file. Done means the UH agrees with the reference and the lowest-layer height offset is assessed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In fortran/calc_uh.f90 (DCALCUH), the vertical vorticity used in updraft helicity is computed as
tem1(i,j,k) = (0.5*(w(i,j,k)+w(i,j,k+1)))*((vs(i+1,j,k) - vs(i-1,j,k))/(twodx*mapfct(i,j)) - &
(us(i,j+1,k) - us(i,j-1,k))/(twody*mapfct(i,j)))
with mapfct = MAPFAC_M (from get_uh in g_helicity.py). WRF defines the map scale factor as the ratio of grid distance to distance on the Earth (Skamarock et al., WRF tech note), so a physical derivative is m * Δ/Δx, not Δ/(m Δx). Two other implementations agree on multiplying:
- WRF's own online UH (
cal_helicityindyn_em/module_diffusion_em.F):rvort = mm*(rdx*(v/msfvy diff) - ...)withmm = msfux*msfvy, i.e. ≈ m·∂v/∂x. - wrf-python's own
DCOMPUTEABSVORT/DCOMPUTEPV(wrf_pvo.f90):u/msfu ... /dsy*mmwithmm = msft*msft.
So wrf-python's UH ≈ (true UH)/m², and it differs from WRF's UP_HELI_MAX by the same factor. Typical sizes of the bias:
| projection | 1/m² across domain |
|---|---|
| LCC 30/60 (WRF default), 22–52°N | 0.92 – 1.07 |
| LCC 38.5 (HRRR-like), 22–52°N | 0.92 – 1.00 |
| Mercator true lat 0, 0–40° | 1.00 → 0.59 (−12% at 20°, −25% at 30°) |
| Mercator true lat 30, 0–40° | 1.33 → 0.78 |
| polar stereographic true lat 60, 45–90°N | 0.84 → 1.15 |
Since UH is usually used with fixed thresholds (25–75 m² s⁻²) as a severe-storm surrogate, this matters most for Mercator/tropical domains and parts of a domain far from the true latitudes.
Suggested fix: replace /(twodx*mapfct(i,j)) with *mapfct(i,j)/twodx, and likewise for dy. A fuller version would follow wrf_pvo.f90 (divide u and v by their staggered map factors, then multiply by msft²).
Minor, same routine: the 2–5 km layer is measured from zp(i,j,2) (the first staggered level above ground, an ARPS indexing convention where k = 2 is the surface) rather than the terrain height zp(i,j,1). This shifts the layer up by the depth of the lowest model layer.
I haven't been able to run this on a wrfout file here (code-reading audit against WRF's own implementation). A quick check is to compare getvar(f, "updraft_helicity") with WRF's UP_HELI_MAX on a Mercator domain. Happy to open a PR.
— Mark L. Morrissey, Professor Emeritus of Meteorology (University of Oklahoma)
- Ngôn ngữ chính
- Python
- Star
- 504
- Fork
- 179
- Merge trung bình
- 3 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NCAR/wrf-python
-
Add netCDF4 dependency and/or make it truly optionalCó thể làm lại được @kafitzgerald đã nhận 290 ngày trước và không có pull request nào đang mở. Đang mở
NCAR/wrf-python#309 · 1 người được giao ·
-
Windows builds on conda-forgeĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
NCAR/wrf-python#307 · 5 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
NCAR/wrf-python#286 · 3 bình luận ·
-
Windows builds and testingĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
NCAR/wrf-python#282 · 1 bình luận ·
-
PyPI releasesCó thể làm lại được @kafitzgerald đã nhận 507 ngày trước và không có pull request nào đang mở. Đang mở
NCAR/wrf-python#274 · 5 bình luận · 1 reaction · 1 người được giao ·
Tất cả issue của NCAR/wrf-python
Issue tương tự
-
docs(contributing): the two things that silently block a PRCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởavailable documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100
Nixitov/Riptide-Native#944 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
JTHCode/secretguard#24 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: middleware documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainer thường phản hồi trong vòng 1 ngày