earthkit.meteo.thermo.fieldlist.vapour_pressure_from_mixing_ratio

earthkit.meteo.thermo.fieldlist.vapour_pressure_from_mixing_ratio(w, p=None)

Compute the vapour pressure from mixing ratio.

Parameters:
  • w (FieldList|Field) – Mixing ratio (kg/kg).

  • p (FieldList|Field|Iterable[float]|float|None) – Pressure (Pa). If None, inferred from the field metadata of w. Otherwise, if w is a FieldList p must be a FieldList or an array-like of the same length as w. If w is a Field, p must be a single Field or a float.

Returns:

Vapour pressure (Pa). The result has the same type as the input w (FieldList or Field).

Return type:

FieldList|Field

The computation is based on the following formula:

\[e = \frac{pw}{\epsilon + w}\]

with \(\epsilon = R_{d}/R_{v}\) (see earthkit.meteo.constants.epsilon).