metpy.calc.
virtual_temperature
Calculate virtual temperature.
This calculation must be given an air parcel’s temperature and mixing ratio. The implementation uses the formula outlined in [Hobbs2006] pg.80.
temperature (pint.Quantity) – Air temperature
pint.Quantity
mixing_ratio (pint.Quantity) – Mass mixing ratio (dimensionless)
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\))
pint.Quantity – Corresponding virtual temperature of the parcel
Notes
Changed in version 1.0: Renamed mixing parameter to mixing_ratio
mixing
mixing_ratio