Buoyancy
In any atmosphere, gases that are hotter and lighter tend to rise while gases that are cooler and denser tend to sink.
Raindrops & Balloons
A raindrop falls because the water it contains is denser than the surrounding air. A hot-air balloon rises because the air within it is less dense than the air outside of it. The air pressure inside of the balloon is the same as in atmospheric air at the same altitude, but the hot air has less mass than a similar volume of the surrounding atmosphere. Consequently, the gravitational force pulling the balloon toward Earth is less than the difference in pressure forces between the bottom of the balloon and the top. The balloon therefore rises.
Buoyant Acceleration
A local imbalance between gravitational force and net pressure force produces the effect known as buoyancy. In an atmosphere otherwise in equilibrium, buoyancy results in an acceleration $$ \frac {dv_r} {dt} = − \frac {1} {\rho} \frac {dP} {dr} − g = − \left( 1−\frac {\bar \rho} {\rho} \right) g$$ where $\rho$ is the local density and ${\bar \rho}$ is the mean density of the surrounding atmosphere. This equation simply represents a modification of the equation of hydrostatic equilibrium (in which $dP/dr=−g {\bar \rho}$) to account for a local difference in density.
If the local density is much greater than average $(\rho \gg {\bar \rho})$, then gravity pulls that part of the atmosphere downward with an acceleration of magnitude $g$. However, the simple equation above leads to a confusing result if the local density is much less than average $(\rho \ll {\bar \rho})$, as it would be in a buoyant air bubble rising through water. That is because it does not account for the forces needed to pull the surrounding water out of the way of the rising bubble.
A bubble can’t rise any faster than gravity can pull the water around it downward. Therefore, the magnitude of a bubble’s upward acceleration is approximately equal to $g$, with the details depending on the bubble’s shape and sometimes on the viscosity of the material around it.
Equation of State
A low-density patch of the atmosphere can continue to rise as long as its local density remains less than the density of the surrounding atmosphere. However, the atmospheric pressure confining the bubble decreases as the bubble rises, and generally so does the atmospheric density.
One way to express the relationship between atmospheric density and pressure is with the equation of state $$P = K \rho^\gamma$$in which the exponent $\gamma$ represents how pressure responds to changes in density if the factor $K$ remains constant. A bubble that is less dense than surrounding gas at the same pressure must contain gas with a larger value of $K$.
Whether or not a buoyant bubble continues to rise therefore depends on how the bubble’s value of $K$ compares with the mean value $\bar{K}$ in the rest of the atmosphere at the same altitude. If the mean value increases with altitude, then a bubble with a constant value of $K$ may eventually reach an altitude at which $K = \bar{K}$, where the density of the bubble is equal to the mean atmospheric density. At that altitude, the bubble is no longer buoyant and ceases to accelerate upward.
Buoyancy & Heat
Considering how $K$ might change provides some insight into the connection between buoyancy and heat. Comparing the equation of state $P = K \rho^\gamma$ with the ideal gas law $P = \rho kT / \mu m_p$ implies that $K = (kT / \mu m_p) \rho^{1-\gamma}$. Heating a local region of the atmosphere without allowing its volume to change therefore increases its value of $K$. The region’s pressure is then greater than the surrounding pressure, and so it expands. As the gas density within that region declines, it becomes more buoyant.
Cooling a region of the atmosphere has the opposite effect. The local value of $K$ decreases, allowing the surrounding gas pressure to compress that region. Its density therefore rises, making the cooled region less buoyant than its surroundings.
Specific Entropy
In general, the volume of a heated atmospheric region does not remain constant while the heating is happening. As the region is being heated, its total volume $V$ increases by an amount $\Delta V$. Consequently, the total thermal energy $U$ of the region changes by an amount $$\Delta U = \Delta Q - P \, \Delta V$$where $\Delta Q$ is the amount of heat added and $P \, \Delta V$ is the work done against the pressure forces attempting to confine the region as it expands.
Typically, the thermal energy density $u = U/V$ of a gas is closely related to its pressure. Rewriting the equation for thermal energy change in terms of $u$ results in $$\Delta u = \frac {\Delta Q} {V} - \left( u + P \right) \frac {\Delta V} {V}$$Dividing by $u$ and noting that $\Delta V / V = - \Delta \rho / \rho$ then gives $$\frac {\Delta u} {u} - \left( 1 + \frac {P} {u} \right) \frac {\Delta \rho} {\rho} = \frac {\Delta Q} {U}$$A gas in which $P/u$ remains constant therefore obeys the relation $$\Delta \ln K = \frac {\Delta K} {K} = \frac {\Delta Q} {U}$$given $K = P / \rho^\gamma$ and $\gamma = 1 + P/u$. This relation shows that neither compression nor rarefaction acting without heat input can change $K$, meaning that changes in $K$ correspond directly to changes in heat energy.
According to classical thermodynamics, the equation $$\Delta S = \frac {\Delta Q} {T}$$defines the entropy $S$ of a thermodynamic system. Noting that $u/P = 3/2$ in a simple ideal gas then allows us to relate $K$ to $S$. The equation relating $\Delta K$ to $\Delta Q$ becomes $$\Delta \ln K = \frac {2} {3} \frac {\Delta Q} {N kT} = \frac {2} {3} \frac {\Delta S} {N k}$$in which $(\Delta S)/N$ is the change in entropy per gas particle, also known as the specific entropy of the gas. In other words, the quantity $K$ directly tracks the specific entropy of atmospheric gas.