WRF-python post-processing wind speed issues
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 498
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
Recently, I used uvmet from WRF-Python to extract the U and V components of wind velocity. However, when I extracted the composite wind speed from uvmet_wspd_wdir, I found that the wind speed calculated using the U and V components differed significantly from the directly extracted wspd values.
code:
import wrf
import numpy as np
from netCDF4 import Dataset
file_data = Dataset('D3_2010_07_3_20100712161000.nc')
U,V = wrf.getvar(file_data,'uvmet') #m/s
WSD,WDIR = wrf.getvar(file_data,'uvmet_wspd_wdir')
a = np.sqrt(np.array(U.values)**2+np.array(V.values)**2)
b = np.array(WSD.values)
The result indicates that a is the transpose matrix of b.
Why does the matrix transpose happen? Is it due to the storage problem of components in u and v?
I am not very sure which one is the true value that can be compared with observed values.
I am so glad looking forward to your answer.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the shown Python code and the referenced D3_2010_07_3_20100712161000.nc dataset. Inspect the outputs and implementations of getvar('uvmet') and getvar('uvmet_wspd_wdir'); done means determining whether the transpose is expected or a bug and documenting or correcting the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100