Skip to content
Tutorials Center
My learning

Topics

Lesson 25 of 37 · Water and the Atmosphere

The Atmosphere: Layers and Composition

Explore what air is made of, the four main layers from troposphere to thermosphere, why temperature changes with height and how air pressure falls as you climb.

The atmosphere is the blanket of gas around Earth, held in place by gravity. It gives us air to breathe, shields us from harmful ultraviolet light and most meteors, warms the planet and is the stage for weather. Compared with Earth's radius of about 6,371 km, it is extremely thin: about half of all the air lies below 5.5 km, and more than 99% lies below roughly 32 km.

Composition

Dry air near the ground is made of:

Gas Share of dry air (by volume, approx.)
Nitrogen (N₂) 78.08%
Oxygen (O₂) 20.95%
Argon (Ar) 0.93%
Carbon dioxide (CO₂) about 0.04% (roughly 420 ppm)
Neon, helium, methane, others traces

Water vapor is added to this and varies from almost 0% in cold deserts to about 4% in hot, humid air. CO₂ is only a tiny fraction, but it matters a lot for climate, as you see in the next lesson. Its concentration has risen from about 280 ppm before the Industrial Revolution to more than 420 ppm today.

Ozone (O₃) is a trace gas, but the ozone layer in the stratosphere absorbs most of the Sun's harmful ultraviolet-B and ultraviolet-C light.

The layers

Scientists divide the atmosphere into layers by how temperature changes with height. Heights are approximate and shift with latitude and season.

Layer Approx. altitude Temperature trend Notes
Troposphere 0 to about 12 km (about 8 km at the poles, up to 18 km at the equator) Falls with height, about 6.5 °C per km on average Holds most of the air and almost all weather
Stratosphere to about 50 km Rises with height Ozone layer absorbs ultraviolet and warms the air; jets fly near its base
Mesosphere to about 85 km Falls with height Coldest region (about −90 °C); most meteors burn up here
Thermosphere to about 600 km and beyond Rises with height Very thin air, aurorae, the International Space Station orbits here

The boundaries are the tropopause, stratopause and mesopause. The exosphere is the faint outer fringe where the air merges into space. There is no sharp upper edge; the Kármán line at 100 km is a convention for the boundary of space.

flowchart BT
    T["Troposphere: weather, temperature falls"] --> S["Stratosphere: ozone, temperature rises"]
    S --> M["Mesosphere: temperature falls"]
    M --> H["Thermosphere: temperature rises"]

Layers from the ground (bottom) upward. The direction of the temperature change flips at each boundary.

Why does the stratosphere get warmer with height? Ozone absorbs ultraviolet energy there. Why does the thermosphere get hot? Individual molecules absorb high-energy solar radiation; the air is so thin, though, that it would not feel hot to a person: there are too few particles to transfer heat.

Air pressure and height

Air pressure is the weight of the air above you pressing on each unit of area. At sea level it averages 101.325 kPa (1013.25 hPa). Pressure falls with height because there is less air above. A simple model for this is an exponential decline:

p(h) = p₀ × e^(−h/H)

where H is the scale height (about 7 to 8.5 km in the lower atmosphere). It is only an approximation, since temperature changes with height, but it captures the pattern: pressure drops by about the same fraction for each equal climb.

Python Air pressure at different heights (exponential model)

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that at Everest's summit the model gives about 31% of sea-level pressure, close to the real value near one third. That is why climbers need extra oxygen: oxygen is still about 21% of the air, but each breath contains only a third as many molecules.

Temperature with height in the troposphere

In the troposphere, air temperature falls on average 6.5 °C for each kilometer (the environmental lapse rate in the standard atmosphere). This is why mountain tops are cold and snow-capped even in warm countries.

Python Temperature at altitude (standard lapse rate)

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Real temperatures on a given day differ a lot from the standard estimate; use the number only as a model.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Which gas makes up about 78% of dry air?

    Nitrogen is 78.08%, oxygen about 21%, argon about 0.9%.
  2. 2. In which layer does most weather occur?

    The troposphere holds most of the air and almost all clouds and weather.
  3. 3. Why does temperature rise with height in the stratosphere?

    The ozone layer absorbs UV light and warms the stratosphere.
  4. 4. Air pressure decreases with height mainly because

    Pressure is the weight of the air above, and less air lies above you as you climb.

Summary

  • Dry air is about 78% N₂, 21% O₂, 0.9% Ar and about 0.04% CO₂, plus variable water vapor.
  • The layers (troposphere, stratosphere, mesosphere, thermosphere) are defined by temperature trends.
  • Pressure falls roughly exponentially with height; about half of the air lies below 5.5 km.
  • In the troposphere, temperature falls about 6.5 °C per km on average.
  • The ozone layer in the stratosphere absorbs most harmful UV.

Next: Energy Balance and the Greenhouse Effect