The Earth has an atmosphere, consisting mostly of nitrogen (78%), oxygen (21%) and a number of greenhouse gases, which affect the balance of light and ultraviolet energy coming from the Sun and heat energy leaving the Earth, the global energy balance. The greenhouse gases, including carbon dioxide, methane, nitrous oxide and water vapour, absorb energy at some wavelengths of the electromagnetic spectrum, but allow energy at other wavelengths to pass through unimpeded. Shorter wavelength sunlight passes through the atmosphere relatively unimpeded, although the ozone layer does absorb a lot of higher wavelength ultraviolet energy. This heats up the Earth's surface, causing it to re-release energy back to the atmosphere. The lower wavelength heat (or infrared) energy given off by the Earth, however, is mostly trapped (absorbed) by the greenhouse gases, and is prevented from escaping directly back into space. This trapped heat warms the Earth's surface on average by as much as 33C. The process is called the natural greenhouse effect, and without it, the Earth would be as cold as the moon, about -18C.
The atmosphere also contains millions of microscopic particles called aerosols, which scatter sunlight. The scattering of sunlight by the atmosphere is important because like the natural greenhouse effect, this can affect the amount of energy stored in the atmosphere, and therefore the Earth's climate.
Changes in the composition of the atmosphere can be a mechanism of climate change. A change in the greenhouse gas content of the atmosphere will affect the amount of energy stored in the atmosphere. For example, if the amount of carbon dioxide in the atmosphere is increased, more heat will be trapped in the atmosphere. This enhanced greenhouse effect raises the Earth's surface temperature. Changes in the amount of greenhouse gases in the atmosphere can occur in numerous ways. Natural changes in the amount of carbon dioxide stored in the atmosphere occurred at the end of the last Ice Age. A 50% increase in carbon dioxide levels coincided with a 5C rise in global average surface temperature. Today, mankind through the burning of fossil fuels for energy and transportation, and changing land use, has produced a substantial change in the atmospheric composition over most recent centuries, and it is feared that this continuing change will lead to global warming.