-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why pressure is not used to calculate relative humidity? #518
Comments
It should be, but for atmospheric sea level surface pressure range, the effect is relatively small. It should essentially be the reverse of qcshum in metutils which goes from SH to RH. rh2qair looks like an approximation. A good test would be qair2rh(rh2qair(R,T) should return R within approximation Ankur R Desai, Associate Professor
|
If anyone, whether a professor in atmospheric science or otherwise, wants to submit a pull request with a more accurate version I'd be happy for the update. |
I actually tried both rh2qair and then used qair2rh and solved for qair, the difference is indeed small.
|
Wait till you get to the mountains. Also, one expects Kelvin, the other Celcius. fix is on the way. Ankur R Desai, Associate Professor
|
But it’s so much more fun to just whine about it :) Well just made a pull request to make the function be exactly correct, but not break existing calls to it. Two issues: rh2qair is called in met2CF Ameriflux/CSV/ALMA and temporal downscaling, two of these functions don’t read in pressure currently. qair2rh is called in met2model for BIOCRO/SIPNET and temporal downscaling. So 7 functions need to be changed if we want a) to make all this be in SI units and b) pass pressure around in both cases. For now, the pull request allows a pressure in Pa to be passed to rh2qair, but doesn’t otherwise change functionality. Ankur R Desai, Associate Professor
|
great, thanks for that. Yes why not just have all the same units?! |
Thanks @ankurdesai, I just merged that pull request. I'm going to leave this issue open so we remember to go back and standardize units and pass pressure explicitly. |
@mdietze @ankurdesai Have we remembered to "go back and standardize units and pass pressure explicitly?". Is it still worth keeping this issue open? (Keeping in mind that closed issues are still 100% searchable, and can always be re-opened.) |
This issue is stale because it has been open 365 days with no activity. |
@mdietze
In this formula to convert RH to SH pressure is not included, why? Isn't RH dependent on pressure?
' converts relative humidity to specific humidity
' @title RH to SH
' @param rh relative humidity (proportion, not %)
' @param T absolute temperature (Kelvin)
' @export
' @author Mike Dietze
' @Aliases rh2rv
rh2qair <- function(rh, T){
qair <- rh * 2.541e6 * exp(-5415.0 / T) * 18/29
return(qair)
}
The text was updated successfully, but these errors were encountered: