Radiative equilibrium: gray vs non-grey — live

NoteRuns in your browser

This page runs climt itself in your browser via Pyodide — no install, no server-side compute. The first cell downloads an ~8 MB pure-Python wheel and boots the numpy/matplotlib stack, so give it a few seconds.

The wheel is installed at document setup from the pyodide: packages: entry in this page’s front matter, which micropip resolves from PyPI — pinned to the released version this page was written against.

Previewing unreleased changes: to run the page against your working copy rather than the released wheel, build the pure wheel and serve it with CORS headers (plain python -m http.server will not work, and GitHub release assets don’t send CORS either), then point the front matter at it:

CLIMT_PURE_PYTHON=1 python -m pip wheel . --no-deps -w /tmp/climt_wh
python docs/radiative-transfer/_live/serve_wheel.py /tmp/climt_wh 8912

Gray and non-grey longwave radiation are the same component here — one CorkLongwaveRadiation — differing only in the absorption table passed to it. The gray table (single_band_gray_lw) is a single band whose optical depth reproduces climt’s default gray scheme (GrayLongwaveRadiation); the non-grey table (earth_low_res_lw) resolves 14 bands of real H₂O/CO₂ line absorption. Change one string and re-run to see how spectral structure reshapes the equilibrium.

Each column is a single air parcel over a 5 m slab ocean, heated by a fixed absorbed shortwave flux at the surface and cooled by longwave radiation, stepped toward radiative equilibrium with sympl.AdamsBashforth.

Gray column

Running this cell steps the column toward radiative equilibrium and then draws its evolution — temperature, longwave heating rate and up/downwelling longwave flux profiles at several times, plus the top-of-atmosphere longwave flux (OLR) and surface temperature as time series. The integration runs to completion before the figure appears (a spinner shows while it computes); the gray column is quick.

Non-grey column — change one string

The only change is the absorption table: 14 bands of real H₂O/CO₂ line absorption instead of one gray band. That integration is heavier — expect it to take ~2 minutes in the browser (the spinner will spin the whole time), then the same evolution figure appears.

The non-grey column’s spectral windows let surface radiation escape directly to space, so it radiates more efficiently and settles to a different profile than the single-band gray column — cooler where the windows are transparent, with a steeper drop-off aloft. (At the default N_STEPS = 400 neither column is fully equilibrated; increase it to watch each profile settle.)

Why the gray column’s stratosphere is isothermal — and the non-grey one’s is not

Both setups have no shortwave absorption in the atmosphere — sunlight is absorbed only at the surface (there is no ozone, and the longwave-only radiation does not heat the air with sunlight). In the gray column the upper atmosphere therefore relaxes to a constant skin temperature: the isothermal top the first figure labels, spanning roughly 20 → 4 hPa. Note the log-pressure vertical axis — on a linear one that layer is under 2% of the panel and effectively invisible.

The non-grey column has no isothermal layer at all: it keeps cooling right up to the model lid, which is why its figure is labelled differently. A single gray opacity gives every layer the same skin temperature, but with 14 bands the topmost layers are optically thin in the windows and absorb only in the strong H₂O/CO₂ bands — where the upwelling flux was emitted by the cold levels just below. Each thinner layer aloft therefore settles colder than the one beneath it, and the profile never flattens.

Both differ from Earth’s real stratosphere, where ozone absorbs ultraviolet sunlight and drives a temperature inversion (temperature rising with height). Add a shortwave component with ozone and these tops would tilt into that inversion — a natural next experiment.