earthkit.meteo.thermo.fieldlist.specific_humidity_from_vapour_pressure

earthkit.meteo.thermo.fieldlist.specific_humidity_from_vapour_pressure(e, p=None, eps=0.0001)

Compute the specific humidity from vapour pressure.

Parameters:
  • e (FieldList|Field) – Vapour pressure (Pa).

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

  • eps (float, optional) – Where p - e < eps nan is returned.

Returns:

Specific humidity (kg/kg). The result has the same type as the input e (FieldList or Field).

Return type:

FieldList|Field

The computation is based on the following formula:

\[q = \frac{\epsilon e}{p + e(\epsilon-1)}\]

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