improver.psychrometric_calculations.air_density module#
Plugin to calculate air density from virtual temperature.
- class AirDensity[source]#
Bases:
BasePluginCalculate air density from virtual temperature.
- _abc_impl = <_abc._abc_data object>#
- process(inputs)[source]#
Calculate air density from virtual temperature.
If an explicit pressure cube is provided the pressure is taken from here. Otherwise the virtual temperature cube needs to be on pressure levels. The cube arguments are not checked explicitly for conformant dimensions but must have the same shape.
Air Density Calculation#
Density is calculated using the Ideal Gas Law equation of state with moisture effects included via the virtual temperature calculation.
\[\rho=\frac{p}{R_d T_v}\]where:
\(\rho\) = air density (kgm⁻³)
\(p\) = pressure (Pa)
\(R_d\) = gas constant for dry air = 287.05 Jkg⁻¹K⁻¹ (See R_DRY_AIR constant in IMPROVER.constants)
\(T_v\) = virtual temperature (K), which needs calculating
Key interpretation#
If temperature goes up, density goes down.
If moisture goes up, density goes down [*]
If pressure goes up, density goes up.