loaddods('http://iridl.ldeo.columbia.edu/expert/SOURCES/.UEA/.CRU/.TS2p1/.monthly/.mean/.temp/X/64.6875/92.8125/RANGEEDGES/Y/1.904735/32.38044/RANGEEDGES%5BX/Y%5Daverage/T/%28Jan%201981%29%28Dec%202002%29RANGE/T/3/runningAverage/T/%28Jun-Aug%29VALUES/dods')

obs=temp.temp;
loaddods('http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCEP/.EMC/.CFS/.MONTHLY/.surface/.temp/X/64.6875/92.8125/RANGEEDGES/Y/1.904735/32.38044/RANGEEDGES%5BX/Y%5Daverage/S/%28Jan%201981%29%28Dec%202002%29RANGE/S/%281%20May%29VALUES/L/1.5/3.5/RANGEEDGES%5BL%5Daverage/dods')

temp.temp=temp.temp-273.15; 
temp.temp(temp.temp>500)=NaN;

mc=10000;
m=zeros(1,mc);
wrk = temp.temp(~isnan(temp.temp));
for imc = 1:mc
  ind=randperm(length(wrk));
  m(imc)=mean(wrk(ind(1:15)));
end
ml = prctile(m,2.5);
mu = prctile(m,97.5);


plot(S/12+1960,temp.temp,'+');   
hold on
h=plot(S/12+1960,mean(temp.temp,2),'o');
set(h,'MarkerFaceColor','k')
plot(S/12+1960,S*0+ml,'--')
plot(S/12+1960,S*0+mu,'--')
h=plot(T/12+1960,obs,'ro-');
set(h,'MarkerFaceColor','r')
h=plot(S/12+1960,mean(temp.temp,2)-mean(wrk)+mean(obs),'go-');
set(h,'MarkerFaceColor','g')
hold off

corr2(obs,mean(temp.temp(1:22,:),2))

  