earthkit.meteo.thermo.fieldlist.saturation_specific_humidity

earthkit.meteo.thermo.fieldlist.saturation_specific_humidity(t, p=None, phase='mixed')

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

Parameters:
  • t (FieldList|Field) – Temperature (K).

  • p (FieldList|Field|Iterable[float]|float|None) – Pressure (Pa). If None, inferred from the field metadata of t. Otherwise, if t is a FieldList p must be a FieldList or an array-like of the same length as t. If t is a Field, p must be a single Field or a float.

  • 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). The result has the same type as the input t (FieldList or Field).

Return type:

FieldList|Field

Equivalent to the following code:

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