#PART 1 of this script takes Jones data from CRU, changes -9999 to NA and saves R-tables v - with dimension 1769 x 2592 (2592=72*36) #some of these steps take a few minutes since the dataset is large #the downloading from CRU and unzipping needs to be done manually, since I don't know how to unzip within R although it looks possible #PART 2 takes the saved table, truncates it to 1902-1995 and Mann's 1082 cells, scales to SD=1 and lat-weights #PART 0 - MANUAL PART #make directories "c:/climate", "c:/climate/data", "c:/climate/data/jones", "c:/climate/data/mann" #Download Jones data from http://www.cru.uea.ac.uk/ftpdata/hadcrut2.dat.gz #Unzip to "c:/climate/data/jones/hadcrut2.dat" #open hadcrut2.dat in Notepad and see what year and last month are. As of July 14, 2003, it was (2003,5). #the above is inefficient way of checking on final date, but it's only once #PART 1 - PUTTING JONES DATA INTO R- TABLE loc<-"c:/climate/data/jones/hadcrut2.dat"; v<-scan(file=loc,n=36*(2006-1855)*12*75);#reads 4,776,300 items (July 2003) n1<-length(v)/75; v<-array(v,dim=c(75,n1)); v<-t(v); ##dim v (July 2003) is 63684x75 ## 63684=36 lat groups * 1769 months from 1856 Jan to 2003 May ##column 1 is year; column 2 is latitude group 1,,,36 north to south; column 3 is field in which 1=temperature; columns 4,..,75 are temperature anomalies for longitude groups 1,...72 from west to east (178.5W to 178.5E ##NA values indicated by -9999 #REPLACE -9999 WITH NA marker<--9000; temp<-(v