# thickness_hydrostatic_from_relative_humidity¶

metpy.calc.thickness_hydrostatic_from_relative_humidity(pressure, temperature, relative_humidity, bottom=None, depth=None)

Calculate the thickness of a layer given pressure, temperature and relative humidity.

Similar to thickness_hydrostatic, this thickness calculation uses the pressure, temperature, and relative humidity profiles 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]. Virtual temperature is calculated from the profiles of temperature and relative humidity.

This assumes a hydrostatic atmosphere.

Layer bottom and depth specified in pressure.

Parameters
Returns

pint.Quantity – The thickness of the layer in meters

Notes

Only functions on 1D profiles (not higher-dimension vertical cross sections or grids). Since this function returns scalar values when given a profile, this will return Pint Quantities even when given xarray DataArray profiles.