A question about the equation used in wrf.rh
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 498
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
I recently converted mixing ratio (qv) to relative humidity (RH) by using wf-python and metpy. I compared the results from wrf.rh and metpy.calc.relative_humidity_from_mixing_ratio, and found that the RH from wrf-python is overall higher than the one from metpy.
Although the definitions of relative humidity are different between wrf-python (qv/qvs) and metpy (WMO standard), there is another significant difference between these two libraries. In both libraries, related functions compute the saturation vapor pressure using an empirical equation and then the saturation mixing ratio (qvs). However, in wrf_user.f90, there is another term (1.D0 - EPS) in subroutine DCOMPUTERH.
qvs = EPS*es/(0.01D0*pressure - (1.D0 - EPS)*es)
I am wondering whether this term should appear here.
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 with wrf_user.f90 and the DCOMPUTERH subroutine, then trace how wrf.rh exposes this calculation. Compare its qvs equation, including the (1.D0 - EPS) term, with metpy.calc.relative_humidity_from_mixing_ratio and the documented definitions. Done means determining whether the term is correct and documenting or correcting the discrepancy with a focused regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100