earthkit.meteo.thermo.dewpoint_from_specific_humidity¶
- earthkit.meteo.thermo.dewpoint_from_specific_humidity(q: ArrayLike, p: ArrayLike) ArrayLike¶
- earthkit.meteo.thermo.dewpoint_from_specific_humidity(q: xarray.DataArray, p: xarray.DataArray) xarray.DataArray
- earthkit.meteo.thermo.dewpoint_from_specific_humidity(q: earthkit.data.FieldList, p: earthkit.data.FieldList) earthkit.data.FieldList
Compute the dewpoint temperature from specific humidity.
- Parameters:
q (
array-like) – Specific humidity (kg/kg)p (
array-like) – Pressure (Pa)
- Returns:
Dewpoint temperature (K). For zero
qvalues returns nan.- Return type:
array-like
The computation starts with determining the the saturation vapour pressure over water at the dewpoint temperature:
\[e_{wsat}(td) = e(q, p)\]where:
\(e\) is the vapour pressure (see
vapour_pressure_from_specific_humidity())\(e_{wsat}\) is the
saturation_vapour_pressure()over water\(td\) is the dewpoint
Then \(td\) is computed from \(e_{wsat}(td)\) by inverting the equations used in
saturation_vapour_pressure().Implementations¶
dewpoint_from_specific_humidity()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.thermo.array.dewpoint_from_specific_humidity()for array-likeearthkit.meteo.thermo.xarray.dewpoint_from_specific_humidity()for xarray.DataArrayearthkit.meteo.thermo.fieldlist.dewpoint_from_specific_humidity()for FieldList
The function returns an object of the same type as the input arguments.