Carbonator is a simple climate model. Unlike a full climate model that can tell us how climate variables evolve at different locations it can only tell us how a subset of variables change on a global scale (e.g. globally averaged temperature). Carbonator uses only a few hundred lines of computer code and takes a few seconds to simulate centuries of climate system evolution on your computer.
Carbonator is based on the same laws of physics that underpin state-of-the-art climate models (in particular the conservation of energy) and for a limited number of variables will produce very similar results to those models. As such, it is a powerful tool that can be used to explore how the climate system is affected by different factors (like CO2 emissions, volcanoes or changes in the power output of the sun) and how our decisions are likely to affect the climate system in the future.
Based on a set of inputs (that you can modify):
You can also switch on natural variability — random year-to-year fluctuations from ocean mixing and cloudiness — to make model runs look like real thermometer records.
Carbonator will calculate how various climate variables will change over time, including:
The following schematic shows all the components of Carbonator:

Carbonator is made up of a number of sub-models, that feed information to the main Energy Balance Model.
At the heart of Carbonator (and all climate models) is an energy balance model. This simply means that if we know the energy entering or leaving the climate system, then we can calculate how the energy content (otherwise known as temperature) will change. By making estimates of how energy coming in or out changes in the future then we can predict what will happen to temperature (and other climate variables) in the future.
If there were an increase in the energy entering the climate system (for example if the sun were to get a little stronger), this would very quickly heat up the atmosphere, land surface and upper ocean. It would take much longer for that extra heat to gradually mix down into the deep ocean.
So let’s build a (box) model of the climate system:
Next we need to define some properties of these boxes:
So here is our (two box) model of the climate system:

Now we need some equations to describe the temperature changes in the two boxes (one equation for each box).
Change in energy in box 1 each second = Energy coming in each second – Energy going out each second (from the top and bottom of box 1)
The energy in the box (E) [measured in Joules] is the heat capacity of the box (C) multiplied by the temperature of the box (T). Mathematically the change in energy (E) with time (t) is written as:
dEdt = Ein − EoutBut because E = C × T (and C is a constant, i.e. the heat capacity doesn’t change):
dEdt = C dTdtFrom (3) above, the energy lost to space is proportional to the temperature of box 1 (Eout = aT), and from (4) the energy mixed downwards is proportional to the temperature difference between the boxes (Emix = b(T − To)), where a and b are constants. Putting it all together:
C dTdt = Ein − aT − b(T − To)Change in energy in box 2 each second = Energy coming in each second (from the bottom of box 1). The energy coming in to box 2 is the same as the energy leaving the bottom of box 1, so following similar arguments:
Co dTodt = b(T − To)These two coupled equations are the heart of Carbonator (they follow Geoffroy et al. 2013).
They tell us that if we know the energy entering the climate system (Ein), which may change over time, we can calculate how the temperature of the surface climate (i.e. all the components in box 1) and the deep ocean (box 2) change with time.
NB we also need to figure out the values for the various constants (C, Co, a, b). These can be calculated or figured out by looking at observations of the real world.
The energy entering the climate system depends on multiple factors. Some of the main ones are:
To get Ein we need to sum these different components:
Ein = Esun + Evolcano + Eaerosol + Eco2 + Ech4
Some of these components are hard to measure or estimate directly, so Carbonator uses sub-models (for the carbon cycle and methane) to calculate the CO2 and CH4 terms from emissions, while the remaining terms are specified as radiative forcings from the scenario data.
A model is a way of understanding complex systems or phenomena. For example, models can be used to help us understand the movement of planets around the sun, or how a disease spreads or how the brain works or how the earth’s climate will change in the future.
To construct a model you need to identify the essential components of the system or phenomenon you are trying to model and how the components behave and interact. In science you would then often use mathematical equations or computer code to describe these components and interactions.
A few examples might make this clearer:
Imagine a person on a swing. We would like to understand how fast the swing goes, or how often you go back and forth. This could depend on many factors: the size of the person, the design of the swing, the strength of the wind, the friction in the bearings. But the essential components of this system can be modelled as a ball on a weightless string suspended from a pivot with no friction. The ball is pulled downwards by gravity and upwards by the tension in the string. By mathematically describing this highly simplified version of the person on a swing we can get a good idea of how the swing will move (it won’t be perfect, because in the real world the swing is affected by other factors – like friction, but we can still learn a lot from the simple model).

Imagine the earth orbiting the sun. We can model this as two balls (one with the mass of the sun, the other with the mass of earth) rotating around each other and kept together by gravitational attraction. Based on experiments we know that the strength of the gravitational attraction is proportional to the masses multiplied together, and inversely proportional to the square of the distance between them. By describing this model mathematically we can figure out approximately how fast the planet orbits and how far the sun and planet must be from each other. However this model is just an approximation of the real world: interactions with other planets will also be important, space-time is distorted by the massive sun and planet which slightly changes how gravity works (general relativity) and even in space there is some friction.

Finally imagine a burner heating up a beaker of water. We can model this as a box with the same heat capacity as the water and a constant input of heat. Conservation of energy tells us the rate at which the temperature of the box increases must be proportional to the energy coming in (and inversely proportional to the heat capacity of the water i.e. it takes longer to heat more water). In the real world the water will heat at different rates, there will be heat losses from the top of the water and from the sides of the beaker and the heating source won’t be perfectly constant, but still our approximation will be able to provide valuable information about how fast the water heats up.

We could improve our final model, by assuming that our box can also lose heat to the surroundings. Let’s assume that the rate at which the box loses heat is proportional to the difference between the temperature of the box (T) and the temperature of the surrounding air (TA) i.e. the hotter the box gets the more heat it loses.

This last type of model is referred to as a box model. The box in this case represents the water. But we simplify the situation and assume that the water is a homogenous box with a single temperature and heat capacity. Carbonator is also a box model that works in a similar way to this example.
A climate model is a simulation of the climate system: the atmosphere, ocean, land surface and cryosphere (ice areas), run on a computer that allows you to tell how important climate variables like temperature, sea level or rainfall change over time at different locations.
Everyone has heard of weather forecast models. Climate models are very similar but, while weather forecast models are used to predict how the atmosphere will change over the timescale of a few days, climate models tell us how the climate system is likely to change over decades or centuries. Climate and weather models are usually run on powerful computers; they generate simulations of important climate variables like temperature, sea level or rainfall change over time at different locations.
State-of-the-art climate models (there are dozens of them built by different research centres around the world) are made up of thousands of lines of computer code. They require hundreds of people-years to build and take weeks or months to simulate a few decades of climate system evolution on powerful supercomputers (equivalent to 100s or 1000s of personal computers).
Here are some YouTube links to some climate model simulations:
NOAA SOS: GFDL Global Sea Surface Temperature Model
NOAA Research: Improving the global weather forecast model
Stop And Think: NASA's Perpetual Ocean, Animation of Surface Ocean Currents
Probably the most complex part of Carbonator is the carbon cycle model. The carbon cycle model takes the CO2 emissions (one of the model inputs) and calculates the extra energy entering the climate system due to CO2 and the enhanced greenhouse effect.
CO2 is the most important greenhouse gas that is affected by humans. Increases in atmospheric CO2 (measured in parts per million by volume, ppm) since pre-industrial times are primarily from the burning of fossil fuels and from deforestation. CO2 emitted by human activity (expressed in GtC/yr) accumulates in the atmosphere but is also removed from the atmosphere by plants and dissolved in ocean water.
The energy balance model used by Carbonator is split into two boxes that represent the energy stored in the surface climate and the deep ocean. The carbon cycle model is comprised of 5 boxes, representing the carbon stored in the atmosphere (as CO2), the upper ocean, the deep ocean, vegetation and soil.

Carbon dioxide emissions (Eco2) enter the atmosphere, increasing the total amount of atmospheric carbon (Cat). This carbon leaves the atmosphere by dissolving into the upper ocean (Cup) and being taken up by plants (N) by photosynthesis.
The rate of transfer of carbon into the ocean is proportional to the difference between atmospheric and oceanic CO2 concentration. This rate also depends on the acidity of the ocean, which changes depending on the amount of stored carbon. Carbon can leave the upper ocean by mixing into the deep ocean.
The uptake of carbon by plants via photosynthesis depends on the atmospheric CO2 concentration. The carbon in plants turns into soil carbon over long timescales as vegetation decays. Some of the carbon in the soil eventually gets back into the atmosphere via its breakdown by bacteria.
These interactions are written down mathematically below (the flux of carbon into the ocean is Fao = ka(Cat − A·B·Cup), where B represents the ocean's carbonate chemistry):
dCatdt = E − Fao + (1−ε) m N + δ S − P dCupdt = Fao − kd(Cup − Clo/d) dClodt = kd(Cup − Clo/d) dNdt = P − m N dSdt = ε m N − δ S P = P0[1 + a2(Cat − Cat0)]where Cat, Cup, Clo, N and S are the inventories of carbon (GtC) in the atmosphere, upper ocean, deep ocean, vegetation and soil, P is photosynthesis by plants (GtC/yr) and E is human CO2 emissions (GtC/yr).
If we specify emissions of CO2, these equations tell us how the atmospheric concentration changes over time. More CO2 traps more heat:
FCO₂ = 5.35 ln(Cat / Cat0) W/m²Where Cat0 is the natural concentration before humans started emitting CO2.
This relationship is logarithmic. This means that CO2 traps less heat as CO2 concentrations increase.
CO2 is a long lived greenhouse gas that takes hundreds of years to be removed from the atmosphere. As a result CO2 emitted today will still have an effect on the climate system hundreds of years from now (see the CO2 pulse experiment). Other greenhouse gases remain in the atmosphere for far shorter periods of time. The second most important greenhouse gas related to human activities is methane. Methane emissions are primarily related to waste management, changes in agriculture and the production of fossil fuels. The main way methane is removed from the atmosphere is through oxidation. Methane will typically last about 10 years in the atmosphere; as a result if we stopped producing methane today it would return to background concentrations in a few decades (see the CH4 pulse experiment).
Methane is modelled using a single box that represents the atmospheric store of methane. Emissions (E) increase the concentration (C), and oxidation removes it with a lifetime τ of roughly a decade (in Carbonator τ itself depends slightly on how much methane there is):
dCdt = Ek − Cτ(C)(k just converts emissions in Tg per year into concentration units, ppb.) More CH4 traps more heat, with a square-root rather than logarithmic dependence:
FCH₄ = 0.036 (√C − √C0) W/m²Where C0 is the natural concentration before human emissions began. As with CO2, each extra tonne has a diminishing effect as concentrations rise — and because τ is only about 12 years, concentrations respond within decades of any change in emissions (compare the CH4 and CO2 pulse experiments).
Nitrous oxide comes mostly from farming — nitrogen fertilisers and manure feed soil microbes that release N2O. It is a strong greenhouse gas that survives for about 120 years, until it is finally broken apart by ultraviolet sunlight high in the stratosphere.
N2O uses exactly the same single-box idea as methane, just with a much longer (and constant) lifetime τ ≈ 120 years:
dCdt = Ek − Cτand a square-root forcing law like methane's:
FN₂O = 0.12 (√C − √C0) W/m²with C in ppb and C0 = 270 ppb the pre-industrial concentration. The long lifetime means N2O behaves in between methane (12 years) and CO2 (centuries): emissions we release today will still be warming the planet at the end of the century.
CFCs, HFCs and related industrial chemicals are entirely human-made — refrigerants, foams and old spray-can propellants. Kilogram for kilogram they are thousands of times more powerful than CO2. Look at this input's history in the app: emissions peak around 1990 and then collapse — the Montreal Protocol, agreed in 1987 to save the ozone layer, which also avoided a lot of warming.
Dozens of individual gases with different lifetimes are bundled into one equivalent gas, measured in CFC-12-equivalent units, with a single effective lifetime τ ≈ 100 years:
dCdt = Ek − CτBecause these gases absorb in an "atmospheric window" where little else absorbs, their forcing does not saturate — it is simply proportional to the concentration (in ppb-equivalent):
Fsyn = 0.32 · C W/m²That linearity is why a tiny concentration — parts per trillion — can matter for climate.
Ozone near the ground is not emitted directly: sunlight cooks it up from precursor pollution (nitrogen oxides from exhausts, carbon monoxide, evaporated fuels). It is a greenhouse gas and a harmful pollutant, and it disappears within weeks if the pollution stops.
Because the precursors and the ozone they make are so short-lived, no reservoir is needed — the forcing simply tracks the precursor emission rate E (an index in ~Tg per year), exactly like human aerosols but with the opposite sign:
FO₃ = 0.004 · E W/m²Big eruptions inject sulphur dioxide into the stratosphere, where it becomes a reflective haze that cools the planet for a few years (Pinatubo in 1991 cooled Earth by about half a degree).
The input is the amount of haze injected each year, E (measured as optical depth per year). The stratospheric haze A builds up with injections and settles out with a lifetime τ ≈ 1.2 years, and the cooling is proportional to how much haze is present:
dAdt = E − Aτ Fvolc = −20 · A W/m²Try the Mega Volcano experiment and note how quickly the climate recovers compared with a CO2 pulse — the haze is gone in a few years, and the ocean's memory of the cooling fades over decades.
Burning fossil fuels releases particles (mostly from sulphur dioxide, SO2) into the lower atmosphere. They reflect sunlight and brighten clouds, cooling the planet — but rain washes them out within days, so their cooling only lasts while we keep emitting (see the Geoengineering Failure experiment).
Because the particles are removed so fast, the amount in the air simply tracks the emission rate E (Tg of SO2 per year), and so does the forcing — no reservoir equation needed:
Faer = −0.009 · E W/m²Today's ~100 Tg per year of SO2 gives roughly −1 W/m² — hiding around half a degree of greenhouse warming. (In reality the cloud-brightening part makes the relationship a bit weaker than linear at high emissions; proportionality is a good teaching approximation.)
The primary causes of sea level rise are the thermal expansion of water (warmer water takes up more room) and the melting of land ice (the Greenland and Antarctic ice sheets, and glaciers). Carbonator models both contributions.
Each contribution rises at a rate proportional to how much warmer the planet is (relative to a reference temperature Tref), and would slowly relax back over a long adjustment time τ:
dSdt = a · max(T − Tref, 0) − SτThe thermal part responds over ~200 years and the land-ice part over ~800 years — which is why sea level keeps rising long after temperature stabilises. Watch the two coloured layers in the sea-level output. There is also a regional sea-level map in the Local projections panel: winds and currents pile the extra water up unevenly.
Two more things change how much sunlight the planet absorbs: the Sun's own brightness (specified directly as a forcing in W/m² — it varies by only ~0.1% over the 11-year sunspot cycle) and the planet's reflectivity or albedo, currently about 0.31.
Earth intercepts S0 ≈ 1360 W/m² of sunlight, which spread over the whole rotating sphere is S0/4 ≈ 340 W/m². If the albedo α changes, the absorbed sunlight changes by:
Falb = − S04 (α − 0.31) ≈ −340 (α − 0.31) W/m²So brightening the planet by just 0.01 reflects an extra 3.4 W/m² — comparable to all human greenhouse forcing so far. The White Roofs experiment uses this input.
Real temperatures wobble from year to year even when nothing is forcing them. Carbonator can add two sources of this randomness: the ocean stirring heat between its warm surface and cold depths (ENSO-like — El Niño years run warm, La Niña years cool), and random fluctuations in cloudiness and sunshine.
Ocean mixing adds a random heat exchange q(t) between the two boxes — the same q is added to the surface box and removed from the deep box, so energy is conserved and the temperature always recovers:
C dTdt = … + q(t) Co dTodt = … − q(t)q(t) is generated as a damped oscillator with an ENSO-like ~4-year period and an amplitude of about 1 W/m². Clouds & sun instead perturb the albedo with slowly-varying red noise (about ±0.5 W/m², matching satellite measurements of the planet's energy balance). Unlike mixing, this genuinely adds or removes energy, so its effects can linger for years. With both switched on, the model's year-to-year variability matches the observed temperature record.
To use the model, your computer needs to solve the various equations that make up the Carbonator climate model. To demonstrate how this works, click below.
To demonstrate how this works, let’s use a simpler model: a single box model of the climate system. In this case, we are going to ignore the effect of the deep ocean (i.e. we assume that no heat is transferred from the upper to the lower ocean). Also instead of having several inputs, our input is going to be the total incoming energy (Ein), so that we don’t need to worry about the CO2, methane and other sub-models. Mathematically our model can be written:
C dTdt = Ein − aTThis says, the change in the energy content in our box (which represents the climate system) per second equals the energy coming in per second (the model input) minus the energy emitted out to space per second (which depends on the surface temperature). C and a are constants.
Using this equation, if we know Ein, we want to be able to calculate how the surface temperature changes in time. This means that we need to integrate this equation to find T at different times.
If Ein is constant, this equation can be integrated exactly. With T(0) = 0 (Carbonator always measures temperature relative to the start), the solution is:
T(t) = Eina (1 − e−at/C)The temperature rises quickly at first and then levels off at Ein/a: the box warms until it radiates away exactly as much extra energy as is coming in. For example with a = 1 W/m²/K, C = 6 W yr/m²/K and a sudden jump of Ein = 1 W/m², the box warms towards 1 °C with a timescale of C/a = 6 years.
However, in the real world Ein changes with time — Ein(t). For example, imagine that over time the sun gets stronger, but during this period a volcano briefly reduces the incoming energy:

Now we can’t integrate this in the normal way. Instead we do a numerical integration. This only provides an approximate answer, but if we do it right the approximation can be as accurate as we want. So how does it work?
Let’s start with dT/dt — the gradient of T with respect to time. Look at this on a graph of temperature versus time:

The gradient dT/dt at time t is the tangent to the curve. We can approximate it over a small time step Δt:
dTdt ≈ T(t+Δt) − T(t)Δt(the smaller Δt, the better the approximation — shrink it to zero and it is exact; that is the basis of calculus). Substituting this into our model equation and rearranging:
T(t+Δt) = T(t) + ΔtC [Ein(t) − aT(t)]What does this equation say? Let’s imagine t is the time now. The equation says if we know what the temperature is now and how much energy is entering the climate system now, we can estimate what the temperature will be a little way in the future.
Using our estimate for the temperature a little way into the future we can use the same equation to estimate the temperature a little further in the future. By using this equation multiple times we can estimate the temperature progressively further into the future. If the (time) steps that we use to make these calculations are not too large, our answer can be quite accurate.
We can now use computer code to do this calculation multiple times. In fact we can even run this model in an Excel spreadsheet. Check this out to see how temperature changes in response to the Ein shown above; or modify Ein to create your own scenario.