Changeset 16 for trunk/src/mode_sahelien/composite_hgt925_EOF12_ER1030.m
- Timestamp:
- 01/06/09 10:53:18 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mode_sahelien/composite_hgt925_EOF12_ER1030.m
r15 r16 1 % 2 1 3 % initialisation 2 clear; close all;3 4 clear; 5 close all; 4 6 5 7 % etape 1 :on selectionne les mois d ete (attention aux annees bixestiles!) … … 8 10 hgt925=zeros(122,49,144,28); 9 11 10 siz=31+28+31+30+31+1; sizbis=31+28+31+30+31+30+31+31+30; 12 siz=31+28+31+30+31+1; 13 sizbis=31+28+31+30+31+30+31+31+30; 11 14 ncload('hgt925.1979.nc'); hgt925(:,:,:,1)=hgt(siz:sizbis,1,:,:); clear hgt; 12 15 ncload('hgt925.1980.nc'); hgt925(:,:,:,2)=hgt(siz+1:sizbis+1,1,:,:); clear hgt; … … 38 41 ncload('hgt925.2006.nc'); hgt925(:,:,:,28)=hgt(siz:sizbis,1,:,:);clear hgt; 39 42 40 41 43 clear siz1 siz1bis; 42 44 … … 46 48 47 49 %%%%%%%%%%%%%%% FICHIER OLR 48 % ouverture / lecture du fichier 50 % ouverture / lecture du fichier 49 51 load eof12_rossby_1030.txt 50 52 ind_olr=reshape(eof12_rossby_1030,122,28); … … 53 55 % on calcule l ecart type sur la serie entiere de l OLR 54 56 ind_olr1=reshape(ind_olr, k,1); 55 ind_olr2=std(ind_olr1); clear ind_olr1;56 57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 57 ind_olr2=std(ind_olr1); 58 clear ind_olr1; 59 58 60 % GEOPOTENTIEL 59 61 % intialisation des tableaux 60 hgt925_filtre_compomax=NaN*ones(60,31,49,144); 62 hgt925_filtre_compomax=NaN*ones(60,31,49,144); 61 63 hgt925_filtre_compomin=NaN*ones(60,31,49,144); 62 64 63 compteurmax=0; 65 compteurmax=0; 64 66 compteurmin=0; 65 67 66 for a=1:28; % boucle sur les annees 67 clear delta; 68 % boucle sur les annees 69 for a=1:28; 70 clear delta; 68 71 delta=zeros(122,1); 69 for b=1:122; % boucle sur les jours : on prepare avant 72 % boucle sur les jours : on prepare avant 73 for b=1:122; 70 74 if b>1; 71 75 delta(b)=ind_olr(b,a)-ind_olr(b-1,a); 72 76 end; 73 77 end; 74 for b=1:122; % boucle sur les jours 75 if (b>20 && b<112); % 1ere condition (laisser une marge de 10) 76 % cas 1 : max deltas apres negetifs et deltas avant postifs 77 if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); 78 % boucle sur les jours 79 for b=1:122; 80 % 1ere condition (laisser une marge de 10) 81 if (b>20 && b<112); 82 % cas 1 : max deltas apres negetifs et deltas avant postifs 83 if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); 78 84 compteurmax=compteurmax+1; 79 85 hgt925_filtre_compomax(compteurmax,1,:,:)=hgt(b-20,a,:,:); … … 110 116 hgt925_filtre_compomax(compteurmax,30,:,:)=hgt(b+9,a,:,:); 111 117 hgt925_filtre_compomax(compteurmax,31,:,:)=hgt(b+10,a,:,:); 112 % cas 2 : min deltas apres positifs et deltas avant negatifs 118 % cas 2 : min deltas apres positifs et deltas avant negatifs 113 119 elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); 114 120 compteurmin=compteurmin+1; … … 149 155 end; 150 156 end; 151 end; 157 end; 152 158 end; 153 159 … … 155 161 % on fait la somme des valeurs de hgt925_filtreentiel sur le nbre d occurences 156 162 % on obtent un tableau de la forme (jours-avant-apres,lon,lat) 157 hgt925_filtre_compomin1(:,:,:)=nanmean(hgt925_filtre_compomin); clear hgt925_filtre_compomin; 158 hgt925_filtre_compomax1(:,:,:)=nanmean(hgt925_filtre_compomax); clear hgt925_filtre_compomax; 159 160 x=[-10:1:10]'; %' 161 162 figure(1); 163 hgt925_filtre_compomin1(:,:,:)=nanmean(hgt925_filtre_compomin); 164 clear hgt925_filtre_compomin; 165 hgt925_filtre_compomax1(:,:,:)=nanmean(hgt925_filtre_compomax); 166 clear hgt925_filtre_compomax; 167 168 x=[-10:1:10]'; 169 170 figure(1); 163 171 orient('landscape'); 164 172 lat=lat'; … … 217 225 else 218 226 set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 219 end; 227 end; 220 228 set (gca,'YTick',[-20:10:20],'YTickLabel',['20S';'10S';' 0 ';'10N';'20N';],'fontname','Arial','fontsize',6); 221 229 if e==4; 222 co=colorbar; 230 co=colorbar; 223 231 set (co,'ytick',[-20:5:20],'yticklabel',[-20:5:20],'fontname','Arial','fontsize',6); 224 232 end; 225 hold on; cartemonde1; 233 hold on; 234 cartemonde1; 226 235 set (gca,'tickDir','out'); 227 236 axis equal; … … 232 241 text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 233 242 pos_vert=e/10; 234 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 243 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 235 244 end; 236 245 237 246 print -depsc2 composite_hgt925_EOF12_ER1030_part1.eps; 238 247 239 figure(2); 248 figure(2); 240 249 orient('landscape'); 241 250 … … 285 294 sauvegrads('composite_hgt925_mode_rossby_1030_moins4',delta_hgt925,[-180 2.5 -10 2.5]); 286 295 end; 287 296 288 297 delta_hgt925=flipud(delta_hgt925); 289 298 … … 292 301 else 293 302 set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 294 end; 303 end; 295 304 set (gca,'YTick',[-20:10:20],'YTickLabel',['20S';'10S';' 0 ';'10N';'20N';],'fontname','Arial','fontsize',6); 296 305 if e==4; 297 co=colorbar; 306 co=colorbar; 298 307 set (co,'ytick',[-20:5:20],'yticklabel',[-20:5:20],'fontname','Arial','fontsize',6); 299 308 end; 300 hold on; cartemonde1; 309 hold on; 310 cartemonde1; 301 311 set (gca,'tickDir','out'); 302 312 axis equal; … … 307 317 text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 308 318 pos_vert=e/10; 309 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 319 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 310 320 end; 311 321
Note: See TracChangeset
for help on using the changeset viewer.