climt.mass_to_volume_mixing_ratio¶
-
climt.
mass_to_volume_mixing_ratio
(mass_mixing_ratio, molecular_weight=None, molecular_weight_air=28.964)[source]¶ g/g or g/kg to mole/mole
Converts from mass mixing ratio (mass per unit mass) to volume mixing ratio (volume per unit volume)
Parameters: - mass_mixing_ratio (array) – The quantity to be transformed in units of \(g/g\).
- molecular_weight (float) – The molecular weight of the gas in \(g/mol\).
- molecular_weight_air (float,optional) – The molecular weight of dry air. If it is not provided, the value for dry air on earth (28.964 g/mol) is used.
Returns: The volume mixing ratio of the gas.
Return type: volume_mixing_ratio (array)
Raises: ValueError
– if the molecular weight is not provided.