pyrtlib.utils.atmospheric_tickness#

pyrtlib.utils.atmospheric_tickness(p: ndarray, t: ndarray, mr: Optional[ndarray] = None) ndarray#

Calculate the thickness of a layer via the hypsometric equation. This thickness calculation uses the pressure and temperature profiles (and optionally mixing ratio) via the hypsometric equation with virtual temperature adjustment.

\[Z_2 - Z_1 = -\frac{R_d}{g} \int_{p_1}^{p_2} T_v d\ln p,\]

Which is based off of Equation 3.24 in [Hobbs2006]. This assumes a hydrostatic atmosphere.

Parameters:
  • p (numpy.ndarray) – Atmospheric pressure profile (mb)

  • t (numpy.ndarray) – Atmospheric temperature profile (K).

  • mr (Optional[numpy.ndarray], optional) – Mass mixing ratio (dimensionless kg/kg-1). Defaults to None.

Returns:

The thickness of the layers in kilometers

Return type:

numpy.ndarray

Note

This function is based on metpy.calc.thickness_hydrostatic method.