  % Decomposition en ondelettes de la NAO. 

clear all

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Chargement des donnees a etudier

%load /usr/home/lbulod/Francia/Velocidades/S4v
load /Francia/Velocidades/N1v
load /Francia/vientos/vel
load /Francia/annie/v1300

%N1u=-N1u;
load /Francia/adcp/u80
load /Francia/Velocidades/uvmoy
load te80i
te80i=te80i(12:end-1)';

addpath /Francia/Estadisticas%aqui esta nanmean
addpath /Francia/Velocidades
load /Francia/vientos/u23c
load /Francia/vientos/vpirata

v=uvmoy(4,378:end)';v=completo_series1(v,5);
v=v(2:end-1);
u=uvmoy(4,1:377)';u=completo_series1(u,5);
u=u(2:end-1);
load resnueva
%load restemp
%y=resnueva(:,7);
%y=v1300';
%y=restemp(:,3);
y=u;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%EJE DE TIEMPO
a1=datenum(1999,11,12);
a2=datenum(2000,11,20);
time=a1:a2;
xtim=time(1:90:end);
atim=datestr(xtim,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
exp1=2;
exp2=7;
inter=40;
abc
conv_fft_abc


figure;
%initfig;

subplot(2,1,1)
plot(time,y,'r')
ylabel('u component N2 1000 m')
set(gca,'xlim',[min(time) max(time)],'XTick',xtim,'XTickLabel',[])

hold on

aver=1:201;
subplot(2,1,2)
contourf(time,aver,abs(wave),[0:0.05:1])
caxis([0 1])
view(0,-90)
%colorbar
hold on
%plot([1 200],[75 75],'w')
ylim([0 200])
r=30:30:200;
set(gca,'ylim',[0 200],'YTick',r,'YTickLabel',floor(period(r)))
set(gca,'xlim',[min(time) max(time)],'XTick',xtim,'XTickLabel',atim)
xlabel('days')
ylabel('period(days)')

wave1=wave;
wave(1:55,:)=0;
wave(70:end,:)=0;
maxmax
plot(time,dilat_number,'w','LineWidth',2)


subplot(2,1,1)
plot(time,ridge,'k','LineWidth',2)

A=corrcoef(y,ridge);
pourvar=round(A(1,2)^2*1000)/10


orient landscape