virtual_temperature

metpy.calc.virtual_temperature(temperature, mixing, molecular_weight_ratio=<Quantity(0.6219800858985514, 'dimensionless')>)[source]

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.

Parameters
  • temperature (pint.Quantity) – air temperature

  • 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 virtual temperature of the parcel

Notes

\[T_v = T \frac{\text{w} + \epsilon}{\epsilon\,(1 + \text{w})}\]