earthkit.meteo.thermo.specific_humidity_from_relative_humidity¶
- earthkit.meteo.thermo.specific_humidity_from_relative_humidity(t: ArrayLike, r: ArrayLike, p: ArrayLike) ArrayLike¶
- earthkit.meteo.thermo.specific_humidity_from_relative_humidity(t: xarray.DataArray, r: xarray.DataArray, p: xarray.DataArray) xarray.DataArray
- earthkit.meteo.thermo.specific_humidity_from_relative_humidity(t: earthkit.data.FieldList, r: earthkit.data.FieldList, p: earthkit.data.FieldList) earthkit.data.FieldList
Compute the specific humidity from relative_humidity.
- Parameters:
t (
array-like) – Temperature (K)r (
array-like) – Relative humidity(%)p (
array-like) – Pressure (Pa)
- Returns:
Specific humidity (kg/kg) units
- Return type:
array-like
The computation starts with determining the the vapour pressure:
\[e(q, p) = r \frac{e_{msat}(t)}{100}\]where:
\(e\) is the vapour pressure (see
vapour_pressure())\(e_{msat}\) is the
saturation_vapour_pressure()based on the "mixed" phase\(q\) is the specific humidity
Then \(q\) is computed from \(e\) using
specific_humidity_from_vapour_pressure().Implementations¶
specific_humidity_from_relative_humidity()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.thermo.array.specific_humidity_from_relative_humidity()for array-likeearthkit.meteo.thermo.xarray.specific_humidity_from_relative_humidity()for xarray.DataArrayearthkit.meteo.thermo.fieldlist.specific_humidity_from_relative_humidity()for FieldList
The function returns an object of the same type as the input arguments.