earthkit.meteo.thermo.relative_humidity_from_specific_humidity

earthkit.meteo.thermo.relative_humidity_from_specific_humidity(t: ArrayLike, q: ArrayLike, p: ArrayLike) ArrayLike
earthkit.meteo.thermo.relative_humidity_from_specific_humidity(t: xarray.DataArray, q: xarray.DataArray, p: xarray.DataArray) xarray.DataArray
earthkit.meteo.thermo.relative_humidity_from_specific_humidity(t: earthkit.data.FieldList, q: earthkit.data.FieldList, p: earthkit.data.FieldList) earthkit.data.FieldList

Compute the relative humidity from specific humidity.

Parameters:
  • t (array-like) – Temperature (K)

  • q (array-like) – Specific humidity (kg/kg)

  • p (array-like) – Pressure (Pa)

Returns:

Relative humidity (%)

Return type:

array-like

The computation is based on the following formula:

\[r = 100 \frac {e(q, p)}{e_{msat}(t)}\]

where:

Implementations

relative_humidity_from_specific_humidity() calls one of the following implementations depending on the type of the input arguments:

The function returns an object of the same type as the input arguments.