relative_humidity_from_dewpoint

relative_humidity_from_dewpoint(t, td)

Computes the relative humidity from the given temperature (t) and dewpoint temperature (td).

Parameters
  • t (number, ndarray or Fieldset) – temperature (K)

  • td (number, ndarray or Fieldset) – dewpoint temperature (K)

Return type

same type as t or None

The result is the relative humidity in % units. On error None is returned. The computation is based on the following formula:

\[r = 100 \frac {e_{wsat}(Td)}{e_{wsat}(T)}\]

where e wsat is the saturation vapour pressure over water (see saturation_vapour_pressure()).

When the result is a Fieldset the ecCodes paramId in the output is set to 157 (=relative humidity).