Friday, 27 June 2014

Solar Panels and Tofu


Just a quick post today, it would be nice to pretend that I can contribute to this blog often and regularly but that's not always possible. Heard this neat story on Inside Science and so wanted to throw it up on the blog as it doesn't seem to have been very widely reported anywhere else.

Solar panels have, in theory at least, the potential to have a massive impact on our renewable energy consumption. While solar panel efficiencies have been climbing fairly steadily over the last few decades concerns have been raised regarding the toxic materials used in the manufacture of the solar cells. There are actually several areas in which the environmental impact of the life-cycle of solar panels may be less than ideal, as outlined here. However, the toxicity of some of the components (or materials used in the manufacture thereof..) seems to have been cause for widest concern, especially when it relates to the disposal of old solar panels.

There was good news on Wednesday for those of us who worry about such things when Jon Major of Liverpool University published a paper in Nature (link here, not sure about paywall access, etc). The paper claims that the toxic cadmium chloride used to 'activate' the solar cell (increasing the energy efficiency from less than 2% to more than 10%) can be simply and easily replaced with magnesium chloride, a compound typically used bath salts and in the manufacture of tofu.

Jon Major himself is quoted here as saying “The problem is cadmium telluride [sic]* itself is a highly toxic compound," Major said. "It’s been linked to genetic defect, and if it gets into the water supply, it can poison fish for generations.” The toxicology report for cadmium, which includes reports on cadmium chloride, makes for some fairly scary reading, detailing interstitial pneumonitis, diffuse alveolitis, fibrosis, increased lung weight, reduction in body weight, focal interstitial thickening, oedema, pulmonary haemorrhage and emphysema in rats exposed to cadmium chloride.

Not only is a reduction in the overall toxicity of the solar cell production process good news for the environment but, by using a naturally-occurring substance which will allow for a significant reduction in the costs of handling and disposal of materials, the overall cost of production will be brought down.

While there are still other environmental problems relating to the use of solar panels, including other toxic/hazardous materials, it is cheering to see that progress is being made. It is good to remember that many renewable energy sources are still in relatively early days as far as development is concerned. Ongoing research is constantly improving the methods and materials used in solar, wind and water power (not to mention fusion reactors).

A small aside I wanted to mention, having heard it reported recently (seems like a lot of my posts recently have been inspired by Radio 4, I'm clearly of a certain demographic these days!) is the rather strange legal situation home-owners might find themselves in in the UK. It is now fairly common for people to effectively lease their roof to a solar panel company in return for free electricity and installation of the solar panels, which remain the property of the company that market them. These sounds like a pretty good deal to begin with. However, there are rather harsh ramifications when it comes to re-mortgaging or selling the home, given that the solar panel company is now effectively a tenant on your roof! Certainly not a reason to not get some solar panels installed but good to be aware of.

*not sure if this is a typo/misquote or perhaps Jon Major simply mis-spoke, cadmium telluride is actually rather stable and not very soluble. Provided that it is disposed of correctly, it's pretty safe and, given the context I believe he meant cadmium chloride not telluride.

Thursday, 5 June 2014

D-Day and the Met Office

If I were being glib (and I often am) then I might have titled this post 'How the Weather Won the War'. However, I find it hard to be glib about war, particularly World War II. Perhaps it's memories of my grandfather, who fought a role in the war that went far beyond the stories he told me as a child. More likely it is simply the staggering loss of life that I am now better able to comprehend. Certainly, I am sobered by the realisation that the work I now do may once have contributed to one of the most important battles ever fought.

If ever there was an example of high-pressure meteorology then it must have been the weather forecasts made by the chief meteorological officer for Operation Overlord, Group Captain James Stagg on and around June 4th 1944. Though, to see a picture of the guy, he looks like he could probably handle it. That steely glare was presumably captured at some other time than the 4th of June though when he wrote in his diary 'I am now getting rather stunned - it is all a nightmare'.


Stagg was responsible for advising Eisenhower when D-Day (variously referred to as the largest seaborne, the largest amphibious and the largest just plain old invasion of human history) would go ahead. The requirements placed upon Stagg were that the day be close to a full moon and that low tide be at or around dawn. So far, so good, a reasonable almanac and/or calendar would be able to supply that information. However, it was also necessary that winds be light, that conditions be no worse than slightly cloudy (30% coverage below 8,000 feet) and that visibility be more than three miles. These conditions are considerably harder to predict and forecasting them, particularly 70 years ago, is an error-prone business.

Sian Lloyd has written a great piece at the Huffington Post which lays out the order of events which came from James Stagg's predictions, including his advice that the operation not go ahead on the 5th, as planned. Instead, on the night of the 4th, Stagg told Eisenhower that there should be a break in the otherwise unsettled weather on the morning of the 6th. This break in the weather was not predicted by the Germans and so German intelligence had decided that a landing would be unlikely on that day.

It is likely that James Stagg would have known that the Germans failed to predict the break in the weather as he had access to observations coming from the Germans themselves. Weather reports originating from German U-boats were encoded by the Enigma machine and, thanks to the deciphering done by Bletchley Park these reports were now readable by Allied forces. An intriguing sidenote, given the meteorological theme here, is the vital role that weather reports played in the Allied capture and decoding of the Enigma code. It was Harry Hinsley, working at Bletchley Park, who reportedly realised that German weather trawlers must be able to decode Enigma messages and so must have code books aboard. This realisation led directly to the attack of one of these trawlers and the capture of a code book.

The fact that Group Captain Stagg had access to German weather reports may well have led directly to the success of the Normandy landings. However, it was weather coming from the west that was most crucial to the D-Day landing decision and so it certainly helped that an observation network was in place providing data from reconnaissance aircraft as well as ships at sea. While ships were supposedly restricted by a radio silence order, it has been speculated that weather reports were sent in via messenger pigeon. All of these observations contributed to the hand-drawn charts used at the time for forecasting. The chart from the day itself is available (upon request) at the Met Office library and is a remarkable piece of scientific history. Seeing the chart, which admittedly looks like almost any other synoptic chart, makes one feel the weight that history placed on that single sheet of paper. Not only that but the responsibility that those scientists that drew the chart bore for being absolutely correct in their determinations. Quite frankly, I think I would prefer the astronomical observations I'm more familiar with, I am unable to think of a single situation in which anyone's life has been placed at risk due to my mis-calibration of GBT data!

Weather charts from both the Allied and Axis forces for June 6th, 1944 are shown below. Note how the Allied chart contains observations covering Germany while the German chart contains none of Britain. The entire outcome of World War II may well have come down to the simple superiority of our knowledge about the weather.

Allied weather chart for 6th of June, 1944

Axis weather chart for 6th of June, 1944


There is a webpage hosted by the Met Office itself with some embedded videos which go into detail regarding the interpretation of the weather charts and what the contributing factors were at the time. If you are interested in some of the finer details of the meterology involved here then I advise you to go here.

I think it is worth pointing out the role that women meteorologists played in these predictions. Although there were no women forecasters until 1947 Wren meteorologists were stationed with the other navy staff at Portsmouth collectively responsible for drawing the D-Day planning charts and other work. It was often roles such as these chart-drawers and the 'Harvard Computers' that were 'allowed' to be filled by women and lay the groundwork for a future which includes female Lego scientists(!) While I have mainly focussed on James Stagg in my post, it should be remembered that there were other contributors to the forecasts that decided that the Normandy invasion should go ahead. They too, must have surely felt the gripping tension James Stagg did when he wrote 'Fair interval confirmed, invasion put on "Final and Irrevocable Decision". Whatever the outcome the decision is taken.'

The next possible window for the planned invasion was to be two weeks later, at the next suitable tides. Stagg later wrote to Eisenhower that, had the landing been delayed until that day, the troops would have met the worst weather in the region for 20 years. Eisenhower wrote back - 'Thanks, and thank the Gods of war we went when we did'.

Monday, 2 June 2014

Why the world cup will/won't be predicted by computer modelling.


You may have recently heard about attempts to predict the results of the upcoming World Cup in a scientific way. Although it's not mentioned explicitly the calculations by Stephen Hawking and Goldman-Sachs (GS) are the results of statistical modelling. Fortunately for me, this ties in well to a blog post I already wanted to write about just this subject.

The online betting company Paddy Power has employed Stephen Hawking for a month in order to calculate the probability that England will win the world cup. A more general aim of evaluating the overall outcome of the world cup has been undertaken by GS. I heard Peter Oppenheimer of GS interviewed last Thursday morning by John Humphrys and the interview in general was a really good example of the problems with the public perception of probability and statistics. The interview should be available for the next few days at least here and the bit I'm referring to was slightly before 7 am if you're trying to pinpoint it.

The interview consisted largely of Peter Oppenheimer explaining the details of their model, which include the past goal-scoring history of each team (as might be expected). Some more subtle analysis included the under- or over-performance of those teams at previous world cup tournaments as well as home vs away games. Hawking's analysis allowed for more intricate inputs, such as the height above sea level for the match. However, Hawking was approaching the problem from a different perspective, analysing the prospects of a single team, while GS were modelling the entire competition and the relative placings of every team.

  What I found particularly blog-worthy about the Radio 4 interview was the attitude of John Humphrys. Humphrys, along with his radio 4 compatriot Melvin Bragg are exceptionally intelligent men and yet they are often dismissive of vital aspects of the scientific method. I am dragging Bragg into this because I have heard several episodes of In Our Time which have a scientific theme in which he happily confesses his ignorance of maths and science to his guests. This disregard would be very poorly received if it related to a knowledge of British history, for example. However, numerical and scientific theorems do not appear to warrant the same level of esteem.

  I digress, in the interview Humphrys was incredulous of Oppenheimer's World Cup predictions. Notably he said something like 'I don't even follow football, yet I can probably tell you the four teams that will end up in the semi-finals' (apologies if this is horribly paraphrased, I am unable to listen to the interview again at the moment). Implying perhaps that the work by GS was worthless as it only told us something that could be guessed at by a layman anyway. There are two important points here. Firstly, I think that this misses the point entirely. The phrase that springs to mind is 'when you do something right, people won't be sure you've done anything at all' (if anyone can trace this quote back further than the Futurama link I've pasted please let me know!).  Humphrys statement actually shows us that there is really an intuitive element to probability which isn't always evident, especially when it comes to some of the more esoteric results of probability theory, such as the still-argued-over Monty Hall problem. If a layman can predict the four teams to reach the semi-finals of the World Cup 2014, why scoff at attempts to do the same thing in a numerical, analytical manner? Why does John think he can predict the semi-finalists? Because he is aware that Brazil, Germany, Argentina and Spain are probably the best teams in the world, even if he gained this awareness through osmosis, something very easy to do, at least in the UK. Why are these teams the best (or perceived to be so)? Because they win a lot, meaning that they have good, measurable goal scores and differences - exactly the kind of variable that is input into the GS model. Even I, as a complete football luddite, know that Brazil are extremely likely to beat the U.S. at 'soccer' (no offence U.S.). This is because I have been brought up with images of Pelé as the messiah of football while there's only a grudging willingness to acknowledge the participation of the U.S. in the same sport because, you know, at least they give it a go.

  The second point I want to make is that I think Humphrys misunderstands the language of probability that Oppenheimer is using. I think that this represents a fundamental lack of public understanding of probability. Scientists understand that very few hypothesis can ever truly be ruled out completely and so may appear vague or uncertain about their findings. This allows scientific theories to be cast as 'doubtful' when they are, in fact, remarkably certain.

  We (or at least John Humphrys) seem to have some inbuilt desire for our models to be 'deterministic', meaning that there will be an exact, predictable outcome. The alternative being presented by GS is for a 'probabilistic' result. The difference between these two interpretations is rather philosophical and so somewhat loosely defined, this is probably (heh) why it's not easily digested by the public at large. A glib explanation of this difference comes from the Terry Pratchett book 'The Colour of Magic' in which a character flips several coins. The deterministic philosophy would lead us to expect that half of the flips land on heads while half land on tails, in the book what happens is that four of the coins land on the coins' edge while another turns into a caterpillar. While it's unlikely that a probabilistic analysis of coin flipping could predict these outcomes, it may be able to account for a very slightly weighted coin, or perhaps a coin flipper who consistently puts the coin a particular way up before flipping. Either of these elements (and more) could contribute to the outcome of a coin flip being other than 50:50. This might actually be important to you if you really care about the outcome of 1,000 coin flips. Worse, you might care about the outcome of the World Cup, particularly where England are involved. That might mean you care about El Niño and its intensity this year, not because there's some spooky coincidence between that intensity and how well England perform but because a strong El Niño might make it hot and dry in Brazil during the competition, probably not a good thing for footballers who are used to playing in the cold and wet.

Our ability to model things like El Niño or, heaven forfend, the entire Earth climate, depend on things that have far more effect on outcomes than a slightly weighted coin or a sneaky flipper. They depend on things like knowing the sea temperature in the middle of the pacific and how exactly that temperature varies with the depth of the ocean. Even our best measurements of such quantities are subject to errors as banal as being mistyped by a sleepy meteorologist or as sophisticated as rounding error in a big-endian vs little-endian machine. These errors have the potential to grow and lead to larger and larger effects. When climate modelling reveals emergent properties that have large effects, such as hurricanes, it becomes vitally important that those properties are not being unduly amplified by errors in your inputs. For an excellent overview of how climate modelling works in just this context see Gavin Schmidt's TED talk, 'The Emergent Patterns of Climate Change'. Of course, when running models as complex as climate modelling, essentially trying to recreate the entire Earth system with computer simulations we have to bear in mind that 'garbage in = garbage out' and that if our measurements are not at least correct on average then our model is likely to be meaningless (though possibly still informative). Knowing that it is perfectly possible that errors do creep in though, enables us to be probabilistic about our analysis. For example, we want to be absolutely sure that, when we are looking at our climate model we are not looking at that tiny fraction of coin flips that land on the edge (or turn into a caterpillar). We can do this by running our climate models again and again and then analysing the results of all of the different simulations in a statistical way. It is for this reason that scientists cite a percentage likelihood that an event will occur. Rather than hedging their bets, they are simply telling you how many times a certain event will occur, given certain conditions. This may be seen as dodging the question but it is actually an attempt to be utterly transparent and honest about results.

The statistician George E.P. Box wrote that 'essentially, all models are wrong, but some are useful'. This summarises beautifully our inability to fully recreate complex systems in simulations, we can only extrapolate and interpret.