# Hypsometric equation

The hypsometric equation, also known as the thickness equation, relates an atmospheric pressure ratio to the equivalent thickness of an atmospheric layer considering the layer mean of virtual temperature, gravity, and occasionally wind. It is derived from the hydrostatic equation and the ideal gas law.

## Formulation

The hypsometric equation is expressed as: $h=z_{2}-z_{1}={\frac {R\cdot {\overline {T_{v}}}}{g}}\,\ln \left({\frac {p_{1}}{p_{2}}}\right),$ where:
* $h$ = thickness of the layer [m],
* $z$ = geometric height [m],
* $R$ = specific gas constant for dry air,
* ${\overline {T_{v}}}$ = mean virtual temperature in Kelvin [K],
* $g$ = gravitational acceleration [m/s$^2$],
* $p$ = pressure [Pa].
In meteorology, $p_{1}$ and $p_{2}$ are isobaric surfaces. In radiosonde observation, the hypsometric equation can be used to compute the height of a pressure level given the height of a reference pressure level and the mean virtual temperature in between. Then, the newly computed height can be used as a new reference level to compute the height of the next level given the mean virtual temperature in between, and so on.

## Derivation

The hydrostatic equation:
    $p=\rho \cdot g\cdot z,$
where $\rho$ is the density [kg/m$^3$], is used to generate the equation for hydrostatic equilibrium, written in differential form:
    $dp=-\rho \cdot g\cdot dz.$
This is combined with the ideal gas law:
    $p=\rho \cdot R\cdot T_{v}$
to eliminate $\rho$:
    ${\frac {\mathrm {d} p}{p}}={\frac {-g}{R\cdot T_{v}}}\,\mathrm {d} z.$
This is integrated from $z_{1}$ to $z_{2}$:
    $\int _{p(z_{1})}^{p(z_{2})}{\frac {\mathrm {d} p}{p}}=\int _{z_{1}}^{z_{2}}{\frac {-g}{R\cdot T_{v}}}\,\mathrm {d} z.$
R and g are constant with z, so they can be brought outside the integral. If temperature varies linearly with z (e.g., given a small change in z), it can also be brought outside the integral when replaced with ${\overline {T_{v}}}$, the average virtual temperature between $z_{1}$ and $z_{2}$.
    $\int _{p(z_{1})}^{p(z_{2})}{\frac {\mathrm {d} p}{p}}={\frac {-g}{R\cdot {\overline {T_{v}}}}}\int _{z_{1}}^{z_{2}}\,\mathrm {d} z.$
Integration gives
    $\ln \left({\frac {p(z_{2})}{p(z_{1})}}\right)={\frac {-g}{R\cdot {\overline {T_{v}}}}}(z_{2}-z_{1}),$
simplifying to
    $\ln \left({\frac {p_{1}}{p_{2}}}\right)={\frac {g}{R\cdot {\overline {T_{v}}}}}(z_{2}-z_{1}).$
Rearranging:
    $z_{2}-z_{1}={\frac {R\cdot {\overline {T_{v}}}}{g}}\ln \left({\frac {p_{1}}{p_{2}}}\right),$
or, eliminating the natural log:
    ${\frac {p_{1}}{p_{2}}}=e^{{\frac {g}{R\cdot {\overline {T_{v}}}}}\cdot (z_{2}-z_{1})}.$

## Correction

The Eötvös effect can be taken into account as a correction to the hypsometric equation. Physically, using a frame of reference that rotates with Earth, an air mass moving eastward effectively weighs less, which corresponds to an increase in thickness between pressure levels, and vice versa. The corrected hypsometric equation follows: $h=z_{2}-z_{1}={\frac {R\cdot {\overline {T_{v}}}}{g(1+A)}}\cdot \ln \left({\frac {p_{1}}{p_{2}}}\right),$ where the correction due to the Eötvös effect, A, can be expressed as follows: $A=-{\frac {1}{g}}\left(2\Omega {\overline {u}}\cos \phi +{\frac {{\overline {u}}^{2}+{\overline {v}}^{2}}{r}}\right),$ where
* $\Omega$ = Earth rotation rate,
* $\phi$ = latitude,
* $r$ = distance from Earth center to the air mass,
* ${\overline {u}}$ = mean velocity in longitudinal direction (east-west), and
* ${\overline {v}}$ = mean velocity in latitudinal direction (north-south).
This correction is considerable in tropical large-scale atmospheric motion.