saturation_mixing_ratio

saturation_mixing_ratio(t, p[, phase])

Computes the saturation mixing ratio for a given temperature (t), pressure (p) and phase.

Parameters
  • t (number, ndarray or Fieldset) – temperature (K)

  • p (number, ndarray or Fieldset) – pressure (Pa)

  • phase (str) – is either “water”, “ice” or “mixed”. When it is not specified the “water” phase is used.

Return type

same type as t or None

The result is the saturation mixing ratio in kg/kg units. On error None is returned. The following rules are applied when t is a Fieldset:

  • if t is a pressure level Fieldset no p is needed

  • if t is defined on ECMWF model levels (hybrid/eta) p must be either a single LNSP (logarithm of surface pressure, identified by paramId=152) field or a Fieldset defining the pressure on the same levels as t

  • for other level types p must be a Fieldset defining the pressure on the same levels as t

The computation is implemented via calling mixing_ratio() and saturation_vapour_pressure():

ws = mv.mixing_ratio(p, mv.saturation_vapour_pressure(t, phase))