#12 HAdcru3c.glb #potential target 1961-1990 get.hadcru=function(hemi="gl",method="had",verbose="default") { if(method=="had") { #http://hadobs.metoffice.com/hadcrut3/diagnostics/hemispheric/northern/monthly index=c(gl="global/nh+sh",nh="hemispheric/northern",sh="hemispheric/southern") url2=file.path("http://hadobs.metoffice.com/hadcrut3/diagnostics",index[paste(hemi)],"monthly" ) D=read.table(url2) #dim(D) #158 12 #start 1850 name0=c("year","anom","u_sample","l_sample","u_coverage","l_coverage","u_bias","l_bias","u_sample_cover","l_sample_cover", "u_total","l_total") names(D)=name0 hadcru.glb=ts(D[,2],start=c(1850,1),freq=12) #this is one month more recent than cru version on June 18,2008 if(verbose=="verbose") return(D) else return(hadcru.glb) } if(method=="cru") { url<-paste("http://www.cru.uea.ac.uk/cru/data/temperature/hadcrut3v",hemi,".txt",sep="") #1850 2008 h<-scan(url) start0<-h[1] N<-length(h) h<-array(h,dim=c(27,N/27)) h<-t(h) hadcru3v.ann<-ts(h[,14],start=start0) #1850 - hadcru3v=ts(c(t(h[,2:13])),start=c(1850,1),freq=12) temp=(hadcru3v==0)&(time(hadcru3v)>=tsp(hadcru3v.ann)[2]) hadcru3v[temp]=NA hadcru3v=window(hadcru3v,end=max( time(hadcru3v)[!is.na(hadcru3v)]) ) return(hadcru3v) } } hadcru.glb=get.hadcru() #http://hadobs.metoffice.com/hadcrut3/diagnostics/time-series.html # * Column 1 is the date. # * Column 2 is the best estimate anomaly. # * Columns 3 and 4 are the upper and lower 95% uncertainty ranges from the station and grid-box sampling uncertainties. # * Columns 5 and 6 are the upper and lower 95% uncertainty ranges from the coverage uncertainties. # * Columns 7 and 8 are the upper and lower 95% uncertainty ranges from the bias uncertainties. # * Columns 9 and 10 are the upper and lower 95% uncertainty ranges from the combined station and grid-box sampling, and coverage uncertainties. # * Columns 11 and 12 are the upper and lower 95% uncertainty ranges from the combined effects of all the uncertainties. # plot(c(time(hadcru.glb)),D[,11]-D[,2],type="s",ylim=c(0,.4)) #url2 = "http://hadobs.metoffice.com/hadcrut3/diagnostics/global/nh+sh/annual" # D=read.table(url2) #dim(D) #158 12 #start 1850 # name0=c("year","anom","u_sample","l_sample","u_coverage","l_coverage","u_bias","l_bias","u_sample_cover","l_sample_cover", # "u_total","l_total") # names(D)=name0 # hadcru.glb=ts(D[,2],start=1850) # plot(c(time(hadcru.glb)),D[,11]-D[,2],type="s",ylim=c(0,.4))