Incoming shortwave radiation from the sun passes through the atmosphere to reach the earth surface, some of it is reflected back into space by the atmosphere or surface but most of it is absorbed by the surface, causing it to warm up. The warmed surface then emits longwave radiation to the atmosphere, which is absorbed by greenhouse gases, causing it to warm up. Greenhouse gases, such as carbon dioxide, methane, nitrous oxide, water vapour, halocarbons and ozone, are good absorbers of longwave radiation. When they absorb longwave radiation, they re-radiate it in all directions, some escape back into space, while most of it is absorbed by the surface or other gas molecules in the atmosphere.