In our previous posts (Absorption, Not Reflection and Glass Houses) we showed that heat enters the atmosphere by convection and absorption of radiation, and leaves by emission of radiation.
Let us examine this process of absorption and emission in more detail. Suppose a planet were surrounded by a transparent atmosphere. An atmosphere consisting entirely of oxygen and nitrogen would meet our requirements. Both gases are transparent to visible and infrared light, so they would absorb no radiation from the sun or from the planet. Heat would enter a transparent atmosphere only by convection from the planet's surface.
If heat is to leave this transparent atmosphere, it must do so by radiation. But can a transparent gas radiate heat? Imagine that we put a cubic meter of our transparent gas in a room with reflecting walls (we could use surface-coated mirrors). The cubic meter of gas is contained in a transparent balloon. Also in the room is a large, black box. We suck all the air out of the room with a vacuum pump. At the beginning of our experiment, the gas and the black box are at the same temperature. The black box radiates heat. This radiation passes through the vacuum and the transparent gas, reflects off the walls, and is re-absorbed by the black box.
Now, let us assume that our transparent gas radiates heat. If so, this radiation will be absorbed by the black box. The black box will warm up because is is absorbing the heat it radiates itself as well as the heat radiated by the gas. The gas, meanwhile, must cool down, because it is radiating heat but absorbing none at all, on account of its being transparent. The gas continues to cool down and the black box continues to heat up. Heat is passing, of itself, from one body to a hotter body.
The second law of thermodynamics states that heat cannot, of itself, pass from one body to a hotter body. A transparent gas that radiates heat violates this law. All gases, and indeed all objects, must absorb and emit radiation with the same ease. Any difference between a gas's ability to absorb radiation of a particular wavelength and its ability to emit radiation of the same wavelength amounts to a violation of the second law of thermodynamics.
The second law dictates that a transparent gas cannot radiate heat. The transparent atmosphere around our imaginary planet does not radiate heat. It retains all the heat it acquires by convection from the planet's surface. It continues to absorb heat by convection until the entire transparent atmosphere is at the same temperature as the planet surface, and at that point convection stops and the atmosphere is in thermal equilibrium with the planet surface.
If the atmosphere of the earth were made up only of nitrogen and oxygen, the entire atmosphere, from the troposphere to the exosphere, would be warm.
But the earth's atmosphere is not warm. The surface of the earth has an average temperature of 14°C. The atmosphere at altitude 10,000 m is at around −40°C. The earth's atmosphere is not warm because it radiates heat. It radiates heat because it is not transparent. It is not transparent because it contains carbon dioxide and water, both of which are good absorbers of infrared light, and therefore good emitters of infrared light also.