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