earthkit.meteo.thermo.vapour_pressure_from_mixing_ratio¶
- earthkit.meteo.thermo.vapour_pressure_from_mixing_ratio(w: ArrayLike, p: ArrayLike) ArrayLike¶
- earthkit.meteo.thermo.vapour_pressure_from_mixing_ratio(w: xarray.DataArray, p: xarray.DataArray) xarray.DataArray
- earthkit.meteo.thermo.vapour_pressure_from_mixing_ratio(w: earthkit.data.FieldList, p: earthkit.data.FieldList) earthkit.data.FieldList
Compute the vapour pressure from mixing ratio.
- Parameters:
w (
array-like | xarray.DataArray) – Mixing ratio (kg/kg)p (
array-like | xarray.DataArray) – Pressure (Pa)
- Returns:
Vapour pressure (Pa)
- Return type:
array-like | xarray.DataArray
The computation is based on the following formula:
\[e = \frac{pw}{\epsilon + w}\]with \(\epsilon = R_{d}/R_{v}\) (see
earthkit.meteo.constants.epsilon).Implementations¶
vapour_pressure_from_mixing_ratio()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.thermo.array.vapour_pressure_from_mixing_ratio()for array-likeearthkit.meteo.thermo.xarray.vapour_pressure_from_mixing_ratio()for xarray.DataArrayearthkit.meteo.thermo.fieldlist.vapour_pressure_from_mixing_ratio()for FieldList
The function returns an object of the same type as the input arguments.