Loading...
Gadget by The Blog Doctor.

Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Friday, April 30, 2010

Attacks on the atmospheric temperature record

There have been at least three ways that climate deniers have attempted to invalidate the atmospheric temperature record.

1. Claiming that weather stations are placed in locations that produce warming

The main proponent of this view is Anthony Watts at his surfacestations.org site.

Watts uses photographs in an attempt to demonstrate his claim but two papers have been written analysing the US temperature record that completely demolish Watts' claims. Discussion of the papers can be found here and here.


2. Claiming that the stolen CRU emails prove that climate scientists have deliberately manipulated the temperature record to exaggerate the warming trend.

Here is one of many examples:
Perhaps the most infamous example of this comes from the "hide the decline" email. This email initially garnered widespread media attention, as well as significant disagreement over its implications. In our view, the email, as well as the contextual history behind it, appears to show several scientists eager to present a particular viewpoint-that anthropogenic emissions are largely responsible for global warming-even when the data showed something different.


The climate scientists were actually discussing a technical issue in dendrochronology (study of tree rings)called the divergence problem. See here and here for details. Climate deniers who mistakenly believe that the planet has been cooling over the last decade or so, quickly assumed that the scientists were trying to hide this, nonexistent, temperature decline.

There have been three enquiries resulting from the campaign of the deniers against the CRU scientists. All three have exonerated the scientists involved, see here, here and here. What is the denier response to this thorough debunking of their claims? You might expect that honest people would apologise in such circumstances, but that is not the denier way. The response to the exhonerations has been to claim that the people making the reports are part of the conspiracy, as demonstrated in this post, by Australia's foremost climate denier. Such people believe in conspiracies wrapped up in conspiracies, and people treat such twaddle seriously. Weird!

UPDATE (7/05/2010)
Stephan Lewandowsky has written an interesting article on conspiracy theories including the truthers and AGW deniers. The most interesting thing about Lewandowsky's article is the number of conspiracy nuts who have come out in the comments.

UPDATE (21/05/2010)
Dr Roy Spencer, runs the UAH satelite temperature record. Spencer is a well known climate skeptic. One of the major targets of the attacks on scientists and the temperature record is Phil Jones, who runs the HadleyCRU temperature record. At a recent Heartland Conference Spencer defended Jones in the following terms:

"He says he's not very organised. I'm not very organised myself," said Professor Spencer. "If you asked me to find original data from 20 years ago I'd have great difficulty too.

"We just didn't realise in those days how important and controversial this would all become - now it would just all be stored on computer. Phil Jones has been looking at climate records for a very long time. Frankly our data set agrees with his, so unless we are all making the same mistake we're not likely to find out anything new from the data anyway."

(Source here paragraphs 3 and 4 after the heading Cloud Effect)



UPDATE (09/07/2010)
The final two reports on the climategate "scandal" are now in, see here and here. There have now been five enquiries about the CRU email issue. All five have exonerated the scientists involved and pointed out the untruths and misrepresentations put around by the global warming denial industry. Will we see the climate deniers retract their untrue claims and apologise for their mistakes - I wouldn't hold my breath!

UPDATE (22/11/2010)
There have been many posts on the anniversary of the publishing of the stolen emails; for examples see posts here here.

UPDATE (27/08/2011)
The National Science Foundation (NSF)has conducted a very thorough review of the allegations about the behaviour of Michael Mann (of hockey stick fame). In the report that can be found here he was completely exonerated from any implication of impropriety or research misconduct.

For more evidence on the similarity of the various temperatrue records see this post.

3. Claiming that weather stations in colder locations have been deliberately removed from the temperature record

Watts and D’Aleo make the following claim in this document on page 9.
Around 1990, NOAA lost more than three-quarters of the climate measuring stations around the world.
It can be shown that country by country, they lost stations with a bias towards higher-latitude, higher-altitude and rural locations, all of which had a tendency to be cooler.


This claim has been widely debunked here, here, here, and here.

At this link Roy Spencer states:

... at face value, this plot seems to indicate that the rapid decrease in the number of stations included in the GHCN database in recent years has not caused a spurious warming trend in the Jones dataset — at least not since 1986.


All of these attacks on mainstream climate science show strong elements of paranoid conspiracy theorising. It is clear that the vast majority of people qualified to make a judgement accept that the planet is warming and that most of the warming in the last 50 years has been induced by human activities - anthroprogenic global warming (AGW). For evidence of this claim see this post. The making of paranoid claims that the climate scientists are conspiring to distort reality for left wing political aims, is one of the few responses available to those who want to deny the reality of AGW. The response to the official exhonerations of the CRU scientists shows that deniers not only believe in conspiracies but conspiracies wrapped up in conspiracies.

In more rational eras the crazy claims of the climate deniers would be laughed at by most people, who would then move on to more productive pursuits, but irrationality seems to be rife in the world at the moment. See here and here for some ideas on the current irrationality.

It is clear from an analysis of the climate data that the five main temperature data sets are quite similar, when properly analysed, see this post for details. The Hadley / CRU time series sits squarely in the middle of the range of results. If the CRU scientists had been deliberately manipulating the data to enhance the warming then the Hadley / CRU data would be an outlier. Clearly this is not the case.

Thursday, April 22, 2010

Climate and charting with R

For many years I have been using Excel to analyse data and produce charts. Excel charts, though, are ugly.

Many of the Climate Science sites that I visit have very clear and attractive charts of temperature trends to illustrate the arguments presented in posts. Upon investigation I have discovered that many of these superior charts are produced in a statistical analysis program called R.

R is open source software and can be downloaded free from this site.

This post discribes:
* the five groups that produce temperature data
* downloading temperature data to a computer
* importing temperature data into R
* manipulating the data in R
* producing charts in R

There are five main groups of researchers that produce global temperature records. Three use temperatures measured at the surface: Giss, Hadley and NOAA; and two use satellites: UAH and RSS

The temperature data can be found at the following locations: Giss data, Hadley data, NOAA data, UAH data and RSS data.

These data sets require some manipulation before they can be imported into R. The spaces have to be removed and the data separated by commas. I remove the spaces in word and insert a tab character between the pieces of data, using the find ... replace function. I import the data into Excel and export it in comma delilited (CSV) format.

Here are the first two years of the Hadley data after this manipulation:
year,anom
1850.042,-0.691
1850.125,-0.357
1850.208,-0.816
1850.292,-0.586
1850.375,-0.385
1850.458,-0.311
1850.542,-0.237
1850.625,-0.34
1850.708,-0.51
1850.792,-0.504
1850.875,-0.259
1850.958,-0.318
1851.042,-0.345
1851.125,-0.394
1851.208,-0.503
1851.292,-0.48
1851.375,-0.391
1851.458,-0.264
1851.542,-0.279
1851.625,-0.175
1851.708,-0.211
1851.792,-0.123
1851.875,-0.141
1851.958,-0.151

The strange decimal numbers represent the months of each year and ensure that the months are equally spaced in a chart.

The surface temperature data go back to the 19th century. I produced the chart below from the Hadley data:



The red line is the monthly data. The black line is the line that best fits the data (regression line).

Here is the script that generates the chart above:

#################### Hadley temp average calc #################
## STEP 1: SETUP - Source File
par(las=1)
link <- "C:\\Learn_R\\Hadleydata\\Hadley_since_1850.csv"

## STEP 2: READ DATA
my_data <- read.table(link,
sep = ",", dec=".", skip = 0,
row.names = NULL, header = T,
colClasses = rep("numeric", 2),
na.strings = c("", "*", "-", -99.99,99.9, 999.9),
col.names = c("year", "temperature"))

## STEP 3: MANIPULATE DATA
Title <- "Hadley Temperature Chart and Linear Regression since 1850"

## STEP 4: Ceate Plot
# Plot temperature data
plot(temperature ~ year, data = my_data, type="l", col = "red", main = Title)
# Calculate regression
lm_fit <- lm(temperature ~ year, data = my_data)
# Display regression stats in R Console
summary(lm_fit)
# Plot regression line
abline(lm(temperature ~ year, data = my_data ))

############################################################

The par(las=1) command ensures that the Y-axis values are vertically aligned

The link <- "C:\\Learn_R\\Hadleydata\\Hadley_since_1850.csv" assignes file and path to the link vector (variable). I store the data files on C: drive in a sub_folder of the folder Learn_R.

Step 2 reads the data file into a variable (data frame) and performs some formatting.

Step 3: adds the title for the chart.

Step 4:
* Plots the data (with the plot command)
- temperature against year
- indicates the data to be plotted (data = my_data)
- sets the chart type to line (type="l")
- sets the colour of the line to red (col = "red")
- inserts the title from Step 3 (main = Title)
* Calculates the regression statistics
- with the command : lm_fit <- lm(temperature ~ year, data = my_data)
- writes the regression statistics to the R console (summary(lm_fit))
* Uses the regression information to plot a line of best fit
- with the command : abline(lm(temperature ~ year, data = my_data ))

Most of this script comes from D. Kelly O'Day's site at Climate Charts & Graphs. O'Day's site is a very useful introduction to the R language.

The link R Resources on the site provides links to a wide range of useful materials.

Here are some more charts that I plotted:









More charts can be seen at this link.