specific_humidity2mixing_ratio

typhon.physics.specific_humidity2mixing_ratio(q)[source]

Convert specific humidity to mass mixing ratio.

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

q (float or ndarray) – Specific humidity.

Returns:

Mass mixing ratio.

Return type:

float or ndarray

Examples

>>> specific_humidity2mixing_ratio(0.02)
0.020408163265306124