This week I’m trying something new: including a climate model that runs on your web browser!
It’s not a realistic model; we’re just getting started. But some programmers in the Azimuth Project team are interested in making more such models—especially Allan Erskine (who made this one), Jim Stuttard (who helped me get it to work), Glyn Adgie and Staffan Liljgeren. It could be a fun way for us to learn and explain climate physics. With enough of these models, we’d have a whole online course! If you want to help us out, please say hi.
Allan will say more about the programming challenges later. But first, a big puzzle: how can small changes in the Earth’s orbit lead to big changes in the Earth’s climate? As I mentioned last time, it seems hard to understand the glacial cycles of the last few million years without answering this.
Are there feedback mechanisms that can amplify small changes in temperature? Yes. Here are a few obvious ones:
• Water vapor feedback. When it gets warmer, more water evaporates, and the air becomes more humid. But water vapor is a greenhouse gas, which causes additional warming. Conversely, when the Earth cools down, the air becomes drier, so the greenhouse effect becomes weaker, which tends to cool things down.
• Ice albedo feedback. Snow and ice reflect more light than liquid oceans or soil. When the Earth warms up, snow and ice melt, so the Earth becomes darker, absorbs more light, and tends to get get even warmer. Conversely, when the Earth cools down, more snow and ice form, so the Earth becomes lighter, absorbs less light, and tends to get even cooler.
• Carbon dioxide solubility feedback. Cold water can hold more carbon dioxide than warm water: that’s why opening a warm can of soda can be so explosive. So, when the Earth’s oceans warm up, they release carbon dioxide. But carbon dioxide is a greenhouse gas, which causes additional warming. Conversely, when the oceaans cool down, they absorb more carbon dioxide, so the greenhouse effect becomes weaker, which tends to cool things down.
Of course, there are also negative feedbacks: otherwise the climate would be utterly unstable! There are also complicated feedbacks whose overall effect is harder to evaluate:
• Planck feedback. A hotter world radiates more heat, which cools it down. This is the big negative feedback that keeps all the positive feedbacks from making the Earth insanely hot or insanely cold.
• Cloud feedback. A warmer Earth has more clouds, which reflect more light but also increase the greenhouse effect.
• Lapse rate feedback. An increased greenhouse effect changes the vertical temperature profile of the atmosphere, which has effects of its own—but this works differently near the poles and near the equator.
See week302 for more on feedbacks and how big they’re likely to be.
On top of all these subtleties, any proposed solution to the puzzle of glacial cycles needs to keep a few other things in mind, too:
• A really good theory will explain, not just why we have glacial cycles now, but why we didn’t have them earlier. As I explained in week317, they got started around 5 million years ago, became much colder around 2 million years ago, and switched from a roughly 41,000 year cycle to a roughly 100,000 year cycle around 1 million years ago.
• Say we dream up a whopping big positive feedback mechanism that does a great job of keeping the Earth warm when it’s warm and cold when it’s cold. If this effect is strong enough, the Earth may be bistable: it will have two stable states, a warm one and a cold one. Unfortunately, if the effect is too strong, it won’t be easy for the Earth to pop back and forth between these two states!
The classic example of a bistable system is a switch—say for an electric light. When the light is on it stays on; when the light is off it stays off. If you touch the switch very gently, nothing will happen. But if you push on it hard enough, it will suddenly pop from on to off, or vice versa.
If we’re trying to model the glacial cycles using this idea, we need the switch to have a fairly dramatic effect, yet still be responsive to a fairly gentle touch. For this to work we need enough positive feedback… but not too much.
(We could also try a different idea: maybe the Earth keeps itself in its icy glacial state, or its warm interglacial state, using some mechanism that gradually uses something up. Then, when the Earth runs out of this stuff, whatever it is, the climate can easily flip to the other state.)
We must always remember that to a good approximation, the total amount of sunlight hitting the Earth each year does not change as the Earth’s orbit changes in the so-called ‘Milankovich cycles’ that seem to be causing the ice ages. I explained why last time. What changes is not the total amount of sunlight, but something much subtler: the amount of sunlight at particular latitudes in particular seasons! In particular, Milankovitch claimed, and most scientists believe, that the Earth tends to get cold when there’s little sunlight hitting the far northern latitudes in summer.
For these and other reasons, any solution to the ice age puzzle is bound to be subtle. Instead of diving straight into this complicated morass, let’s try something much simpler. Let’s just think about how the ice albedo effect could, in theory, make the Earth bistable.
To do this, let’s look at the very simplest model in this great not-yet-published book:
• Gerald R. North, Simple Models of Global Climate.
This is a zero-dimensional energy balance model, meaning that it only involves the average temperature of the earth, the average solar radiation coming in, and the average infrared radiation going out.
The average temperature will be measured in Celsius. We’ll assume the Earth radiates power square meter equal to
where watts/meter2 and watts/meter2 per degree Celsius. This is a linear approximation taken from satellite data on our Earth. In reality, the power emitted grows faster than linearly with temperature.
We’ll assume the Earth absorbs solar energy power per square meter equal to
• is the average insolation: that is, the amount of solar power per square meter hitting the top of the Earth’s atmosphere, averaged over location and time of year. In reality is about 341.5 watts/meter2. This is one quarter of the solar constant, meaning the solar power per square meter that would hit a panel hovering in space above the Earth’s atmosphere and facing directly at the Sun. (Why a quarter? That’s a nice geometry puzzle: we worked it out at the Azimuth Blog once.)
• is the coalbedo: the fraction of solar power that gets absorbed. The coalbedo depends on the temperature; we’ll have to say how.
Given all this, we get
where is Earth’s heat capacity in joules per degree per square meter. Of course this is a funny thing, because heat energy is stored not only at the surface but also in the air and/or water, and the details vary a lot depending on where we are. But if we consider a uniform planet with dry air and no ocean, North says we may roughly take equal to about half the heat capacity at constant pressure of the column of dry air over a square meter, namely 5 million joules per degree Celsius.
The easiest thing to do is find equilibrium solutions, meaning solutions where so that
Now doesn’t matter anymore! We’d like to solve for as a function of the insolation but it’s easier to solve for as a function of :
To go further, we need to guess some formula for the coalbedo The coalbedo, remember, is the fraction of sunlight that gets absorbed when it hits the Earth. It’s 1 minus the albedo, which is the fraction that gets reflected. Here’s a little chart of albedos:
If you get mixed up between albedo and coalbedo, just remember: coal has a high coalbedo.
Since we’re trying to keep things very simple right not, not model nature in all its glorious complexity, let’s just say the average albedo of the Earth is 0.65 when it’s very cold and there’s lots of snow. So, let
be the ‘icy’ coalbedo, good for very low temperatures. Similarly, let’s say the average albedo drops to 0.3 when its very hot and the Earth is darker. So, let
be the ‘ice-free’ coalbedo, good for high temperatures when the Earth is darker.
Then, we need a function of temperature that interpolates between and Let’s try this:
If you’re not a fan of the hyperbolic tangent function this may seem scary. But don’t be intimidated!
The function is just a function that goes smoothly from 0 at low temperatures to 1 at high temperatures. This ensures that the coalbedo is near its icy value at low temperatures, and near its ice-free value at high temperatures. But the fun part here is a parameter that says how rapidly the coalbedo rises as the Earth gets warmer. Depending on this, we’ll get different effects!
The function rises fastest at since that’s where has the biggest slope. We’re just lucky that in Celsius is the melting point of ice, so this makes a bit of sense.
Now Allan Erskine’s programming magic comes into play! Unfortunately it doesn’t work on this blog—yet!—so please hop over to the version of this article on my website to see it in action.
You can slide a slider to adjust the parameter to various values between 0 and 1.
You can then see how the coalbedo changes as a function of the temperature In this graph the temperature ranges from -50 °C and 50 °C; the graph depends on what value of you choose with slider.
You can also see how the insolation required to yield a given temperature between -50 °C and 50 °C:
It’s easiest to solve for in terms of But it’s more intuitive to flip this graph over and see what equilibrium temperatures are allowed for a given insolation between 200 and 500 watts per square mater.
The exciting thing is that when gets big enough, three different temperatures are compatible with the same amount of insolation! This means the Earth can be hot, cold or something intermediate even when the amount of sunlight hitting it is fixed. The intermediate state is unstable, it turns out. Only the hot and cold states are stable. So, we say the Earth is bistable in this simplified model.
Can you see how big needs to be for this bistability to kick in? It’s certainly there when since then we get a graph like this:
When the insolation is less than about 385 W/m2 there’s only a cold state. When it hits 385 W/m2, as shown by the green line, suddenly there are two possible temperatures: a cold one and a much hotter one. When the insolation is higher, as shown by the black line, there are three possible temperatures: a cold one, and unstable intermediate one, and a hot one. And when the insolation gets above 465 W/m2, as shown by the red line, there’s only a hot state!
Why is the intermediate state unstable when it exists? Why are the other two equilibria stable? To answer these questions, we’d need to go back and study the original equation:
and see what happens when we push slightly away from one of its equilibrium values. That’s really fun, but we won’t do it today. Instead, let’s draw some conclusions from what we’ve just seen. There are at least three morals: a mathematical moral, a climate science model, and a software moral.
Mathematically, this model illustrates catastrophe theory. As we slowly turn up we get different curves showing how temperature is a function of insolation… until suddenly the curve isn’t the graph of a function anymore: it becomes infinitely steep at one point! After that, we get bistability:
This is called a cusp catastrophe, and you can visualize these curves as slices of a surface in 3d, which looks roughly like this picture:
• Wolfram Mathworld, Cusp catastrophe. (Includes Mathematica package.)
The cusp catastrophe is ‘structurally stable’, meaning that small perturbations don’t change its qualitative behavior. This concept is made precise in catastrophe theory. It’s a useful concept, because it focuses our attention on robust features of models: features that don’t go away if the model is slightly wrong, as it always is.
As far as climate science goes, one moral is that it pays to spend some time making sure we understand simple models before we dive into more complicated ones. Right now we’re looking at a very simple model, but we’re already seeing some interesting phenomena. The kind of model we’re looking at now is called a Budyko-Sellers model. These have been studied since the late 1960’s:
• M. I. Budyko, On the origin of glacial epochs (in Russian), Meteor. Gidrol. 2 (1968), 3-8.
• M. I. Budyko, The effect of solar radiation variations on the climate of the earth, Tellus 21 (1969), 611-619.
• William D. Sellers, A global climatic model based on the energy balance of the earth-atmosphere system, J. Appl. Meteor. 8 (1969), 392-400.
• Carl Crafoord and Erland Källén, A note on the condition for existence of more than one steady state solution in Budyko-Sellers type models, J. Atmos. Sci. 35 (1978), 1123-1125.
• Gerald R. North, David Pollard and Bruce Wielicki, Variational formulation of Budyko-Sellers climate models, J. Atmos. Sci. 36 (1979), 255-259.
It also pays to compare our models to reality! For example, the graphs we’ve seen show some remarkably hot and cold temperatures for the Earth. That’s a bit unnerving. Let’s investigate. Suppose we set on our slider. Then the coalbedo of the Earth becomes independent of temperature: it’s 0.525, halfway between its icy and ice-free values. Then, when the insolation takes its actual value of 342.5 watts per square meter, the model says the Earth’s temperature is very chilly: about -20 °C!
Does that mean the model is fundamentally flawed? Maybe not! After all, it’s based on very light-colored Earth. Suppose we use the actual albedo of the Earth. Of course that’s hard to define, much less determine. But let’s just look up some average value of the Earth’s albedo: supposedly it’s about 0.3. That gives a coalbedo of If we plug that in our formula:
we get 11 °C. That’s not too far from the Earth’s actual average temperature, namely about 15 ° C. So the chilly temperature of -20 °C seems to come from an Earth that’s a lot lighter in color than ours.
Our model includes the greenhouse effect, since the coeficients and were determined by satellite measurements of how much radiation actually escapes the Earth’s atmosphere and shoots out into space. As a further check to our model, we can look at an even simpler zero-dimensional energy balance model: a completely black Earth with no greenhouse effect. Another member of the Azimuth Project has written about this:
• Tim van Beek, Putting the Earth in a box, Azimuth, 19 June 2011.
• Tim van Beek, A quantum of warmth, Azimuth, 2 July 2011.
As he explains, this model gives the Earth a temperature of 6 °C. He also shows that in this model, lowering the albedo to a realistic value of 0.3 lowers the temperature to a chilly -18 ° C. To get from that to something like our Earth, we must take the greenhouse effect into account.
This sort of fiddling around is the sort of thing we must do to study the flaws and virtues of a climate model. Of course, any realistic climate model is vastly more sophisticated than the little toy we’ve been looking at, so the ‘fiddling around’ must also be more sophisticated. With a more sophisticated model, we can also be more demanding. For example, when I said 11 °C is “is not too far from the Earth’s actual average temperature, namely about 15 ° C”, I was being very blasé about what’s actually a big discrepancy. I only took that attitude because the calculations we’re doing now are very preliminary.
Finally, here’s what Allan has to say about the software you’ve just seen, and some fancier software you’ll see in forthcoming weeks:
Your original question in the Azimuth Forum was “What’s the easiest way to write simple programs of this sort that could be accessed and operated by clueless people online?” A “simple program” for the climate model you proposed needed two elements: a means to solve the ODE (ordinary differential equation) describing the model, and a means to interact with and visualize the results for the (clearly) “clueless people online”.
Some good suggestions were made by members of the forum:
• use a full-fledged numerical computing package such as Sage or Matlab which come loaded to the teeth with ODE solvers and interactive charting;
• use a full-featured programming language like Java which has libraries available for ode solving and charting, and which can be packaged as an applet for the web;
While the first two suggestions were superior for computing the ODE solutions, I knew from bitter experience (as a software developer) that the truly clueless people were us bold forum members engaged in this new online enterprise: none of us were experts in this interactive/online math thing, and programming new software is almost always harder than you expect it to be.
Or perhaps creating and editing interactive math online will eventually become as easy as wiki pages are today—I know Staffan had said the Sage developers were looking to make their online workbooks more interactive. Also the bright folks behind the new Julia language are discussing ways to run (and presumably interact with) Julia in the cloud. So perhaps we should just have dragged our feet on this project for a few years for all this cool stuff to help us out! (And let’s wait for the Singularity while we’re at it.)
No, let’s not! I hope you programmers out there can help us find good solutions to the problems Allan faced. And I hope some of you actually join the team.
By the way, Allan has a somewhat spiffier version of the same Budyko-Sellers model here.
Thus, the present thermal regime and glaciations of the Earth prove to be characterized by high instability. Comparatively small changes of radiation—only by 1.0-1.5%—are sufficient for the development of ice cover on the land and oceans that reaches temperate latitudes. – M. I. Budyko