Changeset 16 for trunk/src/mode_sahelien/composite_olr_EOF12_ER30100.m
- Timestamp:
- 01/06/09 10:53:18 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mode_sahelien/composite_olr_EOF12_ER30100.m
r15 r16 1 % 2 1 3 % initialisation 2 clear; close all; 4 clear; 5 close all; 3 6 4 7 cd('..'); … … 25 28 olr1=zeros(siz,21,144); 26 29 olr1(:,:,1:72)=olr(:,:,73:144); 27 olr1(:,:,73:144)=olr(:,:,1:72); clear olr; 30 olr1(:,:,73:144)=olr(:,:,1:72); 31 clear olr; 28 32 29 33 % on permture le temps et l'espce … … 37 41 vecteur=zeros(siz,1); 38 42 for c=1:siz; 39 vecteur(c)=olr1(a,b,c); 43 vecteur(c)=olr1(a,b,c); 40 44 end 41 45 std_c=nanmean(vecteur); 42 46 for c=1:siz; 43 olr1(a,b,c)=olr1(a,b,c)-std_c; 44 end 47 olr1(a,b,c)=olr1(a,b,c)-std_c; 48 end 45 49 end 46 end; 47 48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 50 end; 51 49 52 % on met sous la forme longitude latitude jour 50 51 53 52 54 % on selectionne les mois d ete (attention aux annees bixestiles!) … … 83 85 siz28=siz27+365; siz28bis=siz28+a; % 2000 84 86 85 86 87 olr(:,:,:,1)=olr1(:,:,siz1:siz1bis); % 1979 87 88 olr(:,:,:,2)=olr1(:,:,siz2:siz2bis); % 1980 … … 145 146 olr1=permute(olr,[3 4 1 2]); 146 147 clear olr; 147 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 148 148 149 load eof12_rossby_30100.txt; 149 150 % on met sous la forme annee mois 150 olr_eof=reshape(eof12_rossby_30100,122,28); clear eof12_rossby_30100; 151 olr_eof=reshape(eof12_rossby_30100,122,28); 152 clear eof12_rossby_30100; 151 153 152 154 % on calcule l ecart type sur la serie temporelle de l OLR 153 k=122*28; 155 k=122*28; 154 156 olrbis=reshape(olr_eof,k,1); 155 olr_std=std(olrbis); 156 olr_moy=mean(olrbis); 157 olr_std=std(olrbis); 158 olr_moy=mean(olrbis); 157 159 158 160 for a=1:3416; … … 161 163 olr_eof=reshape(olrbis,122,28); 162 164 % intialisation des tableaux 163 olr_filtre_compomax=NaN*ones(50,31,21,144); 165 olr_filtre_compomax=NaN*ones(50,31,21,144); 164 166 olr_filtre_compomin=NaN*ones(50,31,21,144); 165 167 166 compteurmax=0; 168 compteurmax=0; 167 169 compteurmin=0; 168 170 169 for a=1:28; % boucle sur les annees 170 clear delta; 171 % boucle sur les annees 172 for a=1:28; 173 clear delta; 171 174 delta=zeros(122,1); 172 for b=1:122; % boucle sur les jours : on prepare avant 175 % boucle sur les jours : on prepare avant 176 for b=1:122; 173 177 if b>1; 174 178 delta(b)=olr_eof(b,a)-olr_eof(b-1,a); 175 179 end; 176 180 end; 177 for b=1:122; % boucle sur les jours 178 if (b>20 && b<112); % 1ere condition (laisser une marge de 10) 179 % cas 1 : max deltas apres negetifs et deltas avant postifs 180 if (delta(b+1)<0 && delta(b)>0 && olr_eof(b,a)>1); 181 % boucle sur les jours 182 for b=1:122; 183 % 1ere condition (laisser une marge de 10) 184 if (b>20 && b<112); 185 % cas 1 : max deltas apres negetifs et deltas avant postifs 186 if (delta(b+1)<0 && delta(b)>0 && olr_eof(b,a)>1); 181 187 compteurmax=compteurmax+1; 182 188 olr_filtre_compomax(compteurmax,1,:,:)=olr1(b-20,a,:,:); … … 213 219 olr_filtre_compomax(compteurmax,30,:,:)=olr1(b+9,a,:,:); 214 220 olr_filtre_compomax(compteurmax,31,:,:)=olr1(b+10,a,:,:); 215 % cas 2 : min deltas apres positifs et deltas avant negatifs 221 % cas 2 : min deltas apres positifs et deltas avant negatifs 216 222 elseif (delta(b+1)>0 && delta(b)<0 && olr_eof(b,a)<-1); 217 223 compteurmin=compteurmin+1; … … 252 258 end; 253 259 end; 254 end; 260 end; 255 261 end; 256 262 … … 274 280 % on fait la somme des valeurs de olr_filtreentiel sur le nbre d occurences 275 281 % on obtent un tableau de la forme (jours-avant-apres,lon,lat) 276 olr_filtre_compomin1(:,:,:)=nanmean(olr_filtre_compomin); clear olr_filtre_compomin; 277 olr_filtre_compomax1(:,:,:)=nanmean(olr_filtre_compomax); clear olr_filtre_compomax; 278 279 x=[-10:1:10]'; %' 280 281 figure(1); orient('landscape'); 282 283 lat=lat(21:41)'; 282 olr_filtre_compomin1(:,:,:)=nanmean(olr_filtre_compomin); 283 clear olr_filtre_compomin; 284 olr_filtre_compomax1(:,:,:)=nanmean(olr_filtre_compomax); 285 clear olr_filtre_compomax; 286 287 x=[-10:1:10]'; 288 289 figure(1); 290 orient('landscape'); 291 292 lat=lat(21:41)'; 284 293 lon=lon-180; 285 294 for e=1:7; … … 312 321 delta_olr_filtre_min(1,2)=50.0001; 313 322 fin=-30+24*2.5; 314 323 315 324 clear fin 316 325 fin=-10+16*2.5; … … 338 347 else 339 348 set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 340 end 349 end 341 350 set (gca,'YTick',[-10:10:40],'YTickLabel',[' ';' 0';'10N';'20N';'30N';' '],'fontname','Arial','fontsize',6); 342 351 if e==4; 343 co=colorbar; 352 co=colorbar; 344 353 set (co,'xtick',[-20:10:20],'xticklabel',[-20:10:20],'fontname','Arial','fontsize',6); 345 354 end; 346 hold on; cartemonde1; 355 hold on; 356 cartemonde1; 347 357 set (gca,'tickDir','out'); 348 358 axis equal 349 359 axis([-180 180 -10 40]); 350 if e==7; 360 if e==7; 351 361 title('OLR composite EOF12 ER 30100j ITCZ 7.5-12.5 ','fontsize',8) ; 352 362 end 353 363 text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 354 364 pos_vert=e/10; 355 set (gca,'position',[0.2 pos_vert 0.5 0.1]) 365 set (gca,'position',[0.2 pos_vert 0.5 0.1]) 356 366 end; 357 367 358 figure(1); print -depsc2 composite_olr_EOF12_ER30100_part1.eps; 359 360 361 figure(2); orient('landscape'); 368 figure(1); 369 print -depsc2 composite_olr_EOF12_ER30100_part1.eps; 370 371 372 figure(2); 373 orient('landscape'); 362 374 363 375 for e=1:7; … … 390 402 delta_olr_filtre_min(1,2)=50.0001; 391 403 fin=-30+24*2.5; 392 404 393 405 clear fin 394 406 fin=-10+16*2.5; … … 416 428 else 417 429 set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 418 end 430 end 419 431 set (gca,'YTick',[-10:10:40],'YTickLabel',[' ';' 0';'10N';'20N';'30N';' '],'fontname','Arial','fontsize',6); 420 432 if e==4; 421 co=colorbar; 433 co=colorbar; 422 434 set (co,'xtick',[-20:10:20],'xticklabel',[-20:10:20],'fontname','Arial','fontsize',6); 423 435 end; 424 hold on; cartemonde1; 436 hold on; 437 cartemonde1; 425 438 set (gca,'tickDir','out'); 426 439 axis equal … … 431 444 text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 432 445 pos_vert=e/10; 433 set (gca,'position',[0.2 pos_vert 0.5 0.1]) 446 set (gca,'position',[0.2 pos_vert 0.5 0.1]) 434 447 end; 435 448 436 figure(2); print -depsc2 composite_olr_EOF12_ER30100_part2.eps; 437 438 449 figure(2); 450 print -depsc2 composite_olr_EOF12_ER30100_part2.eps;
Note: See TracChangeset
for help on using the changeset viewer.