code: def virtual_temperature(temperature, mixing, molecular_weight_ratio=mpconsts.epsilon):
      r
      return temperature * ((mixing + molecular_weight_ratio)
                            / (molecular_weight_ratio * (1 + mixing)))
docs: r"""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`
          The 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.
          (:math:`\epsilon\approx0.622`).
  
      Returns
      -------
      `pint.Quantity`
          The corresponding virtual temperature of the parcel
  
      Notes
      -----
      .. math:: T_v = T \frac{\text{w} + \epsilon}{\epsilon\,(1 + \text{w})}