Skip to content
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

calculate relative humidity and dew point with wet bulb and dry bulb #154

Closed
tariik opened this issue Jun 9, 2016 · 3 comments
Closed
Assignees
Labels
Area: Calc Pertains to calculations Type: Enhancement Enhancement to existing functionality
Milestone

Comments

@tariik
Copy link

tariik commented Jun 9, 2016

Hello,
to calculate relative humidity and dew point with wet bulb and dry bulb Basic formula (Sprung), adopted by WMO:
RH = 100.[es(tw) - A.P(td -tw)]/es(td)

Where:
es(tw) is the saturation vapour pressure of the wet bulb;
es(td) is the saturation vapour pressure of the dry bulb;
p is the pressure of the air;
td is the temperature of the dry bulb;
tw is the temperature of the wet bulb;
A is the psychrometer coefficient A = 0.000662 .

Psychrometer coefficient depends on air flow speed (>2.2m/s),
thermodynamic properties of water and vapor pressure and
geometry of wet bulb thermometer and is dificult to determine precisely.

References

WMO GUIDE TO METEOROLOGICAL INSTRUMENTS AND METHODS OF OBSERVATION WMO-No. 8 (2008 edition, Updated in 2010) : PART 4
https://www.wmo.int/pages/prog/www/IMOP/CIMO-Guide.html
RH = (saturation_vapor_pressure(Twb) - 0.000662 P ( Tdb -Twb )) / saturation_vapor_pressure(Tdb)

@tariik
Copy link
Author

tariik commented Jun 10, 2016

i tray to add this code to thermo.py
`@exporter.export
def relative_humidity(temperature, wet_temperature, pressure):
r'''Calculates relative humidity with wet bulb and dry bulb.

Parameters
----------
temperature : array_like
    Dry bulb temperature [degC]
temperature_h : array_like
    Wet bulb temperature [degC]
pressure : array_like
    The atmospheric pressure

Returns
-------
array_like
    relative humidity............................

See Also
--------
saturation_vapor_pressure

Notes
-----
Basic formula (Sprung), adopted by WMO:
RH = 100.[es(tw) - A.P(td -tw)]/es(td)

Where:
es(tw) is the saturation vapour pressure of the wet bulb;
es(td) is the saturation vapour pressure of the dry bulb;
p is the pressure of the air;
td is the temperature of the dry bulb;
tw is the temperature of the wet bulb;
A is the psychrometer coefficient A = 0.000662 kelvin ^-1.

Psychrometer coefficient depends on air flow speed (>2.2m/s), 
thermodynamic properties of water and vapor pressure and 
geometry of wet bulb thermometer and is dificult to determine precisely.

References
----------
.. WMO GUIDE TO METEOROLOGICAL INSTRUMENTS AND METHODS OF OBSERVATION WMO-No.8 
(2008 edition, Updated in 2010) : PART 4
https://www.wmo.int/pages/prog/www/IMOP/CIMO-Guide.html[3]

'''

A   = 0.000662  / units.kelvin  
return  (saturation_vapor_pressure(wet_temperature) - A * pressure * (temperature.to('kelvin') - wet_temperature.to('kelvin'))) / saturation_vapor_pressure(temperature)

`

@tariik
Copy link
Author

tariik commented Jun 10, 2016

and my test is
`import metpy.calc as mcalc
from metpy.units import units

P = 1013.25 * units.mbar
print ' Pressure = ',P

Tdb = 25 * units.degC
print ' temperature = ',Tdb

Twb = 21 * units.degC
print ' Wet temperature = ',Twb

rh = mcalc.relative_humidity(Tdb, Twb,P)

print ' relative humiditye = ',rh`

its work 👍
Pressure = 1013.25 millibar
temperature = 25 degC
Wet temperature = 21 degC
relative humiditye = 0.70008048528 dimensionless

@dopplershift dopplershift added Type: Enhancement Enhancement to existing functionality Area: Calc Pertains to calculations Status: Need Info More information is required to act on the issue labels Jun 17, 2016
@dopplershift dopplershift removed the Status: Need Info More information is required to act on the issue label Sep 14, 2016
@dopplershift dopplershift modified the milestone: 0.5.0 Mar 10, 2017
@jrleeman jrleeman self-assigned this Mar 13, 2017
@dopplershift
Copy link
Member

Done in #345 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Calc Pertains to calculations Type: Enhancement Enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants