%
clear;
close all;
status=load('eof_rossby_jjas_2006_30100.mat');
carte1=C(:,425);

carte=reshape(carte1,25,17);
carte=carte';

clear carte1;
% defintion des lat et lon
lon=[-30:2.5:30]';
lat=[-10:2.5:30];
sauvegrads('eof1_spatial_ER30100',carte,[-30 2.5 -10 2.5]);

orient('landscape');
subplot(4,2,1);
for a=1:17;
for b=1:25;
if carte(a,b)>0.2;
carte(a,b)=0.2;
elseif carte(a,b)<-0.2;
carte(a,b)=-0.2;
end;
end;
end;
carte(1,1)=-0.2001;
carte(1,2)=0.2001;

contour(lon,lat,-carte,[0.02:0.02:0.2],'k');
hold on;

[cs,h]=contour(lon,lat,-carte,[0.04:0.04:0.2],'k');
clabel(cs,h,'color','k','rotation',0,'fontsize',5);

contour(lon,lat,-carte,[-0.2:0.02:-0.02],'k:');

[cs,h]=contour(lon,lat,-carte,[-0.2:0.04:-0.04],'k:');
clabel(cs,h,'color','k','rotation',0,'fontsize',5);

axis equal;
axis([-30 30 -10 30]);
title('EOF1 OLR filtre ER 30-100j','Fontsize',8);
hold on;
cartemonde1;
set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';'  0';'10N';'20N';'30N'],'fontname','Arial','fontsize',6);
set (gca,'XTick',[-30:10:30],'XTickLabel',['30W';'20W';'10W';'  0';'10E';'20E';'30E'],'fontname','Arial','fontsize',6);
set (gca,'tickDir','out');

clear carte1 x y a b carte coco;
carte1=C(:,424);
carte=reshape(carte1,25,17);
carte=carte';

clear carte1;
lon=[-30:2.5:30]';
lat=[-10:2.5:30];

sauvegrads('eof2_spatial_ER30100',carte,[-30 2.5 -10 2.5]);

subplot(4,2,3);
palette;
for a=1:17;
for b=1:25;
if carte(a,b)>0.2;
carte(a,b)=0.2;
elseif carte(a,b)<-0.2;
carte(a,b)=-0.2;
end;
end;
end;
carte(1,1)=-0.2001;
carte(1,2)=0.2001;

contour(lon,lat,-carte,[0.02:0.02:0.2],'k');
hold on;

[cs,h]=contour(lon,lat,-carte,[0.04:0.04:0.2],'k');
clabel(cs,h,'color','k','rotation',0,'fontsize',5);

contour(lon,lat,-carte,[-0.2:0.02:-0.02],'k:');

[cs,h]=contour(lon,lat,-carte,[-0.2:0.04:-0.04],'k:');
clabel(cs,h,'color','k','rotation',0,'fontsize',5);
axis equal;
axis([-30 30 -10 30]);
title('EOF2 OLR filtre ER 30-100j','Fontsize',8);
hold on;
cartemonde1;
set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';'  0';'10N';'20N';'30N'],'fontname','Arial','fontsize',6);
set (gca,'XTick',[-30:10:30],'XTickLabel',['30W';'20W';'10W';'  0';'10E';'20E';'30E'],'fontname','Arial','fontsize',6);
set (gca,'tickDir','out');

vaude=0;
for a=1:425;
vaude=vaude+L(a,a);
end
vecteurs=zeros(20,1);
for a=1:20;
b=425-(a-1);
vecteurs(a)=100*(L(b,b)/vaude);
end;
x=[1:20]';
status=save('variance_expliquee_filtre_ER_30100j.txt','vecteurs','-ASCII');
delete('variance_expliquee_filtre_ER_30100j.txt');

subplot(4,2,5);
composite_pluie_ird_rossby30100b;
composite_olr_ER30100_filtre;
set (gca,'position',[0.13 0.31 0.385 0.15]) ;

subplot(4,2,7);
%set (gca,'position',[0.13 0.06 0.335 0.15]);
time_serie_ER_rossby_30100
set (gca,'position',[0.13 0.05 0.335 0.15]) ;
status=print('-depsc2','figure_article_serge_30100_bis.eps');
