The correct formulation for rotating to Earth-relative winds
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 498
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am a WRF-python user. I was wondering what equation WRF-python uses in dcomputeuvmet to derive the earth-relative wind components from the grid-relative winds? It seems from the source code that it uses the following:
uvmet(i,j,1) = vlongcb + ulongca # I believe this is the u-earth component
uvmet(i,j,2) = vlongca - ulongcb # I believe this is the v-earth component
where,
longcb = longcaconerpd
longca = COS(longcb)
longcb = SIN(longcb)
However, from David Oven's website, he says that the correct formula are the following:
Uearth = Ucosalpha - Vsinalpha
Vearth = Vcosalpha + Usinalpha
and that 'NOTE: this is the correct version of these equations. Some sources on the Web incorrectly reverse the signs on the sinalpha terms.'
This seems to suggest the formula in the WRF-Python internal dcomputeuvmet is incorrect? Sorry, I am quite confused now.
Related to this post https://github.com/NCAR/wrf-python/issues/13. Bill also suggests using:
u_earth = u * COSALPHA - v * SINALPHA
v_earth = v * COSALPHA + u * SINALPHA
Any advice would be appreciated,
David
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 reviewing the dcomputeuvmet source and the related discussion in issue 13, then compare its component rotation with the equations quoted here. Determine which formulation matches WRF's grid-relative wind conventions and document or correct the behavior, with validation against an appropriate existing wind-transformation test if one is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100