easyclimate.physics.temperature.virtual_temperature#
Virtual Temperature
Functions#
|
Calculate virtual temperature. |
|
Calculate virtual temperature. |
Module Contents#
- easyclimate.physics.temperature.virtual_temperature.calc_virtual_temperature(temper_data: xarray.DataArray, specific_humidity_data: xarray.DataArray, specific_humidity_data_units: Literal['kg/kg', 'g/g', 'g/kg'], epsilon: float = 0.608) xarray.DataArray #
Calculate virtual temperature.
The virtual temperature (\(T_v\)) is the temperature at which dry air would have the same density as the moist air, at a given pressure. In other words, two air samples with the same virtual temperature have the same density, regardless of their actual temperature or relative humidity. The virtual temperature is always greater than the absolute air temperature.
\[T_v = T(1+ \epsilon q)\]where \(\epsilon = 0.608\) when the mixing ratio (specific humidity) \(q\) is expressed in \(\mathrm{g \cdot g^{-1}}\).
Parameters#
- temper_data:
xarray.DataArray
. Air temperature.
- specific_humidity_data:
xarray.DataArray
. The absolute humidity data.
- specific_humidity_data_units:
str
. The unit corresponding to specific_humidity value. Optional values are kg/kg, g/g, g/kg and so on.
- epsilon:
float
. A constant.
Reference#
Doswell , C. A., and E. N. Rasmussen, 1994: The Effect of Neglecting the Virtual Temperature Correction on CAPE Calculations. Wea. Forecasting, 9, 625–629, https://doi.org/10.1175/1520-0434(1994)009<0625:TEONTV>2.0.CO;2.
- temper_data:
- easyclimate.physics.temperature.virtual_temperature.calc_virtual_temperature_Hobbs2006(temper_data: xarray.DataArray, specific_humidity_data: xarray.DataArray, specific_humidity_data_units: Literal['kg/kg', 'g/g', 'g/kg'], epsilon: float = 0.6219569100577033) xarray.DataArray #
Calculate virtual temperature.
The virtual temperature (\(T_v\)) is the temperature at which dry air would have the same density as the moist air, at a given pressure. In other words, two air samples with the same virtual temperature have the same density, regardless of their actual temperature or relative humidity. The virtual temperature is always greater than the absolute air temperature.
This calculation must be given an air parcel’s temperature and mixing ratio. The implementation uses the formula outlined in [Hobbs2006] pg.67 & 80.
\[T_v = T \frac{\text{q} + \epsilon}{\epsilon\,(1 + \text{q})}\]where \(\epsilon \approx 0.622\) when the mixing ratio (specific humidity) \(q\) is expressed in \(\mathrm{g \ g^{-1}}\).
Parameters#
- temper_data:
xarray.DataArray
. Air temperature.
- specific_humidity_data:
xarray.DataArray
. The absolute humidity data.
- specific_humidity_data_units:
str
. The unit corresponding to specific_humidity value. Optional values are kg/kg, g/g, g/kg and so on.
- epsilon:
float
. The molecular weight ratio, which is molecular weight of the constituent gas to that assumed for air. Defaults to the ratio for water vapor to dry air. (\(\epsilon \approx 0.622\))
Reference#
Hobbs, P. V., and J. M. Wallace, 2006: Atmospheric Science: An Introductory Survey. 2nd ed. Academic Press, 504 pp. https://www.sciencedirect.com/book/9780127329512/atmospheric-science
Doswell , C. A., and E. N. Rasmussen, 1994: The Effect of Neglecting the Virtual Temperature Correction on CAPE Calculations. Wea. Forecasting, 9, 625–629, https://doi.org/10.1175/1520-0434(1994)009<0625:TEONTV>2.0.CO;2.
- temper_data: