specific_humidity2vmr

typhon.physics.specific_humidity2vmr(q)[source]

Convert specific humidity to volume mixing ratio.

\[x = \frac{q}{(1 - q) \frac{M_w}{M_d} + q}\]
Parameters:

q (float or ndarray) – Specific humidity.

Returns:

Volume mixing ratio.

Return type:

float or ndarray

Examples

>>> specific_humidity2vmr(0.02)
0.03176931009073226