% % initialisation clear; close all; % etape 1 :on selectionne les mois d ete (attention aux annees bixestiles!) % on compile sous forme d'un seul fichier hgt925=zeros(122,49,144,28); siz=31+28+31+30+31+1; sizbis=31+28+31+30+31+30+31+31+30; ncload('hgt925.1979.nc'); hgt925(:,:,:,1)=hgt(siz:sizbis,1,:,:); clear hgt; ncload('hgt925.1980.nc'); hgt925(:,:,:,2)=hgt(siz+1:sizbis+1,1,:,:); clear hgt; ncload('hgt925.1981.nc'); hgt925(:,:,:,3)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1982.nc'); hgt925(:,:,:,4)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1983.nc'); hgt925(:,:,:,5)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1984.nc'); hgt925(:,:,:,6)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; ncload('hgt925.1985.nc'); hgt925(:,:,:,7)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1986.nc'); hgt925(:,:,:,8)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1987.nc'); hgt925(:,:,:,9)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1988.nc'); hgt925(:,:,:,10)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; ncload('hgt925.1989.nc'); hgt925(:,:,:,11)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1990.nc'); hgt925(:,:,:,12)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1991.nc'); hgt925(:,:,:,13)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1992.nc'); hgt925(:,:,:,14)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; ncload('hgt925.1993.nc'); hgt925(:,:,:,15)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1994.nc'); hgt925(:,:,:,16)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1995.nc'); hgt925(:,:,:,17)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1996.nc'); hgt925(:,:,:,18)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; ncload('hgt925.1997.nc'); hgt925(:,:,:,19)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1998.nc'); hgt925(:,:,:,20)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.1999.nc'); hgt925(:,:,:,21)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.2000.nc'); hgt925(:,:,:,22)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; ncload('hgt925.2001.nc'); hgt925(:,:,:,23)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.2002.nc'); hgt925(:,:,:,24)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.2003.nc'); hgt925(:,:,:,25)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.2004.nc'); hgt925(:,:,:,26)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; ncload('hgt925.2005.nc'); hgt925(:,:,:,27)=hgt(siz:sizbis,1,:,:);clear hgt; ncload('hgt925.2006.nc'); hgt925(:,:,:,28)=hgt(siz:sizbis,1,:,:);clear hgt; clear siz1 siz1bis; hgt=permute(hgt925,[1 4 2 3]); clear hgt925; %%%%%%%%%%%%%%% FICHIER OLR % ouverture / lecture du fichier load ind_olr_25_90_eof23.txt; ind_olr=reshape(ind_olr_25_90_eof23,122,28); k=122*28; % on calcule l ecart type sur la serie entiere de l OLR ind_olr1=reshape(ind_olr, k,1); ind_olr2=std(ind_olr1); clear ind_olr1; % GEOPOTENTIEL % intialisation des tableaux hgt925_filtre_compomax=NaN*ones(60,31,49,144); hgt925_filtre_compomin=NaN*ones(60,31,49,144); compteurmax=0; compteurmin=0; % boucle sur les annees for a=1:28; clear delta; delta=zeros(122,1); % boucle sur les jours : on prepare avant for b=1:122; if b>1; delta(b)=ind_olr(b,a)-ind_olr(b-1,a); end; end; % boucle sur les jours for b=1:122; % 1ere condition (laisser une marge de 10) if (b>20 && b<112); % cas 1 : max deltas apres negetifs et deltas avant postifs if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); compteurmax=compteurmax+1; hgt925_filtre_compomax(compteurmax,1,:,:)=hgt(b-20,a,:,:); hgt925_filtre_compomax(compteurmax,2,:,:)=hgt(b-19,a,:,:); hgt925_filtre_compomax(compteurmax,3,:,:)=hgt(b-18,a,:,:); hgt925_filtre_compomax(compteurmax,4,:,:)=hgt(b-17,a,:,:); hgt925_filtre_compomax(compteurmax,5,:,:)=hgt(b-16,a,:,:); hgt925_filtre_compomax(compteurmax,6,:,:)=hgt(b-15,a,:,:); hgt925_filtre_compomax(compteurmax,7,:,:)=hgt(b-14,a,:,:); hgt925_filtre_compomax(compteurmax,8,:,:)=hgt(b-13,a,:,:); hgt925_filtre_compomax(compteurmax,9,:,:)=hgt(b-12,a,:,:); hgt925_filtre_compomax(compteurmax,10,:,:)=hgt(b-11,a,:,:); hgt925_filtre_compomax(compteurmax,11,:,:)=hgt(b-10,a,:,:); hgt925_filtre_compomax(compteurmax,12,:,:)=hgt(b-9,a,:,:); hgt925_filtre_compomax(compteurmax,13,:,:)=hgt(b-8,a,:,:); hgt925_filtre_compomax(compteurmax,14,:,:)=hgt(b-7,a,:,:); hgt925_filtre_compomax(compteurmax,15,:,:)=hgt(b-6,a,:,:); hgt925_filtre_compomax(compteurmax,16,:,:)=hgt(b-5,a,:,:); hgt925_filtre_compomax(compteurmax,17,:,:)=hgt(b-4,a,:,:); hgt925_filtre_compomax(compteurmax,18,:,:)=hgt(b-3,a,:,:); hgt925_filtre_compomax(compteurmax,19,:,:)=hgt(b-2,a,:,:); hgt925_filtre_compomax(compteurmax,20,:,:)=hgt(b-1,a,:,:); hgt925_filtre_compomax(compteurmax,21,:,:)=hgt(b,a,:,:); hgt925_filtre_compomax(compteurmax,22,:,:)=hgt(b+1,a,:,:); hgt925_filtre_compomax(compteurmax,23,:,:)=hgt(b+2,a,:,:); hgt925_filtre_compomax(compteurmax,24,:,:)=hgt(b+3,a,:,:); hgt925_filtre_compomax(compteurmax,25,:,:)=hgt(b+4,a,:,:); hgt925_filtre_compomax(compteurmax,26,:,:)=hgt(b+5,a,:,:); hgt925_filtre_compomax(compteurmax,27,:,:)=hgt(b+6,a,:,:); hgt925_filtre_compomax(compteurmax,28,:,:)=hgt(b+7,a,:,:); hgt925_filtre_compomax(compteurmax,29,:,:)=hgt(b+8,a,:,:); hgt925_filtre_compomax(compteurmax,30,:,:)=hgt(b+9,a,:,:); hgt925_filtre_compomax(compteurmax,31,:,:)=hgt(b+10,a,:,:); % cas 2 : min deltas apres positifs et deltas avant negatifs elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); compteurmin=compteurmin+1; hgt925_filtre_compomin(compteurmin,1,:,:)=hgt(b-20,a,:,:); hgt925_filtre_compomin(compteurmin,2,:,:)=hgt(b-19,a,:,:); hgt925_filtre_compomin(compteurmin,3,:,:)=hgt(b-18,a,:,:); hgt925_filtre_compomin(compteurmin,4,:,:)=hgt(b-17,a,:,:); hgt925_filtre_compomin(compteurmin,5,:,:)=hgt(b-16,a,:,:); hgt925_filtre_compomin(compteurmin,6,:,:)=hgt(b-15,a,:,:); hgt925_filtre_compomin(compteurmin,7,:,:)=hgt(b-14,a,:,:); hgt925_filtre_compomin(compteurmin,8,:,:)=hgt(b-13,a,:,:); hgt925_filtre_compomin(compteurmin,9,:,:)=hgt(b-12,a,:,:); hgt925_filtre_compomin(compteurmin,10,:,:)=hgt(b-11,a,:,:); hgt925_filtre_compomin(compteurmin,11,:,:)=hgt(b-10,a,:,:); hgt925_filtre_compomin(compteurmin,12,:,:)=hgt(b-9,a,:,:); hgt925_filtre_compomin(compteurmin,13,:,:)=hgt(b-8,a,:,:); hgt925_filtre_compomin(compteurmin,14,:,:)=hgt(b-7,a,:,:); hgt925_filtre_compomin(compteurmin,15,:,:)=hgt(b-6,a,:,:); hgt925_filtre_compomin(compteurmin,16,:,:)=hgt(b-5,a,:,:); hgt925_filtre_compomin(compteurmin,17,:,:)=hgt(b-4,a,:,:); hgt925_filtre_compomin(compteurmin,18,:,:)=hgt(b-3,a,:,:); hgt925_filtre_compomin(compteurmin,19,:,:)=hgt(b-2,a,:,:); hgt925_filtre_compomin(compteurmin,20,:,:)=hgt(b-1,a,:,:); hgt925_filtre_compomin(compteurmin,21,:,:)=hgt(b,a,:,:); hgt925_filtre_compomin(compteurmin,22,:,:)=hgt(b+1,a,:,:); hgt925_filtre_compomin(compteurmin,23,:,:)=hgt(b+2,a,:,:); hgt925_filtre_compomin(compteurmin,24,:,:)=hgt(b+3,a,:,:); hgt925_filtre_compomin(compteurmin,25,:,:)=hgt(b+4,a,:,:); hgt925_filtre_compomin(compteurmin,26,:,:)=hgt(b+5,a,:,:); hgt925_filtre_compomin(compteurmin,27,:,:)=hgt(b+6,a,:,:); hgt925_filtre_compomin(compteurmin,28,:,:)=hgt(b+7,a,:,:); hgt925_filtre_compomin(compteurmin,29,:,:)=hgt(b+8,a,:,:); hgt925_filtre_compomin(compteurmin,30,:,:)=hgt(b+9,a,:,:); hgt925_filtre_compomin(compteurmin,31,:,:)=hgt(b+10,a,:,:); end; end; end; end; % on fait la somme des valeurs de hgt925_filtreentiel sur le nbre d occurences % on obtent un tableau de la forme (jours-avant-apres,lon,lat) hgt925_filtre_compomin1(:,:,:)=nanmean(hgt925_filtre_compomin); clear hgt925_filtre_compomin; hgt925_filtre_compomax1(:,:,:)=nanmean(hgt925_filtre_compomax); clear hgt925_filtre_compomax; x=[-10:1:10]'; figure(1); orient('landscape'); lat=lat'; pression=zeros(14,49,144); for e=1:7; a=7-(e-1)+1; f=2*(a-1)+1; clear delta_hgt925_filtre_min; delta_hgt925_filtre_min=zeros(49,144); for b=1:49; for c=1:144; delta_hgt925_filtre_min(b,c)=hgt925_filtre_compomin1(f,b,c)-hgt925_filtre_compomax1(f,b,c); end; end; for b=1:49; for c=1:144; if delta_hgt925_filtre_min(b,c)<-20; delta_hgt925_filtre_min(b,c)=-20; elseif delta_hgt925_filtre_min(b,c)>20; delta_hgt925_filtre_min(b,c)=20; end; end; end subplot(7,1,8-e); hold on; palette clear delta_hgt925; delta_hgt925_filtre_min(1,1)=-20.0001; delta_hgt925_filtre_min(1,2)=20.0001; delta_hgt925=zeros(49,144); delta_hgt925(:,1:72)=delta_hgt925_filtre_min(:,73:144); delta_hgt925(:,73:144)=delta_hgt925_filtre_min(:,1:72); pression(8-e,:,:)=delta_hgt925; aa=contourf(lon-180,lat,-delta_hgt925,[-20:2:20],'LineStyle','none'); if e==1; set (gca,'XTick',[-180:60:180],'XTickLabel',[' 180';'120W';' 60W';' 0';' 60E';'120E';' 180'],'fontname','Arial','fontsize',6); else set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); end; set (gca,'YTick',[-10:10:40],'YTickLabel',[' ';' 0';'10N';'20N';'30N';' '],'fontname','Arial','fontsize',6); if e==4; co=colorbar; set (co,'xtick',[-20:10:20],'xticklabel',[-20:10:20],'fontname','Arial','fontsize',6); end; hold on; cartemonde1; set (gca,'tickDir','out'); axis equal; axis([-180 180 -10 40]); if e==7; title('EOF1 filtre Rossby','fontsize',8); end; text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); pos_vert=e/10; set (gca,'position',[0.2 pos_vert 0.5 0.1]); end; print -depsc2 compo_hgt925_eof2590_part1.eps; figure(2); orient('landscape'); lat=lat'; for e=1:7; a=7-(e-1)+1+7; f=2*(a-1)+1; clear delta_hgt925_filtre_min; delta_hgt925_filtre_min=zeros(49,144); for b=1:49; for c=1:144; delta_hgt925_filtre_min(b,c)=hgt925_filtre_compomin1(f,b,c)-hgt925_filtre_compomax1(f,b,c); end; end; for b=1:49; for c=1:144; if delta_hgt925_filtre_min(b,c)<-20; delta_hgt925_filtre_min(b,c)=-20; elseif delta_hgt925_filtre_min(b,c)>20; delta_hgt925_filtre_min(b,c)=20; end; end; end subplot(7,1,8-e); hold on; palette clear delta_hgt925; delta_hgt925_filtre_min(1,1)=-20.0001; delta_hgt925_filtre_min(1,2)=20.0001; delta_hgt925=zeros(49,144); delta_hgt925(:,1:72)=delta_hgt925_filtre_min(:,73:144); delta_hgt925(:,73:144)=delta_hgt925_filtre_min(:,1:72); pression(8-e+7,:,:)=delta_hgt925; aa=contourf(lon-180,lat,-delta_hgt925,[-20:2:20],'LineStyle','none'); if e==1; set (gca,'XTick',[-180:60:180],'XTickLabel',[' 180';'120W';' 60W';' 0';' 60E';'120E';' 180'],'fontname','Arial','fontsize',6); else set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); end; set (gca,'YTick',[-10:10:40],'YTickLabel',[' ';' 0';'10N';'20N';'30N';' '],'fontname','Arial','fontsize',6); if e==4; co=colorbar; set (co,'xtick',[-20:10:20],'xticklabel',[-20:10:20],'fontname','Arial','fontsize',6); end; hold on; cartemonde1; set (gca,'tickDir','out'); axis equal; axis([-180 180 -10 40]); if e==7; title('EOF1 filtre Rossby','fontsize',8); end; text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); pos_vert=e/10; set (gca,'position',[0.2 pos_vert 0.5 0.1]); end; print -depsc2 compo_hgt925_eof2590_part2.eps; save pression.mat pression;