varwg.meteo.meteox2y.dew2rel

varwg.meteo.meteox2y.dew2rel(dew, at)[source]

relative humidity from dewpoint and air temperature

Parameters:
atfloat or numpy.array of floats

air temperature [deg C]

dewfloat or numpy.array of floats

dewpoint [deg C]

Returns:
rhfloat or numpy.array of floats

relative humidity with values between 0 and 1 [-]

Examples

>>> dew2rel(15.,16.0)
0.9378863357566809
>>> at = np.array((0.0, 2.5, 5.0, 7.5, 10.0))
>>> dew = np.array((0.0, 3., 5.0, 7.7, 10.0))
>>> dew2rel(at,dew)
array([1.        ,  0.96506519,  1.        ,  0.98642692,  1.        ])