density¶
- 
metpy.calc.density(pressure, temperature, mixing, molecular_weight_ratio=<Quantity(0.6219800858985514, 'dimensionless')>)[source]¶
- Calculate density. - This calculation must be given an air parcel’s pressure, temperature, and mixing ratio. The implementation uses the formula outlined in [Hobbs2006] pg.67. - Parameters
- temperature (pint.Quantity) – The temperature 
- pressure (pint.Quantity) – Total atmospheric pressure 
- mixing (pint.Quantity) – dimensionless mass mixing ratio 
- molecular_weight_ratio (pint.Quantity or float, optional) – The ratio of the molecular weight of the constituent gas to that assumed for air. Defaults to the ratio for water vapor to dry air. (\(\epsilon\approx0.622\)). 
 
- Returns
- pint.Quantity – The corresponding density of the parcel 
 - Notes \[\rho = \frac{p}{R_dT_v}\]