varwg.meteo.meteox2y.dewpoint

varwg.meteo.meteox2y.dewpoint(at, rh=None, e=None)[source]

dewpoint from air temperature and humidity

As input is required: air temperature (at) and EITHER relative humidity (rh) OR vapour pressure (e).

Parameters:
atfloat or numpy.array of floats

air temperature [deg C]

rhfloat or numpy.array of floats or None

relative humidity with values between 0 and 1 [-]

efloat or numpy.array of floats or None

vapour pressure [hPa]

Returns:
dewfloat or numpy.array of floats

dewpoint [deg C]

Raises:
Warning

If relative humidity is > 1.1 (e. g. if vapour pressure is taken as relative humidity)

Examples

>>> dewpoint(20.,rh=0.5)
9.269628637124908
>>> dewpoint(20.,e=10.0)
6.968196840688138
>>> at = np.array((0.0, 2.5, 5.0, 7.5, 10.0))
>>> rh = np.array((0.9, 0.8, 0.7, 0.6, 0.5))
>>> dewpoint(at, rh=rh)
array([-1.43893707, -0.59071344, -0.0041022 ,  0.25144096,  0.07140267])
>>> at = np.array((0.0, 2.5, 5.0, 7.5, 10.0))
>>> e = np.array((5.5, 5.8, 6.1, 6.2, 6.3))
>>> dewpoint(at, e=e)
array([-1.43646874, -0.71330622, -0.02250498,  0.20109231,  0.42152362])