load ncep_indeces;
%
% loads the ncep cdc indeces
% created from make_ncep_indeces.m
%
% File contains
%  ea                        663x1                     5304  double array
%  ea_jet                    663x1                     5304  double array
%  indeces_date              663x1                     5304  double array
%  nao                       663x1                     5304  double array
%  pna                       663x1                     5304  double array
%  subtropical_zonal         663x1                     5304  double array
%  tropical_northern_hem     663x1                     5304  double array
%

%
% rename the ncep nao index so I can load the hurrel index with the same name.
%
ncep_nao = nao;

% 
% load hurrell data
%
load hurrell_monthly.mat
%
% file contains:
%  nao         1659x1                    13272  double array
%  nao_date    1659x1                    13272  double array
%  nao_day     1659x1                    13272  double array
%  nao_mos     1659x1                    13272  double array
%  nao_time    1659x1                    13272  double array
%  nao_year    1659x1                    13272  double array
%

%
% ncep index starts later than hurrell index and ends later, so look only at the same time periods
%
Istart = find(nao_date == indeces_date(1));
Jend = find(indeces_date == nao_date(end));

figure;
plot(nao_date(Istart:end), nao(Istart:end))
hold on
plot(indeces_date(1:Jend), ncep_nao(1:Jend),'r')
datetick
legend ('Hurrell', 'Ncep')


%
% Do cross correlation
%
check_corr3(nao(Istart:end),ncep_nao(1:Jend),['Hurrell vs. NCEP'],['months'],20)


%
% Now filter the data
%
