Gadget by The Blog Doctor.

Thursday, May 20, 2010

Record Running Mean Temperature

Usually global temperatures are discussed in terms of a calendar year, January to December. There are many other ways of defining a year, for example March 2009 to February 2010, or May 2009 to April 2010; average temperatures for years defined in this way are called running means. The climate system is not effected by our arbitary decision to start the year on January 1st and finish it on December 31st.

Recently NASA (which runs the GISS global temperature series) announced in this document, on page 17, that:
  • the 12-month running mean global temperature in the GISS analysis has reached a new record in 2010

This record was for the May 2009 to April 2010 period. It is important to check claims that are made, no matter how reliable the source, so I decided to conduct my own analysis.

Like all of the five groups calculating a global temperature, GISS releases its temperature values every month. The data can be found at this site. I store the data from all five groups in a file on my computer (called All_temp_groups.csv).

I wrote a script in the statistical programming language R to calculate the GISS running averages. The script can be found at the bottom of this post. The script produces two files, one in chronological order and the other sorted by average temperature.

The following is output for the ten hottest running years. The first line contains the column heads. The first column contains the number of months since the beginning of the time series (January 1979). The second column is the year and month. Note that the months are in a decimal format. This is to ensure that the months are evenly spread out, so that charts are accurate and clear. Conseauently 2009.375 is May 2009 and 2009.292 is April 2009. The third column contains the average (mean) temperature for the 12 months following (and including) the date in the second column.

It is clear that my analysis supports the NASA claim, in fact in GISS data May 2009 to April 2010 is the warmest and March 2009 to April 2010 is the second warmest yearly period. As well, March 2009 to February 2010 is the tenth warmest year, ie in the top 3% of running years.


The temperature values might seem confusing. They are anomalies not absolute temperatures. They compare current temperatures with the average temperature over a defined base period. This post gives some details of temperature anomalies.

UPATE: 12th June 2010. The May value has been released by GISS and my program places the latest running year, June 2009 to May 2010 as the warmest with an average temperature anomaly of 0.665833333333333.

The question arises though, how does the GISS data compare to the other temperature series?

In the Hadley data the first 2009 month appears at position 18 which is in the top 5% of the data

The first 2009 month in NOAA comes in at position 21 in the top 6%

For RSS the first 2009 is at 11 in top 3%

For UAH first 2009 at 7 top 2%

Any claim that the last 12 months was the warmest on record should explicitly mention GISS, but it has been quite a warm year as well according to the other temperature measurement groups.

NASA also provide a plot of the running mean data shown below:

The blue line is the running means charted. Note that it starts in 1950. There is a clear increasing trend. At the bottom you can see the ENSO cycle. It is clear that the warmest years correspond to El Nino years and that cooler years correspond to La Nina years. The effect of major eruptions is also clear with cooler temperatures for the next year or so.

My R script also plots the data which can be seen below:

My data starts in 1979. Note that my chart from 1979 is very similar to the official one.

The chart of the UAH data is also interesting. UAH is the poster boy of the climate "skeptics" as it usually shows the smallest temperature rise. The following chart does not show as much warming as GISS, but the strong warming at the end should put the claim that the globe is cooling to bed for a while.

From Climate


R Script

#### Calculate 12 month running temp averages for GISS ########
#Written by Stephen Spencer, Tarneit, 3rd June 2010

link <- "C:\\Learn_R\\All_temp_groups.csv"

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("yr","GISS","RSS","NOAA","UAH","HAD","UAH_53"))

Title <- "GISS Yearly Running Averages" #Main title used in plot command
giss <-(my_data$GISS) #Extract GISS data from file and store it in variable giss
yr <- (my_data$yr) #Extract year data and store it in variable yr
row <- 1 #Initialize counting variable
years <- 0 #Initialize years variable
averages <- 0 #Intiialize averages variable
#Calculate running 12 month averages using While loop
while ((row + 11) <= length(giss)){
years[row] <-(yr[row]) #Put year data into years variable
averages[row] <-(mean(giss[row:(row+11)])) #Put current 12 month mean into variable averages
row <- row + 1} #Increment counting variable, bottom of loop

#Convert variables to a data frame
yr_aves <-data.frame(years, averages)
#Sort dataframe according to reverse order of averages
O <- order(-yr_aves$averages)
averages.sorted <- yr_aves[O,]

#Write text file to R working directory on disk in
#Data in order of year from 1979 on
write.csv (yr_aves, file="GISS 12 month running averages_unsorted.csv")
#Data sorted by largest 12 monthly averages
write.csv(averages.sorted, file="GISS 12 month running averages_sorted.csv")

plot(averages ~ years, data = yr_aves, type="l", xlim = c(1979,2010 ), ylim = c(-0.4,0.7 ), col = "red", xlab = "year", main = Title, ylab = "temp")

No comments: