earthkit.meteo.thermo.saturation_mixing_ratio¶
- earthkit.meteo.thermo.saturation_mixing_ratio(t: ArrayLike, p: ArrayLike, phase: str = 'mixed') ArrayLike¶
- earthkit.meteo.thermo.saturation_mixing_ratio(t: xarray.DataArray, p: xarray.DataArray, phase: str = 'mixed') xarray.DataArray
- earthkit.meteo.thermo.saturation_mixing_ratio(t: earthkit.data.FieldList, p: earthkit.data.FieldList, phase: str = 'mixed') earthkit.data.FieldList
Compute the saturation mixing ratio from temperature with respect to a phase.
- Parameters:
t (
array-like) – Temperature (K)p (
array-like) – Pressure (Pa)phase (
str) – Define the phase with respect to thesaturation_vapour_pressure()is computed. It is either “water”, “ice” or “mixed”.
- Returns:
Saturation mixing ratio (kg/kg)
- Return type:
array-like
Equivalent to the following code:
e = saturation_vapour_pressure(t, phase=phase) return mixing_ratio_from_vapour_pressure(e, p)
Implementations¶
saturation_mixing_ratio()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.thermo.array.saturation_mixing_ratio()for array-likeearthkit.meteo.thermo.xarray.saturation_mixing_ratio()for xarray.DataArrayearthkit.meteo.thermo.fieldlist.saturation_mixing_ratio()for FieldList
The function returns an object of the same type as the input arguments.