MetPy icon indicating copy to clipboard operation
MetPy copied to clipboard

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

Open tariik opened this issue 10 years ago • 3 comments

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 avatar Jun 09 '16 22:06 tariik

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 avatar Jun 10 '16 03:06 tariik

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 :+1:
Pressure = 1013.25 millibar temperature = 25 degC Wet temperature = 21 degC relative humiditye = 0.70008048528 dimensionless

tariik avatar Jun 10 '16 03:06 tariik

Done in #345 .

dopplershift avatar Mar 21 '17 19:03 dopplershift