Category Archives: Weather Prediction

What can Machine Learning do for Climate Science ?

Firstly, what is Machine Learning, other than a “sexy” buzzword used by the science community to make statistics sound cool? Well, per Andrew Ng, chief scientist at Baidu Inc. and an associate professor at Stanford it is “The science of getting computers to act without being programmed”. That statement leaves a lot to the imagination. One might start off by thinking of movies like I-Robot, Her and Ex Machina. For this post let’s stay grounded and say that Machine Learning explores the study and construction of algorithms that can learn from and make predictions from data. So, what can such an algorithm do for Climate Science? Turns out a lot.


Dr Claire Monteleoni, Assistance Professor at George Washington University, uses Machine Learning to track climate models. She along with many others are building a new field of Climate Informatics, a term she coined, with the aim of encouraging collaborations between climate scientists and Machine Learning researchers in order the bridge the gap between data and understanding. In her paper [1] Tracking Climate Models, she demonstrates the advantage of a Machine Learning approach for combining the predictions of multiple climate models. The Intergovernmental Panel on Climate Change currently use about 20 climate models to make informed decisions and predictions on climate change.  This paper introduces the use of an online learning algorithm called Learn-α to make predictions that match or surpass that of the best climate model.


Machine Learning is also useful in application where there is little data or the data is sparse. For example, global maps of the partial pressure of CO2 (pCO2). Observations of sea surface pCO2 are taken mostly by commercial ships and consequently are sparse in both time and space, especially before the 1990s. Knowledge of this pCO2 is essential to investigate the variation of the ocean CO2 sink, from which data comparisons to the Global Carbon Budget can be made. To “fill in the gaps” Dr Peter Landschützer, from ETH Zürich, employed a Forward-Feed Neural Network. Neural Networks are based on the way the biological brain solves problems, using a large cluster of neurons connected by axons.


Finally, looking a bit closer to home, the Informatics Lab at the Met Office are applying Machine Learning techniques to traffic cameras. They are currently undertaking a project which will use data taken from traffic cameras to train a machine to recognize the weather. This is especially useful when considering snow. Snow is the hardest weather to forecast as it depends on small differences in pressure, temperature and heights of clouds. To know if it’s snowy it’s much easier to look at the ground. From the images on the traffic cameras the amount of white could tell you and furthermore characterise the snowy weather. What’s particularly cool about this project is that all the code and data is freely available on the Informatics Lab website


To conclude, we can see many applications of Machine Learning from combining the strengths of different Climate models to just wondering if it’s snowing.  The field of Climate Informatics is without doubt exciting and becoming more and more important. We might be a long way off a computer feeling cold but until then let’s use it to tell us more about our complicated climate.


[1] Monteleoni, C., Saroha, S., Schmidt, G., and Asplund, E.: Tracking Climate Models, Journal of Statistical Analysis and Data Mining, 4, 372–392, 2011.

What on Earth is Mathematics of Planet Earth?

Until recently I had no problem explaining what I was studying; I was just an average maths student. I could reliably predict the reaction of a person informed of this fact: “How can you do that? I’ve always been hopeless at maths. And anyway, what are you going to end up doing with that degree”? Things got much more complicated when I started a PhD at Mathematics of Planet Earth. The first reaction is now usually the question used as a title to this article: what on earth is mathematics of planet earth?! After a brief explanation that I am learning how to use and develop maths for climate and weather predictions, I just get a reassuring statement: “I know that this whole climate change thing is very dangerous/rubbish” (choose the option that applies to you) and a question: “But why did you resign from doing proper maths?”

Actually, I am more involved in studying mathematics than ever. No science would exist without mathematics, in particular climatology or meteorology. Some people can predict the rain by feeling it in their bones; I can “predict” the rain more or less based on the fact that we are in UK. But do we really want to risk our life on someone’s body niggles? No, I do not exaggerate. Our life really can depend on it. Do not forget that a bad weather prediction not only can get you wet, but also farmers might not prepare for a drought (and the crops would get extremely expensive next year), local authorities might not decide to grit ice-covered roads (so you might get stuck in traffic or even have an accident) or a dangerous storm might hit citizens completely not ready for it. It is something worth looking at, is it not?

To get more reliable predictions about the state of atmosphere in the next couple of hours, days or even centuries, we need… mathematics. No, not that boring multiplication table, but nearly every field of very advanced mathematics. Let us take a look at a couple of examples.

Chaos Theory

You will have heard of the “butterfly effect” which allegedly can provoke a hurricane. This is all about the chaos. The intuitive definition, given by E. Lorenz, the creator of chaos theory, is [1] when the present determines the future, but the approximate present does not approximately determine the future. It means that if we were given infinitely precise initial conditions (i.e. full description of the state of the weather now), we could predict the weather at any time in the future. So why do meteorologists sometimes get it wrong? Because this is just wishful thinking. In reality we are not able to get perfect measures of the weather components, for example due to the limitations of measuring devices. Thus mathematicians need to choose the most important measurements with the available precision and try to get the best prediction they can. However, chaos theory states that, under some conditions, starting from almost the same state we can get completely different results. It complicates weather prediction so chaos theory is still something we need to study.

Numerical Analysis

There would be no weather forecast without very advanced computers we are using. Some of them are even supercomputers, such as the one used by Met Office. It costed a trifling £97 million. Why do governments invest such enormous sums into such equipment? Before we understand that, we have to see how the weather prediction works. As mentioned above, we cannot forecast it exactly. Hence mathematicians have to get rid of some parameters that seem to be less important (by the way, deciding which are those is far from obvious) and, using the ones that are left, build a model. This is a set of equations (sometimes thousands of them!) that describe the system. Do you remember solving systems of two equations at school? You might have struggled with it. So now imagine solving thousands of much more complicated ones. Yes, this is exactly why we need supercomputers; they make this job feasible. However, mathematicians still need to make sure that the result produced by a computer is sensible. They do it by carrying out a numerical analysis, checking the properties of the system.

I’ve mentioned only a tiny fraction of the whole range of mathematical tools used in the weather prediction. Next time when you listen to your favourite weather forecast, keep in mind that it would not make any sense without mathematics. And if you happen to have a child, encourage them to study maths. Just in case.


[1] Danforth, Christopher M. (April 2013). “Chaos in an Atmosphere Hanging on a Wall”. Mathematics of Planet Earth 2013. Retrieved 27 January 2016.

It’s OK When Weather Forecasts Are Wrong

Weather forecasts don’t have a great rep. Since I started studying the Mathematics of Planet Earth, I’ve lost count of the number of friends and family members that have asked me, “But weather forecasts aren’t any good are they?” Sure, weather forecasting isn’t an exact science. You only have to follow a forecast for a week in Autumn or Spring in the UK to notice that it rains when you were told it would be sunny and vice versa. Have a look at Figure 1, which shows the number of times the Met Office correctly forecasted rain throughout 2014 — they get it right about 70% of the time (this is very good — the Met Office claim to be second in the world for quality of their forecasts [1]). However, I don’t think this is a problem with the science. It’s a problem with how we interact with the forecasts.

Figure 1: The fraction of times rain was accurately forecast by rain symbols one day ahead of time by the Met Office throughout 2014. Source of data: a/pdf/5/6/MOSAC20_2015_Anne x_III_forecast_accuracy.pdf
Figure 1:
The fraction of times rain was accurately forecast by rain symbols one day ahead of time by the Met Office throughout 2014.
Source of data: a/pdf/5/6/MOSAC20_2015_Anne x_III_forecast_accuracy.pdf

In fact, weather forecasts should not be correct all the time. Ewen McCallum, a former Chief Forecaster at the Met Office says: “If we got it [the weather forecast] right every time, we’d be God.” Trying to predict the weather is a bit like trying to predict dice rolls — we just don’t have enough information to be able to do so. In order to have a perfect prediction we would need to know the exact air conditions — temperature, pressure, wind velocity and humidity — at every single point in the Earth’s atmosphere with perfect accuracy. This clearly isn’t possible: even if our measuring instruments were perfect, it’d be impossible to know these properties everywhere. Even the flap of a butterfly’s wings or a baby’s breath will cause these quantities to change.

Surely these effects are too small to make a difference though? It turns out this isn’t true. The Earth’s weather is known as a complex system — the tiniest changes to its state cause the system to evolve in a different way. This phenomenon is known as chaos and is observed in many types of system. It means that no matter how close we get to measuring or guessing the current conditions, at some point in the future we won’t be able to determine the weather.

One of the ways that forecasters try to account for this is by trying their simulations many times with slightly different conditions at the start, to account for the unknowns in their measurements of the current state of the atmosphere. This technique is known as ensemble forecasting. Rather than telling forecasters what will definitely happen at 3pm on 19th of April, they might see that in 70% of their simulations it rains over London at this time. This gives them a probability for it raining, rather than a definite answer to whether it will or won’t.

However, we as the public don’t like this kind of uncertainty. We simply want to know if it will or if it won’t rain, and it almost looks weak of a forecaster to avoid giving a definite prediction. Unfortunately giving a definite prediction is poor science as it does not represent truth about the weather. Given that the nature of the weather is unpredictable, demanding a definite forecast will inevitably lead to failure in the long term.

So the problem is not so much with the quality of the research at the Met Office — it lies with our expectation for a definite prediction rather than one that contains uncertainties (such as one saying there is 70% chance it will rain today). These uncertainties are an inherent part of a chaos theory, which we see in the weather as we can’t have perfect knowledge of the whole system at once.