Climate Change: Simple, Serious, Solvable › Models
Panes of Glass: The Layer Model of the Greenhouse Effect
Clear panes let Sunlight through and absorb the Earthlight coming up from the ground. Each pane glows too, up and down. Stack more panes over the ground and see how warm it has to get to push the heat out.
Panes of glass over black ground
- Sunlight
- Earthlight
- The numbers beside the arrows are in W/m².
| Level | Temperature | Takes in (W/m²) | Emits (W/m²) |
|---|
Heat in equals heat out. Every pane and the ground settle at the temperature where they emit as much as they take in. A pane emits from both of its sides, so the level under it gets half of what the pane emits. The numbers are rounded to whole W/m², so a sum in the table can be 1 off.
These panes are perfect, and the air between them is still. Each pane absorbs all the Earthlight that reaches it, and nothing but light moves heat. The real atmosphere is more like one pane that's leaky and stirred. The next model, Leaky and Stirred, takes that step. The About tab has every equation.
About this model
This is the layer model of Chapter 3: panes of clear glass stacked over a slab of black glass. Sunlight passes right through the panes and warms the slab, which plays the ground. The ground emits Earthlight, which is thermal infrared radiation, and each pane absorbs every bit of the Earthlight that reaches it. The panes warm up and emit Earthlight too, equally up and down, because a pane has two sides.
The rule for every level is the book's: heat in equals heat out. Each pane and the ground settle at the temperature where they emit as much as they take in. With the Earth's Sunlight and albedo and no panes at all, the ground settles at 255 K (−18 °C, −1 °F), the equilibrium temperature of Chapter 3. One pane warms it to 303 K (30 °C, 86 °F), and two warm it to 335 K (62 °C, 143 °F). Those are the numbers in Figure 3.3 of the book. The top pane is at 255 K however many panes are under it.
The real Earth's surface averages about 288 K (15 °C, 59 °F), which is warmer than no panes and cooler than one. As Chapter 3 says, the real atmosphere is more like one pane that's leaky and stirred. The next model, Leaky and Stirred, takes that step.
How to use this page
The page has one view, "The panes". Its drawing shows the stack from the side, with space at the top and the ground at the bottom. The straight arrows are Sunlight, on its way down through the panes to the ground. The wavy arrows are Earthlight: each level sends some up, and each pane sends as much down as it sends up. The number beside an arrow is the flow of energy in W/m². Each pane's temperature is at its right-hand end, and the ground's is written on the ground.
You can change three things:
- The number of panes, from 0 to 10. The page opens with 1.
- The Sunlight on a square meter that faces the Sun, from 800 to 1,500 W/m². The page opens at 1,361 W/m², the Earth's.
- The albedo, which is the share of the Sunlight that the planet reflects, from 0% to 90%. The page opens at 30%, the Earth's.
Under the drawing, a few lines say how warm the ground is and how much the panes have warmed it. Below them, a table gives each level's heat budget: its temperature, what it takes in and what it emits. "Back to one pane and the Earth's Sunlight" puts every control back where it started.
The address in your browser changes as you move the controls, so you can bookmark a view or send it to someone. Nothing is sent anywhere as you work.
This page is part of the website for Climate Change: Simple, Serious, Solvable, an open textbook by Scott Denning. It goes with Chapter 3, "How Climate Works".
The equations
You don't need any of this to use the page. But the whole model is five short steps, and you can follow every one of them with a calculator.
The model asks one question of every level: how warm does it have to be to emit as much as it takes in? A level that takes in more than it emits warms up, and a warmer level emits more. So each level ends up at the one temperature where the two are equal. The model goes straight to those temperatures.
You choose three things:
- the number of panes, N
- the Sunlight, S, on a square meter that faces the Sun. For the Earth it's the solar constant of Chapter 2.
- the albedo, α (the Greek letter alpha), which is the share of the Sunlight that the planet reflects
One number never changes:
| Letter | What it is | Its value |
|---|---|---|
| σ | the Stefan–Boltzmann constant of Chapter 2 (the Greek letter sigma), in W/m² per K⁴ | 5.67 × 10⁻⁸ |
The panes are numbered from the top. Pane 1 is the top pane, and pane N is the lowest. A letter with a number under it belongs to that pane, so T1 is the temperature of the top pane. A letter with a small g under it belongs to the ground, as in Tg. Temperatures are in kelvins, and every flow of energy is in W/m².
1. How much Sunlight does the ground take in?
Averaged over the whole planet, day and night, the ground takes in
in W/m². This is Section 3.1 of the book. A planet catches Sunlight on a disk, the area of its shadow, and its whole surface has four times that area. So each square meter gets a quarter of S on average, and that's the 4. The (1 − α) is the share that isn't reflected. For the Earth, a quarter of 1,361 is about 340 W/m², and 70% of that is 238 W/m². The panes are clear to Sunlight, so all of Q reaches the ground.
2. How much Earthlight does a level emit?
A black surface at temperature T emits
in W/m². This is the Stefan–Boltzmann law of Chapter 2, which writes it with the letter F. Here it's E, for emitted. The fourth power is steep: a surface twice as hot, in kelvins, emits 16 times as much. The ground emits E from its top. A pane emits E from each of its two sides, so it gives off 2E in all.
3. How much does each pane emit?
Start at the top, where the answer is easy. Seen from space, the top pane is the only thing glowing. It absorbs all the Earthlight from below, so nothing under it shows. The stack as a whole takes in Q, and it has to send the same amount out. So the top pane sends Q up to space:
Now do the top pane's own budget. It emits E1 up and E1 down. All it takes in is the Earthlight from the level just under it. That level is pane 2, or the ground if there's only one pane. Call what it emits E2. Heat in equals heat out:
So the level under the top pane emits 2Q. If it's a pane, it takes in E1 from the pane above and E3 from the level below, and it emits E2 from each side:
That makes E3 equal to 2 × 2Q − Q, which is 3Q. Carry on down the stack and each level emits Q more than the one above it. Pane k emits
from each side.
4. How much does the ground emit?
The ground is the level under pane N, so by step 3 it emits
The ground's own budget says the same thing, and that's a good check. The ground takes in the Sunlight, Q, and what the lowest pane sends down, EN, which is N × Q. It emits only upward:
With no panes, nothing comes down but the Sunlight, and the ground emits just Q.
5. How warm is each level?
Turn step 2 around to get the temperature of a level that emits E:
in kelvins. The power 1/4 is a fourth root. On a calculator, press the square-root key twice.
Two things follow. The top pane emits Q whatever is under it, so it's always at the temperature the ground has with no panes at all. And the ground emits N + 1 times as much as the top pane, so it's warmer by the fourth root of that:
One pane multiplies the top pane's temperature by 1.189, two panes multiply it by 1.316, and ten multiply it by 1.821.
Where the equations stop
This is a toy, and it leaves a lot out.
- Perfect panes. Every pane lets all of the Sunlight through and absorbs all of the Earthlight that reaches it. The real air lets some Earthlight leak straight out to space through a window in the spectrum (Section 3.4 of the book).
- Still air. Between the levels, heat moves only as Earthlight. In the real atmosphere, rising air carries heat upward past much of the absorbing gas (Section 3.5).
- One square meter for the whole planet. There's no day and night, no summer and winter, and no tropics and poles. The model has one patch of ground, and the Sun shines on it steadily at a quarter of its strength.
The leak and the rising air both let heat out more easily than a perfect pane would. That's why the real surface is at about 288 K and not at one pane's 303 K. The next model, Leaky and Stirred, has layers that leak and air that rises.
A worked example
Open the page and leave the controls alone. There's one pane, the Sunlight is 1,361 W/m² and the albedo is 30%, so α is 0.3.
- Sunlight taken in (step 1). Q = 1,361 × (1 − 0.3) ÷ 4 = 238 W/m². That's the number beside the Sunlight in the drawing.
- The pane (step 3). It's the top pane, so E1 = Q = 238 W/m². That's the number on the arrow to space, and on the arrow from the pane down to the ground.
- The pane's temperature (step 5). T1 = (238 ÷ σ)1/4. Divide 238 by 5.67 × 10⁻⁸ and you get about 4.2 billion. Take the square root of that twice and you have 255 K.
- The ground (step 4). Eg = Q + E1 = 238 + 238 = 476 W/m². That's the number on the arrow going up from the ground.
- The ground's temperature (step 5). Tg = (476 ÷ σ)1/4. Divide 476 by 5.67 × 10⁻⁸ and you get about 8.4 billion. Take the square root of that twice and you have 303 K.
- The other scales. 303 − 273.15 = 29.85, which the page prints as 30 °C. And 29.85 × 1.8 + 32 = 85.73, which it prints as 86 °F.
Those are the numbers in the drawing and in the table under it: 238 and 476 W/m², 255 K for the pane and 303 K for the ground.
A few details
- Rounding. The page prints each flow to a whole W/m² and each temperature to a whole kelvin. It works out the Celsius and the Fahrenheit from the whole kelvins, as the last line of the worked example does. Each number is rounded by itself, so a sum in the table can be 1 off.
- 255 K in Fahrenheit. 255 K is −18.15 °C, which is −0.67 °F. The page prints that as −1 °F. Chapter 3 calls it about 0 °F.
- Why the page stops at 10 panes. It draws every pane with its arrows, and 10 is as many as it can draw clearly on a phone. The equations work for any number of panes.
See the equations at work
- No panes. Set the number of panes to 0. The ground takes in 238 W/m² of Sunlight and emits 238 W/m² straight to space, and it's at 255 K (−18 °C, −1 °F). That's the planet of Section 3.1, with no greenhouse effect (steps 1 and 5).
- The book's figure. Set one pane, then two. The ground is at 303 K, then at 335 K, and the top pane is at 255 K both times. That's Figure 3.3.
- Each pane adds the same heat, and less warming. Every pane you add sends another 238 W/m² down to the level below it (step 3). The first pane warms the ground by 48 K, the second by 32 K and the tenth by 11 K. With ten panes the ground is at 464 K (191 °C, 376 °F). The reason is the fourth power in step 2: the hotter a surface is, the fewer extra kelvins it takes to emit another 238 W/m².
- The top pane doesn't care. Whatever you stack under it, the top pane is at 255 K. It has to send out what the whole stack takes in, and adding panes doesn't change that (the first equation of step 3).
- A brighter planet. Go back to one pane and raise the albedo to 50%. The ground now takes in 170 W/m² of Sunlight. The top pane cools to 234 K and the ground to 278 K (5 °C, 41 °F). Divide the ground's temperature by the pane's and you get 1.19, the same as before. A stack of panes multiplies the temperature, whatever the Sunlight (the last equation of step 5).
- The real Earth. The Earth's surface averages about 288 K. With the Earth's Sunlight and albedo, the model gives 255 K with no panes and 303 K with one, and there's no setting in between. For that you need a pane that leaks and air that rises, and the next model, Leaky and Stirred, has both.
Where the numbers come from
The model has three numbers of its own, and they're the book's. The solar constant, 1,361 W/m², is Chapter 2's, from Kopp and Lean (2011). The Earth's albedo, about 30%, and the Stefan–Boltzmann constant are in Chapter 2 as well.
The layer model itself is an old teaching tool. The book's source for it is David Archer's textbook.
Kopp, G., and Lean, J. L. (2011). A new, lower value of total solar irradiance: Evidence and climate significance. Geophysical Research Letters 38(1). doi:10.1029/2010GL045777
Archer, D. (2012). Global Warming: Understanding the Forecast (2nd ed.). John Wiley & Sons.
How it was checked
A set of tests comes with the model, and they run every time the page changes. Here's what they hold it to.
- The code, against a second copy. The tests have the five steps written out a second time, in another programming language. For every number of panes from 0 to 10, at 16 settings of the Sunlight and the albedo, the two copies give the same temperatures to a millionth of a kelvin.
- The short way, against the long way. Step 3 works down from the top and finds a pattern. The tests also write out every level's budget and solve them all at once, as a set of simultaneous equations, with no pattern assumed. The two ways agree to a millionth of a kelvin.
- The page, against the first version. Scott Denning's first version of this model was a web app written in R, and it solved the budgets the long way. Run as he left it, with up to 99 panes, it agrees with this page's code to a millionth of a kelvin.
- The model, against the book. With the Earth's Sunlight and albedo, the ground is at 255 K with no panes, 303 K with one and 335 K with two, as in Chapter 3.
- Heat in, against heat out. At every setting, the stack sends to space what the ground takes in from the Sun, and every level emits what it takes in.
- This tab, against the model. Every equation above is tried with the model's own numbers. The worked example is done again from the rounded numbers a calculator would use. And each number in the text is worked out again from the model.
The code
The code is small enough to read. Two files do all the work, and they use no outside software. The comments in model.js use the same step numbers and letters as the equations above.
model.js is the science: the five steps, and a list of every level's budget.
app.js is the page: the controls, the drawing and the table under it.
To keep a copy, save model.js or app.js.
All of the model's code is on GitHub, at github.com/airscottdenning/climate-models. You're free to use it, change it and teach with it.
Credits
By Scott Denning, for Climate Change: Simple, Serious, Solvable.
The page began as Scott Denning's web app, written in R, which drew the temperatures of up to 99 panes as a graph. Claude, from Anthropic, rebuilt it to run in your browser, drew the panes after the book's Figure 3.3 and checked it against the first version.