Density and Scale Height

The relationship between temperature, pressue and density in an atmosphere is controlled by a balance between gravity and pressure forces (hydrostatic equilbrium). One can combine this with the ideal gas law to find the pressure P(z) as a function of altitude, and the pressure scale height H(z). H(z) is the pathlength over which the pressure decreases by a factor of e; a small scale height means that the pressure decreases rapidly with altitude. It is roughly 20 km for most planets.

The density (z) can be derived similarly, as well as the density scale height H*(z), where we neglect any z gradients in ua or gp as negligible.