earthkit.meteo.thermo.fieldlist.mixing_ratio_from_dewpoint¶
- earthkit.meteo.thermo.fieldlist.mixing_ratio_from_dewpoint(td, p=None)¶
Compute the mixing ratio from dewpoint.
- Parameters:
td (
FieldList|Field) – Dewpoint (K).p (
FieldList|Field|Iterable[float]|float|None) – Pressure (Pa). If None, inferred from the field metadata oftd. Otherwise, iftdis a FieldListpmust be a FieldList or an array-like of the same length astd. Iftdis a Field,pmust be a single Field or a float.
- Returns:
Mixing ratio (kg/kg). The result has the same type as the input
td(FieldList or Field).- Return type:
FieldList|Field
The computation starts with determining the vapour pressure:
\[e(w, p) = e_{wsat}(td)\]where:
\(e\) is the vapour pressure (see
vapour_pressure_from_mixing_ratio())\(e_{wsat}\) is the
saturation_vapour_pressure()over water\(w\) is the mixing ratio
Then w is computed from \(e\) using
mixing_ratio_from_vapour_pressure().