How does the ocean of air work?
The atmosphere weighs about 5.1 · 10¹⁸ kg. Pressure at the surface is simply the weight of the column of air above each square meter: 101,325 Pa, or about 100 kN per m² — like the weight of about 10 tonnes. We don't feel it, because it pushes equally from all sides, and the fluids and air in our bodies are at a similar pressure.
The barometric formula
p(h) = p0 · e−h/H, H = RTMg ≈ 8.4 kmEvery further H ≈ 8.4 km up reduces the pressure about e ≈ 2.72 times. The formula is exact only for a constant temperature. The simulation computes it more precisely, layer by layer, using the U.S. Standard Atmosphere 1976: in each layer the temperature changes linearly with altitude, and the pressure satisfies the equation of hydrostatic equilibrium:
p = pb · (TbTb + L(h − hb))gM/(RL)L — temperature gradient of the layer, e.g. −6.5 K/km in the troposphereThis gives T = 216.65 K (−56.5 °C) and p ≈ 22.6 kPa at an altitude of 11 km (strictly: 11 geopotential km, i.e. about 11.02 km above sea level), and half the sea-level pressure at about 5.5 km. The mass of air above us is proportional to the pressure, so half of the entire atmosphere lies below about 5.5 km, and 90% below about 16 km.
Why does the temperature fall in some places and rise in others?
- The troposphere is heated from below by the warm surface, so it gets colder higher up (on average 6.5 °C per km).
- The stratosphere is heated by ozone, which absorbs ultraviolet — the temperature rises to about 0 °C at about 50 km.
- The mesosphere has little ozone and radiates heat away strongly — at the mesopause (about 85 km) it is about −90 °C.
- The thermosphere is heated by the Sun's most energetic radiation (far UV and X-rays). Temperature is the average energy of molecular motion — here it reaches several hundred degrees, and over 1,000 °C when the Sun is active. Yet we wouldn't feel hot: there are hundreds of billions of times fewer molecules than near the ground, so they hardly transfer any heat. A thermometer in the shade would cool down, because it loses energy by radiation faster than it gains it from rare collisions.
Water boils at a lower temperature when pressure drops
log10 pmmHg = 8.07131 − 1730.63233.426 + tAntoine equation for water (1–100 °C)Water boils when its vapor pressure equals the pressure of its surroundings. On Rysy that is about 92 °C, on Everest about 70–72 °C, and at about 19 km — at 37 °C. Below the triple point (611.657 Pa, about 34–35 km) water cannot be a liquid at all.
The color of the sky: Rayleigh scattering
Iscat ∝ 1λ4, I(450 nm)I(700 nm) = (700450)4 ≈ 5.9Nitrogen and oxygen molecules are thousands of times smaller than the wavelength of light and scatter blue light several times more strongly than red. When the Sun is low, its light passes through a layer of air dozens of times thicker (about 38 times at the horizon) and loses most of its blue on the way — orange and red remain. Cloud droplets and aerosols are comparable to the wavelength or larger (Mie scattering) and scatter all colors almost equally, which is why clouds are white and haze is grayish.
Energy balance and the greenhouse effect
F = σT4, Te = (S0(1 − A)4σ)1/4 ≈ 255 KThe Stefan–Boltzmann law (σ = 5.67 · 10⁻⁸ W/(m²·K⁴)) says how much a body at temperature T radiates. Earth absorbs on average S0(1 − A)/4 ≈ 238 W/m² (the factor 4 is the ratio of the sphere's surface to the disk that intercepts the light). Without an atmosphere absorbing infrared, its temperature would be about 255 K (−18 °C), while the observed average is about 288 K (+15 °C). In a model with one gray layer that absorbs a fraction ε of the infrared:
Ts = Te · (22 − ε)1/4ε ≈ 0.78 gives about 288 K ΔF ≈ 5.35 · ln(CC0) W/m², ΔT ≈ ECS · ΔFΔF2×5.35 · ln 2 ≈ 3.71 W/m²Equilibrium climate sensitivity (ECS) is the warming after CO₂ doubles and equilibrium is reached. According to IPCC AR6 the best estimate is 3 °C, with a likely range of 2.5–4 °C. The dependence on concentration is logarithmic: each further doubling adds a similar amount of forcing.
Rising air and the foehn
Γd = gcp ≈ 9.8 K/km, Γw ≈ 4–7 K/km, zcloud ≈ 125 m · (T − Td)Rising air expands and cools by about 9.8 °C per km (the dry adiabat). Once it reaches its dew point, vapor condenses and releases heat — from then on it cools by only about 5–6 °C per km at typical temperatures (the moist adiabat; the colder it is, the closer to the dry one). In a foehn (in Poland called halny), the air loses its moisture as rain on the Slovak side, and on the Polish side it descends and warms by the full 9.8 °C per km. So at the bottom it is warmer and much drier than on the other side of the mountains.
- The temperature profile is the U.S. Standard Atmosphere 1976 (mid-latitudes, moderate solar activity). The real atmosphere changes with season, latitude and weather; the temperature of the thermosphere depends strongly on solar activity. Above 86 km we take pressure and density from this model's tables and interpolate.
- We compute the partial pressure of oxygen from a 20.95% share, which is accurate up to about 85 km. Higher up the composition changes (atomic oxygen dominates, then helium and hydrogen), so there we give it only as a rough guide.
- Sky color: single scattering only, three wavelengths (680, 550 and 440 nm), exponential density profiles, white balance matched to sunlight. We ignore multiple scattering, which is why twilight here is darker than in nature. Dust on Mars is described by a simple phenomenological model.
- Greenhouse effect: gray layers transparent to visible light that absorb all infrared equally; no convection, clouds or feedbacks. It is a model for understanding the mechanism, not a forecast.
- Foehn: a single air parcel, pseudo-adiabatic ascent (all condensed water falls out as precipitation), pressure from the standard atmosphere. In reality the foehn's warmth also comes from air descending from higher layers.
- Can and bottle: an ideal gas at constant volume; the shape of the dent is arbitrary.