earthkit.meteo.thermo.xarray.saturation_specific_humidity¶
- earthkit.meteo.thermo.xarray.saturation_specific_humidity(t, p, phase='mixed')¶
Compute the saturation specific humidity from temperature with respect to a phase.
- Parameters:
t (
xarray.DataArray) – Temperature (K)p (
xarray.DataArray) – Pressure (Pa)phase (
str, optional) – Define the phase with respect to thesaturation_vapour_pressure()is computed. It is either “water”, “ice” or “mixed”.
- Returns:
Saturation specific humidity (kg/kg)
- Return type:
xarray.DataArray
Equivalent to the following code:
e = saturation_vapour_pressure(t, phase=phase) return specific_humidity_from_vapour_pressure(e, p)