earthkit.meteo.thermo.fieldlist.saturation_mixing_ratio¶
- earthkit.meteo.thermo.fieldlist.saturation_mixing_ratio(t, p=None, phase='mixed')¶
Compute the saturation mixing ratio 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 oft. Otherwise, iftis a FieldListpmust be a FieldList or an array-like of the same length ast. Iftis a Field,pmust be a single Field or a float.phase (
str, optional) – Define the phase with respect to thesaturation_vapour_pressure()is computed. It is either “water”, “ice” or “mixed”.
- Returns:
Saturation mixing ratio (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 mixing_ratio_from_vapour_pressure(e, p)