earthkit.meteo.thermo.saturation_specific_humidity

earthkit.meteo.thermo.saturation_specific_humidity(t: ArrayLike, p: ArrayLike, phase: str = 'mixed') ArrayLike
earthkit.meteo.thermo.saturation_specific_humidity(t: xarray.DataArray, p: xarray.DataArray, phase: str = 'mixed') xarray.DataArray
earthkit.meteo.thermo.saturation_specific_humidity(t: earthkit.data.FieldList, p: earthkit.data.FieldList, phase: str = 'mixed') earthkit.data.FieldList

Compute the saturation specific humidity from temperature with respect to a phase.

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

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

  • phase (str, optional) – Define the phase with respect to the saturation_vapour_pressure() is computed. It is either “water”, “ice” or “mixed”.

Returns:

Saturation specific humidity (kg/kg)

Return type:

array-like

Equivalent to the following code:

e = saturation_vapour_pressure(t, phase=phase)
return specific_humidity_from_vapour_pressure(e, p)

Implementations

saturation_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.