When a parcel of air rises, the pressure around it drops, it expands, and it cools on its own without exchanging heat with its surroundings; this is adiabatic cooling. As long as no water vapor condenses, it cools about 10 °C for every kilometer, but once it reaches its dew point and clouds start to form, condensation releases heat and it cools only about 5 °C per kilometer. Whether a parcel cools faster or slower than the air around it decides whether the atmosphere is stable or unstable, and the föhn, air that warms as it descends after crossing a mountain, works the same way. In the first diagram, changing the surface temperature changes the height of the cloud base, and in the second, changing the surrounding lapse rate changes the stability of the atmosphere.
Last updated