earthkit.meteo.thermo.saturation_specific_humidity_slope

earthkit.meteo.thermo.saturation_specific_humidity_slope(t: ArrayLike, p: ArrayLike, es: ArrayLike | None = None, es_slope: ArrayLike | None = None, phase: str = 'mixed', eps: float = 0.0001) ArrayLike
earthkit.meteo.thermo.saturation_specific_humidity_slope(t: xarray.DataArray, p: xarray.DataArray, es: xarray.DataArray | None = None, es_slope: xarray.DataArray | None = None, phase: str = 'mixed', eps: float = 0.0001) xarray.DataArray
earthkit.meteo.thermo.saturation_specific_humidity_slope(t: earthkit.data.FieldList, p: earthkit.data.FieldList, es: earthkit.data.FieldList | None = None, es_slope: earthkit.data.FieldList | None = None, phase: str = 'mixed', eps: float = 0.0001) earthkit.data.FieldList

Compute the slope of saturation specific humidity with respect to temperature.

Parameters:
  • t (array-like) – Temperature (K)

  • p (array-like) – Pressure (Pa)

  • es (array-like or None, optional) – saturation_vapour_pressure() pre-computed for the given phase (Pa)

  • es_slope (array-like or None, optional) – saturation_vapour_pressure_slope() pre-computed for the given phase (Pa/K)

  • phase (str, optional) – Define the phase with respect to the computation will be performed. It is either “water”, “ice” or “mixed”. See saturation_vapour_pressure() for details.

  • eps (number) – Where p - es < eps nan is returned.

Returns:

Slope of saturation specific humidity (\(kg kg^{-1} K^{-1}\))

Return type:

array-like

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

Implementations

saturation_specific_humidity_slope() calls one of the following implementations depending on the type of the input arguments:

The function returns an object of the same type as the input arguments.