For a gas parcel, the density will only remain fixed as assumed in the previous derivation if the pressure, P, is constant with height, which is not true in an atmosphere confined by gravity. Instead, the parcel will expand adiabatically as the pressure declines. Therefore, a more general formulation used in meteorology is: N \equiv \sqrt{\frac{g}{\theta} \frac{d\theta}{dz}}, where \theta is
potential temperature, g is the local acceleration of
gravity, and z is
geometric height. Since \theta = T (P_0/P)^{R/c_P}, where P_0 is a constant reference pressure, for a perfect gas this expression is equivalent to:N^2 \equiv g\left(\frac{1}{T}\frac{dT}{dz} - \frac{R}{c_P}\frac{1}{P}\frac{dP}{dz}\right) = g \left(\frac{1}{T}\frac{dT}{dz} - \frac{\gamma - 1}{\gamma}\frac{1}{P}\frac{dP}{dz}\right),where in the last form \gamma = c_P/c_V, the
adiabatic index. Using the
ideal gas law, we can eliminate the temperature to express N^2 in terms of pressure and density:N^2 \equiv g\left(\frac{1}{\gamma}\frac{1}{P}\frac{dP}{dz} - \frac{1}{\rho}\frac{d\rho}{dz}\right) = g\left(\frac{1}{\gamma}\frac{d\ln P}{dz} - \frac{d\ln\rho}{dz}\right). This version is in fact more general than the first, as it applies when the chemical composition of the gas varies with height, and also for imperfect gases with variable adiabatic index, in which case \gamma \equiv \gamma_{01}= \left(\frac{\partial \ln P}{\partial \ln \rho}\right)_{S}, i.e. the derivative is taken at constant
entropy, S. If a gas parcel is pushed up and N^2>0, the air parcel will move up and down around the height where the density of the parcel matches the density of the surrounding air. If the air parcel is pushed up and N^2=0, the air parcel will not move any further. If the air parcel is pushed up and N^2, (i.e. the Brunt–Väisälä frequency is imaginary), then the air parcel will rise and rise unless N^2 becomes positive or zero again further up in the atmosphere. In practice this leads to convection, and hence the
Schwarzschild criterion for stability against convection (or the
Ledoux criterion if there is compositional stratification) is equivalent to the statement that N^2 should be positive. The Brunt–Väisälä frequency commonly appears in the thermodynamic equations for the atmosphere and in the structure of stars. ==In oceanography==