earthkit.meteo.thermo.xarray.mixing_ratio_from_vapour_pressure

earthkit.meteo.thermo.xarray.mixing_ratio_from_vapour_pressure(e, p, eps=0.0001)

Compute the mixing ratio from vapour pressure.

Parameters:
  • e (xarray.DataArray) – Vapour pressure (Pa)

  • p (xarray.DataArray) – Pressure (Pa)

  • eps (number) – Where p - e < eps nan is returned.

Returns:

Mixing ratio (kg/kg).

Return type:

xarray.DataArray

The computation is based on the following formula:

\[w = \frac{\epsilon e}{p - e}\]

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