The atmosphere is divided into four main layers - the troposphere, stratosphere, mesosphere and thermosphere. The troposphere contains around 75% of the atmosphere's mass and is where most weather occurs. It contains uniform mixtures of gases. The stratosphere is around 50km thick and contains 1000 times less water but 1000 times more ozone than the troposphere. Greenhouse gases like carbon dioxide and water vapor in the troposphere absorb and re-emit infrared radiation, warming the Earth's surface and allowing life to exist.