| home | sitemap | travel pix | interactive mathematics |


Earth killer - composite trigonometry CO2 graph

Posted in Computers & Internet, Environment, Mathematics on 9 Feb 2008.
14 Comments

Scientists have known for years that the amount of carbon dioxide in the atmosphere has been increasing.

The observations on the top of Hawaii’s Mauna Loa volcano have shown a disturbing rise in CO2 over the last 50 years.

CO2-data-NOAA

Image source: National Oceanic & Atmospheric Administration

The black line on the graph represents mean data for each year (with some allowance for missing data points). The green and red oscillating lines are the result of natural “breathing” by the Earth throughout the year. In winter, when leaves drop and people burn coal, wood and oil for heating, the CO2 goes up. In summer, as the leaves reappear and there is less fossil fuel burned, the CO2 concentration drops. (This is Northern hemisphere, of course. There is less CO2 in the Southern hemisphere due to lower population, but the pattern will be similar.)

This graph reminded me of a function that I created as an example for this composite trigonometric graphs page. (It’s Exercise 1 on that page, the curve y = x2/10 − sin πx.)

So I thought it may be an interesting exercise to model NOAA’s CO2 data (1958 to 2008) and try some extrapolation to see where we’ll be in a few decades time.

A model here means an equation that connects the time variable (horizontal axis) and the concentration of CO2 (the vertical axis). Modeling is a very important concept in mathematical thinking, and unfortunately, most students never get to do any modeling, or even see it being done.

Extrapolate means that we will use the equation that we get to predict what will happen in the future (we can also extrapolate backwards in time.)

Climate modelling is probably the most important mathematics going on in the world right now.

Back to the story…

Using Excel to Model the CO2 Data

My first graph uses the full zero to 450 parts per million vertical scale, so that we can see that there is indeed a noticeable increase in CO2 concentration over the last 50 years. (In statistics, you can always exaggerate a trend by restricting the vertical scale. This is a common trick in advertising.)

CO2-data-full-scale

For the rest of the graphs on this page, I have restricted the vertical axis scale, so that we can see more clearly how well the models work.

CO2-data-limited-scale

Linear Model

The simplest model through the given data points is a straight line. Using Excel’s “add trendline” facility, and choosing “linear”, we get the following:

CO2-model-linear

Excel has given us a “line of best fit”, with the least variation from the data points. It is not a very good model. Clearly, the slope of the CO2 concentration is increasing as time goes on. If we tried to extrapolate beyond 2008, we would be under-estimating the amount of CO2.

(To see how to use Excel’s “add trendline” facility, and for another modelling example, see DJIA Model.)

We clearly have a curve, rather than a straight line, and that curve is likely to be exponential, since CO2 concentrations are related to population growth, which is also exponential.

In summary, I’m looking for a curve that passes through most of the data points and clearly follows the trend.

Exponential Model

CO2-model-exponential

This is the model given by Excel and it is clearly not very satisfactory. It under-estimates at the beginning and end of the data series, and doesn’t look much better than the linear model.

The problem, of course, is that Excel is making an assumption that the value at x = 0 (that is, at year 0) is a very small value (in this case, it has chosen 0.1056). However, we know (from Antarctic ice cores) that the CO2 was at a reasonably stable 280 ppm until the beginning of the Industrial Revolution.

There is no way (that i could figure out) to tell Excel to use 280 as a base line. So I subtracted 280 from each of the data points and used Excel to give me a new exponential model. Adding 280 to each of the model’s values, gave the following result.

Exponential model

Actually, Excel’s model was y = (1E-17)e^0.0216x which was close, but not good enough. I have tweaked this to give the graph of the model overlaid on the original data above.

Now we are getting somewhere. The model fits quite well with the data.

Here is a long-term view of the model, indicating the relatively stable CO2 levels (at 280 ppm) until around 1800 when the madness of coal burning began.

Exponential model

Yearly Oscillations of CO2

The yearly oscillations can be represented by a cosine curve, whose period is 1 year. The amplitude of the cosine curve is just over 3 ppm, derived from observation. There is a slight phase shift since the data actually starts in Jan 1958 and there is a lag before CO2 concentration reaches its peak for the year.

This cosine curve is simply added to the polynomial curve expression, as follows:

y = 3.07cos(2πx-1.2) + 280 + (10^-17)e^0.02181x

CO2-model-SNB-sm

This graph (obtained using Scientific Notebook) looked quite close to the original NOAA data.

To check it, I resized and then overlaid the black model graph onto the original NOAA graph (green and red) and obtained:

model-comparison-sm

I’m quite satisfied that the model is a good fit.

In fact, this model seemed good enough to use for extrapolation. So here is 100 years of abuse of the world’s air, from 1935 to 2035. We will have managed to increase CO2 levels by around 50% in that 100-year period, assuming the model is close. This is not a good thing.

Exponential extrapolation

According to this model, the CO2 concentration in 2035 will be about 470 parts per million. This assumes that the current rate of increase will continue until 2035. But with India, China and Vietnam (and many other developing countries) hell-bent on “catching up with the West”, it is likely to increase faster than this.

Why it Matters

Throughout the past 1 million years, the CO2 concentrations have ranged between 160 ppm (during ice ages) and were sitting around 280 ppm before the Industrial Revolution. (This information comes from examinations of Antarctic ice down to 3 km depth.) Current concentrations of around 380 ppm represent 869 gigatons (billion tons) of carbon in the air. [Source: The Weather Makers by Tim Flannery.]

The inevitable results of this increased carbon? More warming, more violent weather, more severe flooding and droughts, higher food prices, environmental refugees, etc.

Authentic Data

There is such a great deal of interesting authentic data out there. Why do math textbooks continue to use boring “nice” data (that is easy to plug into some formula) rather than real stuff that actually has meaning and matters?

Disclaimer

The above model is not a climate model as such. All I am doing is modelling the NOAA data as given so that I have a function that I can use for extrapolation. A real climate model will feed in all of the available data and will end up with a much more sophisticated model than this.

See also A simple climate change model.

Endpiece: Polynomial Model Limitations

My first attempts to get a good exponential model were not so successful, so I resorted to a polynomial model. Following is what it looked like.

I am usually reluctant to use a cubic polynomial model, because I find that they are often quite unrealistic either side of the data set and so cannot be used for extrapolation.

However, the following cubic polynomial model (obtained from this online regression utility) looked very promising.

CO2-model-exponential-3 

The fit is very good, as you can see. Around 1990 the CO2 increase was quite rapid (probably due to Mt Pinatubo’s eruption in the Philippines) and you can see the (red) model graph sneaking through.

However, we can see the limitations of this model when we extrapolate too far beyond the 100 year period of 1935 to 2035.

Cubic model

The period where data exists (1958 to 2008) is indicated on the graph (in dark blue). As you can see, the model is quite unrealistic to the left of the data set.

For interest, here is the same graph with the exponential model from above (in black). It is clearly a better model than the polynomial one.

cubic and exponential

14 Comments


Book-mark this post

Book-mark this post in Del.icio.us, Furl, Digg, Stumble Upon, whatever...
Mouse-over the image and choose your bookmark:


Related articles

14 Comments »

  1. Peter said,

    February 10, 2008 at 10:05 am

    Great post - thanks Zac.

    I agree with you - we should use more ‘real’ data in our math classes.

  2. Alan Cooper said,

    February 11, 2008 at 12:10 pm

    Hi Zac,
    I think that the reason the exponential models don’t do so well is because they have used only two parameters - with either y=a*b^x or y=a*exp(L*x). It is possible to get a much better fit by taking y=c+a*b^x , which actually makes sense since the exponential growth is presumably being added to a pre-human baseline which was not zero. Of course the cubic, having four parameters, can be made to fit the local data even more accurately, but, as you point out, either model can go wildly wrong if we use it for extrapolating too far from the observed interval.
    Thanks for once again putting together the math and data so clearly and attractively.
    cheers,
    Alan

  3. zac said,

    February 11, 2008 at 8:27 pm

    Hi Alan

    In one of my attempts I used a y=c+a*b^x model but it was not an improvement on the linear or exponential ones shown. If I get a chance, I’ll have another go.

  4. zac said,

    February 13, 2008 at 3:32 pm

    Hi again, Alan.

    I re-wrote the article after finding a better exponential model. Thanks for your input.

  5. mike said,

    February 14, 2008 at 5:49 pm

    Thanks for the analysis, Zac.

    As your earlier post asked - What is the point of us? Have we just been put here to foul our own nest? if so, we’ve done a very good job.

    You criticise the use of coal. But for most of the world’s poor, it is the only viable source of energy. Is it fair to deny them warmth in the winter, and cooking?

    Good on you for using this ‘real-life math example’ to highlight the problem.

  6. bruce guenard said,

    February 17, 2008 at 3:06 pm

    Greenhouse effect of CO2 is logarithmic:
    Why is the greenhouse effect logarithmic?

    Please use a time scale in the hundred of thousands of years.
    Your data may also be in error
    http://www.climateaudit.org/?p=1878

    Do not scare the children.

    BG

  7. zac said,

    February 17, 2008 at 3:35 pm

    Thanks for your input, Bruce, but I suspect you have not read what I was attempting to do in this model. Let me address each of your points:

    (1) Greenhouse effect is logarithmic? The article you linked to by Pilsen is talking about the effect of an increase in CO2 on temperature. My model is not talking about temperature changes or ice ages - it is simply a mathematical description of the increase in observed CO2. The increase is exponential, as shown above.

    (2) Time scale: It would not be logical to use a time scale in hundreds of thousands of years for the data I am using, since people have only been measuring CO2 levels on the top of Mauna Loa for 50 years.

    While there is data from Antarctic ice cores, it changes very slowly over time and is not relevant to the current exercise, except as a starting point for the model.

    (3) Accuracy of data: I’m at a loss to figure out the relevance of your second link. They are not talking about the CO2 data on Mauna Loa at all and do not cast any doubt on its accuracy.

    As far as I am aware, no-one has questioned the accuracy of the data I was using.

    (4) Scaring the children: What I am scared about is the rantings by the anti-science lobby funded by big business, especially the oil companies, whose task it is to muddy the climate change waters.

    The children should be scared.

  8. Darmok said,

    February 26, 2008 at 3:08 pm

    Great analysis, zac, and great way to show how mathematics can be used with real-world data.

    Bruce, your comments don’t really make sense here. The data set being modelled are CO2 over time, not temperature vs. CO2. In any case, your conclusions are not shared by the majority of climate scientists or major scientific organizations.

    And please provide reasons for your requests. A longer timescale would make the graph harder to read, but would have no significant effect on the model. And I agree, children should be scared (as should we all). They’re the ones who will inherit a vastly different world; it’s silly to try to insulate them from the dangers they’ll face, especially since they have the potential to ameliorate some of them.

  9. Steven said,

    February 29, 2008 at 10:16 pm

    That Bruce guy doesn’t know what he’s talking about.

    Good post Zac. I also agree the children should be scared - or better still, they should not follow in the footsteps of the adults.

  10. Cornell CS 322 - Intro to Scientific Computing » Blog Archive » Extrapolating an Alarming Trend said,

    March 4, 2008 at 4:42 am

    [...] http://www.squarecirclez.com/blog/earth-killer-composite-trigonometry-co2-graph/978 Posted in Topics: Uncategorized Jump down to leave a comment. [...]

  11. Fred Haynie said,

    March 14, 2008 at 3:02 am

    I’ve been working with the Pt Barrow CO2 data and the Arctic Polar ice extent data. I found them to be very similar in form. The differences between monthly values plotted out give a similar saw-tooth wave form that can be represented by a sine function with harmonics. Multiple regression yielded three statistically significant harmonics for both sets of data with the signs for the coefficients agreeing. The curve fit was 84% for the CO2 and 95% for the sea ice extent.

  12. zac said,

    March 14, 2008 at 8:57 am

    Hi Fred and thanks for your input. Have you published your results anywhere? I’d be interested to see them.

  13. Fred Haynie said,

    March 14, 2008 at 10:39 am

    No. This is a work in progress. This last year I have been looking at all the data I can find related to climate change trying to get at the truth. I retired from EPA over 17 years ago and haven’t published in over 13 years. There is too much international politicing the issue to know what to believe. Personally I believe that any greenhouse effect of CO2 is insignificant compared with water vapor and clouds. The observed rise in background CO2 can be explained by a net increase in flux from the oceans as one would expect from a net increase in SST, It’s the old chicken or egg argument.

  14. zac said,

    March 21, 2008 at 8:44 am

    Hi again Fred. I’ve been thinking about your comments, especially:

    There is too much international politicing the issue to know what to believe.

    On the issue of “any greenhouse effect of CO2 is insignificant compared with water vapor and clouds“, it is a chicken and egg thing, but in terms of a solution, which should we kill - the chicken?

    In The melting Arctic, I quoted Wadhams talking about the effect of all that reflection of heat from white snow and ice turning to absorption because of darker sea water.

    And that will certainly cause another rise in sea surface temperature…

Leave a Comment