earthkit.meteo.thermo.xarray.saturation_specific_humidity_slope¶
- earthkit.meteo.thermo.xarray.saturation_specific_humidity_slope(t, p, es=None, es_slope=None, phase='mixed', eps=0.0001)¶
Compute the slope of saturation specific humidity with respect to temperature.
- Parameters:
t (
xarray.DataArray) – Temperature (K)p (
xarray.DataArray) – Pressure (Pa)es (
xarray.DataArrayorNone, optional) –saturation_vapour_pressure()pre-computed for the givenphase(Pa)es_slope (
xarray.DataArrayorNone, optional) –saturation_vapour_pressure_slope()pre-computed for the givenphase(Pa/K)phase (
str, optional) – Define the phase with respect to the computation will be performed. It is either “water”, “ice” or “mixed”. Seesaturation_vapour_pressure()eps (
number) – Where p - es <epsnan is returned.
- Returns:
Slope of saturation specific humidity (\(kg kg^{-1} K^{-1}\))
- Return type:
xarray.DataArray
The computation is based on the following formula:
\[\frac{\partial q_{s}}{\partial t} = \frac{\epsilon p}{(p+e_{s}(\epsilon - 1))^{2}} \frac{d e_{s}}{d t}\]where
\(\epsilon = R_{d}/R_{v}\) (see
earthkit.meteo.constants.epsilon).\(e_{s}\) is the
saturation_vapour_pressure()for the givenphase