%

clear;

load eof_1030_jjas.mat
olr=olr';
PC1=olr*C;

%%%%%%% cronique de la VP1
time_serie_olr1=PC1(:,425);
time_serie_olr2=PC1(:,424);
time_serie_olr3=PC1(:,423);

dt_olr1=std(time_serie_olr1);
dt_olr2=std(time_serie_olr2);
dt_olr3=std(time_serie_olr3);

for a=1:3416;
   time_serie_olr1(a)=time_serie_olr1(a)/dt_olr1;
   time_serie_olr2(a)=time_serie_olr2(a)/dt_olr2;
   time_serie_olr3(a)=time_serie_olr3(a)/dt_olr3;
end

save eof1_1030.txt time_serie_olr1 -ascii;
save eof2_1030.txt time_serie_olr2 -ascii;
save eof3_1030.txt time_serie_olr3 -ascii;

x=[1:3416]';
for a=1:22;
   if a<12;
      figure(1);
      subplot(4,3,a);
   elseif a<23;
      figure(2);
      subplot(4,3,a-11);
   else
      figure(3);
      subplot(4,3,a-22);
   end
   clear koro1
   debut=(a-1)*122+1;
   fin=a*122;
   koro1=time_serie_olr1(debut:fin);

   clear x;
   x=[1:122]';
   plot(x,koro1,'r');
   hold on
   y=zeros(122,1);
   plot(x,y,'k:');
   title(a+1978,'FontSize',8)
   if a==2;
       text(0,5.5,'serie temporelle VP1');
    elseif a==13;
       text(0,5.5,'serie temporelle VP1');
   elseif a==24;
       text(0,5.5,'serie temporelle VP1');
   end
   set (gca,'tickDir','out');
   axis([1 122 -3 3]);

set (gca,'YTick',[-3:1:3],'YTickLabel',[-3:1:3],'fontname','Arial','fontsize',6);
set (gca,'XTick',[0:20:120],'XTickLabel',[0:20:120],'fontname','Arial','fontsize',6);
end;
