How WebGCM works
Part 5: A dry sphere
Putting the pieces together on a spinning globe.
Part 1 built a row of columns of air and watched one of them warm. Part 2 set the planet spinning. Part 3 built a grid that covers the sphere evenly, decided where on each cell the numbers live, and sliced the air above each cell into layers. Part 4 took apart the rules that move the air, one term at a time. This part lets them run on the whole globe. It starts with the simplest atmosphere there is, a single layer of fluid over the whole globe, and every globe in it is the model's own equations running live in your browser. Drag them to turn them.
One layer of fluid
Imagine the atmosphere replaced by a layer of water a few kilometers deep covering the whole planet. It is a better caricature than it sounds. The air is about ten kilometers deep and the planet forty thousand kilometers around, so, like water in a wide pan, it moves almost entirely sideways. A layer like that obeys the shallow-water equations, a one-layer cousin of the rules of Part 4, and they need only the two kinds of number that Part 3 arranged: the depth of the layer at each cell's center and the water's speed across each edge.
The depth follows the first rule of Part 4. Each step, a cell gets deeper or shallower by however much water flows in or out through its edges. Whatever leaves one cell enters its neighbor, so the total amount of water never changes except by rounding in the fourteenth digit, which the jet figure below reports as it runs.
The speed across an edge follows another. It changes for three reasons. The surface may slope between the two cells, and water runs downhill: on a layer of fluid, the slope of the surface is the pressure gradient force of Parts 1 and 4. The Coriolis force turns the flow, computed from the along-edge wind that TRiSK reconstructs. And the water carries its own motion along with it, the advection of Part 4. A little smoothing at the scale of the grid mops up the finest wiggles that the arithmetic leaves behind. The real model's air is a stack of layers like this one, each with its own depth and winds; this part comes to that later.
Dropping a stone
Start with the water at rest and drop a hump of extra water onto it, the way a stone dropped in a pond makes a splash. Then change how fast the planet spins.
With no spin, the hump collapses within hours into a ring of gravity waves racing outward at about 200 m/s. On a sphere the ring has nowhere to go but around: it meets itself on the far side of the planet about 28 hours later and comes back, refocusing near where it started after about two and a half days. Nothing stays behind.
With the Earth's spin, the water rushing outward is turned by the Coriolis force before it gets far, and about a fifth of the hump stays, as a dome the water circles clockwise. That is the geostrophic balance of Part 2, assembled by the fluid on its own: it is called geostrophic adjustment. How much stays depends on the hump's size compared with the Rossby radius of deformation, the gravity-wave speed divided by the Coriolis parameter, about 1,900 km here. Humps much wider than it are mostly kept, and narrower ones are mostly radiated away as waves. Spin the planet four times faster and the radius shrinks to 480 km, and about two-thirds of the hump stays.
The dome does not stay put, either. It drifts west, by 15 to 20 degrees of longitude a day at the Earth's spin. A drifting pattern like that is a Rossby wave, and it comes from the same cause as the creeping circles of Part 2. The water circling the dome runs east on its poleward side and west on its equatorward side, and the Coriolis force is stronger on the poleward side, which leaves the dome with a net push toward the equator. A steady drift west is what it takes to balance that push.
Breaking a jet
Balance is not the same as stability. The figure below starts with a narrow jet blowing east around the northern midlatitudes, with the surface sloped so that the pressure gradient balances it exactly, mostly against the Coriolis force and partly against the curve of the jet's path around the pole. This is one of the standard tests a model is checked against, set out by Galewsky, Scott and Polvani in 2004. The colors show how fast the fluid spins about the vertical, its vorticity, the curl of Part 3: the jet's poleward side spins one way and its equatorward side the other.
In exact balance the jet should blow forever. It does not, because a jet this narrow is unstable: any wiggle in it can grow by drawing energy from the difference in speed across it, a process called barotropic instability. With a small bump in the surface, the jet begins to meander on the third day, and by the fifth or sixth it has rolled up into a chain of vortices.
Now restart it perfectly smooth. In a perfect world nothing would happen. On this grid the jet breaks anyway: it starts less than a day later than the bumped jet and is just as broken by the sixth day, and in both cases the pattern it breaks into has five waves around the globe. That five is no accident: it is the grid. The icosahedron the grid was built from has five triangles around each pole and five pentagons ringing each hemisphere at 27 degrees of latitude, so whatever small errors the grid makes, the misses of Part 3 among them, it makes five times around the globe, and the jet amplifies them. A finer grid makes the errors smaller and delays the breakup, but never removes the imprint, which is why the smooth jet is part of the test: it measures how loudly a model's grid speaks.
A wave that runs against the wind
The dome's drift was a hint of a whole family of waves. This figure starts with a pattern of four highs and four lows ringing each hemisphere, with the wind blowing around them in balance and the whole layer turning eastward with the planet. It is another standard test, a Rossby–Haurwitz wave, chosen because its shape is known to survive for weeks: whatever happens to it is the model's doing.
The wind carries the fluid east at 39 degrees of longitude a day, but the pattern moves east at only about 11. Relative to the air it lives in, the pattern runs west at about 28 degrees a day. That is the signature of a Rossby wave: it travels west relative to the flow, because a parcel nudged north finds itself where the planet spins faster about the vertical and is turned back, and the turning shifts the pattern westward. The wide meanders of the jet stream on a weather map are Rossby waves, and they are why the weather in the middle latitudes comes in a sequence of highs and lows.
Stacking layers
One layer can carry waves and jets, but it cannot carry weather. Weather needs the atmosphere to be warmer in some places than others at the same height, and a single layer has only one temperature. So the model stacks layers, the same way Part 1 did. Each layer is a fixed share of the air above each point, a slice between two values of σ, the sigma coordinate of Part 3. Each behaves much like the layer of water above, with its own winds across the edges and its own potential temperature at the cell centers, and the rules of Part 4 tie them together: a warm column stands taller and lifts every layer above it, setting them sliding downhill, and air passes between the layers where it rises or sinks. Those are the primitive equations, now running on the sphere. The model runs below use 27 layers; the climate model uses 36.
A stack of layers can hold something a single layer cannot: temperature that changes from the equator to the poles at the same height. This cross-section cuts through the atmosphere from pole to pole. It shows the starting state of the next standard test, the baroclinic wave of Jablonowski and Williamson, set out in 2006, which Part 4 took apart term by term on its ninth day: cold air over the poles and warm air over the tropics.
The white lines are surfaces of equal potential temperature, and they slope up toward the poles: the air over the poles is colder, so to find air with the same θ you have to go higher. The blue contours are the wind, two jets blowing east at 35 m/s near 250 hPa, about ten kilometers up. The jets and the slope are tied together. The temperature difference makes the pressure surfaces slope more steeply the higher you go, so the geostrophic wind grows with height. That link is called the thermal wind, and it is why the jet streams sit where the contrast between cold and warm air is sharpest.
Storms from a sloping atmosphere
Sloping surfaces of potential temperature are a store of energy. If cold air slides down under the warm air and the warm air rides up over it, the surfaces flatten, the air's center of mass drops, and the energy that releases goes into motion. A balanced atmosphere does not do this on its own, but it is unstable: the smallest nudge sets it off. That is baroclinic instability, the engine of the storms of the middle latitudes. The test nudges the jet with a bump of wind of just 1 m/s at 40° north, and lets the model run.
For six days almost nothing happens. Then a train of lows and highs grows along the jet, deepening faster every day until about day ten, when the waves begin to break: by day eight the lowest surface pressure is 989 hPa, by day ten it is 961 hPa, with highs of 1,024 hPa between the lows, and by day twelve the deepest low is down to 935 hPa. Turn the globe south and the southern jet, which the test never nudged, is breaking too, into five identical lows around the globe: nudged only by the grid's own errors, the same five as the smooth jet above. On this coarse grid, with cells about 450 km across, the storms deepen more slowly than they do at high resolution, where the low reaches about 940 hPa by day ten. The temperature 1.5 km up shows what the storms are doing: tongues of cold air swing toward the equator behind each low and tongues of warm air swing toward the pole ahead of it, the beginnings of fronts. Each storm is carrying heat poleward and flattening the slope that made it.
Sunlight as the only forcing
Everything so far started from a carefully arranged state and ran down from it. A climate has to be kept going: something must keep heating the tropics and cooling the poles, and something must take momentum out of the wind at the ground. The simplest recipe for a dry planet is the one Isaac Held and Max Suarez published in 1994, so that models could be compared on equal terms. It stands in for sunlight and radiation with a single rule: everywhere, the temperature is nudged toward a target, warm at the equator and cold at the poles with a stratosphere on top, gently, over 40 days in most of the atmosphere and over 4 days near the ground in the tropics. It stands in for the ground's drag by slowing the wind in the lowest 30 percent of the atmosphere, within a day at the surface. There is no water, no cloud, no ocean, no mountain and no season.
The target has no wind in it: it is the temperature that radiation alone would set up if the air could not move. Switch to what the atmosphere settles on, averaged over its last hundred days. Two things have changed. The tropics end up a few degrees cooler than the target and the poles 15 to 20 degrees warmer, so the surfaces of equal potential temperature are flatter: near the ground the contrast between the equator and 60 degrees of latitude is 37 K, against the 48 K the target asks for. The storms are carrying heat toward the poles faster than the forcing can pile the contrast back up. And jets have appeared that the recipe never mentions, 32 m/s at 42 degrees of latitude in each hemisphere, near 230 hPa. At the ground the winds come in bands: westerlies of up to 9 m/s around 45 degrees, easterly trade winds of about 9 m/s at 15 to 20 degrees on either side of the equator, and weak easterlies near the poles. That is the pattern of surface winds sailors learned, and nothing in the forcing asks for it. It comes from the storms, which carry momentum as well as heat, gathering westerly momentum into the middle latitudes.
Play the first 120 days. The run starts from rest, with the temperature already at the target and a sprinkling of random noise a tenth of a degree strong. The target's steep contrast is far more unstable than the jets of the last section. The noise's imprint on the surface pressure grows nearly twofold every day, storms fill the middle latitudes of both hemispheres by the eighth day, and the first burst around day 15 is the strongest the run ever sees, as the atmosphere spends the energy stored in the starting slope. Then the storms settle into a steadier churn, a little over half as strong, and by about day 100 the climate's averages stop changing. Switch to the settled month to watch it: lows forming, deepening and drifting east along the storm tracks of both hemispheres, and no two days alike. The averages above are steady, but the weather never repeats.
From here to the climate
That is the dry heart of WebGCM: a grid of nearly equal cells, pressure at their centers and wind across their edges, layers stacked in σ, and the primitive equations stepping them forward. Under the simplest possible forcing it already makes a planet with jet streams, trade winds, storm tracks and weather that never repeats. The climate model replaces the forcing with the real thing: sunlight that follows the day and the seasons, radiation through gases and clouds, water that evaporates, condenses and rains with the heat that releases, an ocean with its own currents and sea ice, land with soil, snow and mountains, and turbulence near the ground. Each of those pieces of the real climate deserves a part of its own: radiation first, since it works in a dry atmosphere, then water, then the ocean, and the land last.