mixing_ratio

mixing_ratio(q)

Computes the mixing ratio from the given specific humidity (q).

Parameters

q (number, ndarray or Fieldset) – specific humidity (kg/kg)

Return type

same type as q or None

The result is the mixing ratio in kg/kg units. On error None is returned. The computation is based on the following definition:

\[w = \frac {q}{1-q}\]