Changeset 16 for trunk/src/mode_sahelien/composite_wind925_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_wind925_EOF12_ER1030.m
r15 r16 1 % 2 1 3 % initialisation 2 4 close all; … … 8 10 uwnd925=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('uwnd925.1979.nc'); uwnd925(:,:,:,1)=uwnd(siz:sizbis,1,:,:); clear uwnd; 12 15 ncload('uwnd925.1980.nc'); uwnd925(:,:,:,2)=uwnd(siz+1:sizbis+1,1,:,:); clear uwnd; … … 46 49 47 50 %%%%%%%%%%%%%%% FICHIER OLR 48 % ouverture / lecture du fichier 49 load eof12_rossby_1030.txt; ind_olr=reshape(eof12_rossby_1030,122,28); 51 % ouverture / lecture du fichier 52 load eof12_rossby_1030.txt; 53 ind_olr=reshape(eof12_rossby_1030,122,28); 50 54 clear eof12_rossby_1030; 51 55 … … 54 58 % on calcule l ecart type sur la serie entiere de l OLR 55 59 ind_olr1=reshape(ind_olr, k,1); 56 ind_olr2=std(ind_olr1); clear ind_olr1; 60 ind_olr2=std(ind_olr1); 61 clear ind_olr1; 57 62 58 63 59 64 % intialisation des tableaux 60 uwnd925_filtre_compomax=NaN*ones(60,31,49,144); 65 uwnd925_filtre_compomax=NaN*ones(60,31,49,144); 61 66 uwnd925_filtre_compomin=NaN*ones(60,31,49,144); 62 67 63 compteurmax=0; 68 compteurmax=0; 64 69 compteurmin=0; 65 70 66 for a=1:28; % boucle sur les annees 67 clear delta; 71 % boucle sur les annees 72 for a=1:28; 73 clear delta; 68 74 delta=zeros(122,1); 69 for b=1:122; % boucle sur les jours : on prepare avant 75 % boucle sur les jours : on prepare avant 76 for b=1:122; 70 77 if b>1; 71 78 delta(b)=ind_olr(b,a)-ind_olr(b-1,a); 72 79 end; 73 80 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); 81 % boucle sur les jours 82 for b=1:122; 83 % 1ere condition (laisser une marge de 10) 84 if (b>20 && b<112); 85 % cas 1 : max deltas apres negetifs et deltas avant postifs 86 if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); 78 87 compteurmax=compteurmax+1; 79 88 uwnd925_filtre_compomax(compteurmax,1,:,:)=uwnd(b-20,a,:,:); … … 110 119 uwnd925_filtre_compomax(compteurmax,30,:,:)=uwnd(b+9,a,:,:); 111 120 uwnd925_filtre_compomax(compteurmax,31,:,:)=uwnd(b+10,a,:,:); 112 % cas 2 : min deltas apres positifs et deltas avant negatifs 121 % cas 2 : min deltas apres positifs et deltas avant negatifs 113 122 elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); 114 123 compteurmin=compteurmin+1; … … 149 158 end; 150 159 end; 151 end; 160 end; 152 161 end; 153 162 … … 155 164 % on fait la somme des valeurs de uwnd925_filtreentiel sur le nbre d occurences 156 165 % on obtent un tableau de la forme (jours-avant-apres,lon,lat) 157 uwnd925_filtre_compomin1(:,:,:)=nanmean(uwnd925_filtre_compomin); clear uwnd925_filtre_compomin; 158 uwnd925_filtre_compomax1(:,:,:)=nanmean(uwnd925_filtre_compomax); clear uwnd925_filtre_compomax; 159 160 161 162 163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 166 uwnd925_filtre_compomin1(:,:,:)=nanmean(uwnd925_filtre_compomin); 167 clear uwnd925_filtre_compomin; 168 uwnd925_filtre_compomax1(:,:,:)=nanmean(uwnd925_filtre_compomax); 169 clear uwnd925_filtre_compomax; 164 170 165 171 % etape 1 :on selectionne les mois d ete (attention aux annees bixestiles!) … … 168 174 vwnd925=zeros(122,49,144,28); 169 175 170 siz=31+28+31+30+31+1; sizbis=31+28+31+30+31+30+31+31+30; 176 siz=31+28+31+30+31+1; 177 sizbis=31+28+31+30+31+30+31+31+30; 171 178 ncload('vwnd925.1979.nc'); vwnd925(:,:,:,1)=vwnd(siz:sizbis,1,:,:); clear vwnd; 172 179 ncload('vwnd925.1980.nc'); vwnd925(:,:,:,2)=vwnd(siz+1:sizbis+1,1,:,:); clear vwnd; … … 204 211 205 212 %%%%%%%%%%%%%% FICHIER OLR 206 % ouverture / lecture du fichier 207 load eof12_rossby_1030.txt; ind_olr=reshape(eof12_rossby_1030,122,28); 213 % ouverture / lecture du fichier 214 load eof12_rossby_1030.txt; 215 ind_olr=reshape(eof12_rossby_1030,122,28); 208 216 clear eof12_rossby_1030 209 217 k=122*28; … … 211 219 % on calcule l ecart type sur la serie entiere de l OLR 212 220 ind_olr1=reshape(ind_olr, k,1); 213 ind_olr2=std(ind_olr1); clear ind_olr1; 221 ind_olr2=std(ind_olr1); 222 clear ind_olr1; 214 223 215 224 216 225 % intialisation des tableaux 217 vwnd925_filtre_compomax=NaN*ones(60,31,49,144); 226 vwnd925_filtre_compomax=NaN*ones(60,31,49,144); 218 227 vwnd925_filtre_compomin=NaN*ones(60,31,49,144); 219 228 220 compteurmax=0; 229 compteurmax=0; 221 230 compteurmin=0; 222 231 223 for a=1:28; % boucle sur les annees 224 clear delta; 232 % boucle sur les annees 233 for a=1:28; 234 clear delta; 225 235 delta=zeros(122,1); 226 for b=1:122; % boucle sur les jours : on prepare avant 236 % boucle sur les jours : on prepare avant 237 for b=1:122; 227 238 if b>1; 228 239 delta(b)=ind_olr(b,a)-ind_olr(b-1,a); 229 240 end; 230 241 end; 231 for b=1:122; % boucle sur les jours 232 if (b>20 && b<112); % 1ere condition (laisser une marge de 10) 233 % cas 1 : max deltas apres negetifs et deltas avant postifs 234 if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); 242 % boucle sur les jours 243 for b=1:122; 244 % 1ere condition (laisser une marge de 10) 245 if (b>20 && b<112); 246 % cas 1 : max deltas apres negetifs et deltas avant postifs 247 if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); 235 248 compteurmax=compteurmax+1; 236 249 vwnd925_filtre_compomax(compteurmax,1,:,:)=vwnd(b-20,a,:,:); … … 267 280 vwnd925_filtre_compomax(compteurmax,30,:,:)=vwnd(b+9,a,:,:); 268 281 vwnd925_filtre_compomax(compteurmax,31,:,:)=vwnd(b+10,a,:,:); 269 % cas 2 : min deltas apres positifs et deltas avant negatifs 282 % cas 2 : min deltas apres positifs et deltas avant negatifs 270 283 elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); 271 284 compteurmin=compteurmin+1; … … 306 319 end; 307 320 end; 308 end; 321 end; 309 322 end; 310 323 … … 312 325 % on fait la somme des valeurs de vwnd925_filtreentiel sur le nbre d occurences 313 326 % on obtent un tableau de la forme (jours-avant-apres,lon,lat) 314 vwnd925_filtre_compomin1(:,:,:)=nanmean(vwnd925_filtre_compomin); clear vwnd925_filtre_compomin;315 vwnd925_filtre_compomax1(:,:,:)=nanmean(vwnd925_filtre_compomax); clear vwnd925_filtre_compomax;316 317 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 327 vwnd925_filtre_compomin1(:,:,:)=nanmean(vwnd925_filtre_compomin); 328 clear vwnd925_filtre_compomin; 329 vwnd925_filtre_compomax1(:,:,:)=nanmean(vwnd925_filtre_compomax); 330 clear vwnd925_filtre_compomax; 318 331 319 332 figure(1); … … 332 345 delta_uwnd925_filtre_min(b,c)=uwnd925_filtre_compomin1(f,b,c)-uwnd925_filtre_compomax1(f,b,c); 333 346 delta_vwnd925_filtre_min(b,c)=vwnd925_filtre_compomin1(f,b,c)-vwnd925_filtre_compomax1(f,b,c); 334 347 335 348 end; 336 349 end; … … 343 356 delta_vwnd925_filtre(:,1:72)=delta_vwnd925_filtre_min(:,73:144); 344 357 delta_vwnd925_filtre(:,73:144)=delta_vwnd925_filtre_min(:,1:72); 345 xi=[-180:3.75:176.25]; xi=xi'; yi=[-87.1591:3.708895:87.1591]; 358 xi=[-180:3.75:176.25]; 359 xi=xi'; 360 yi=[-87.1591:3.708895:87.1591]; 346 361 clear carteu cartev; 347 carteu=interp2(lon-180,lat,delta_uwnd925_filtre,xi,yi); 362 carteu=interp2(lon-180,lat,delta_uwnd925_filtre,xi,yi); 348 363 cartev=interp2(lon-180,lat,delta_vwnd925_filtre,xi,yi); 349 364 aa=quiver(xi,yi,carteu,cartev,'k'); … … 352 367 else 353 368 set (gca,'XTick',[-60:20:120],'XTickLabel',[' ';' ';' ';' ';' ';' ';' ';' ';' ';' '],'fontsize',6); 354 end 369 end 355 370 set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';' 0 ';'10N';'20N';'30N'],'fontname','Arial','fontsize',6); 356 371 cartemonde1; … … 364 379 text(-150,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 365 380 pos_vert=e/6.1; 366 % set (gca,'position',[0.2 pos_vert 0.3 1/6.1]) 367 set (gca,'position',[0.2 pos_vert 0.4 1/6.1]) 381 % set (gca,'position',[0.2 pos_vert 0.3 1/6.1]) 382 set (gca,'position',[0.2 pos_vert 0.4 1/6.1]) 368 383 end; 369 384 370 385 371 print -depsc2 composite_wind925_EOF12_ER1030_part1.eps; 372 373 374 375 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 386 print -depsc2 composite_wind925_EOF12_ER1030_part1.eps; 376 387 377 388 figure(2); … … 390 401 delta_uwnd925_filtre_min(b,c)=uwnd925_filtre_compomin1(f,b,c)-uwnd925_filtre_compomax1(f,b,c); 391 402 delta_vwnd925_filtre_min(b,c)=vwnd925_filtre_compomin1(f,b,c)-vwnd925_filtre_compomax1(f,b,c); 392 403 393 404 end; 394 405 end; … … 401 412 delta_vwnd925_filtre(:,1:72)=delta_vwnd925_filtre_min(:,73:144); 402 413 delta_vwnd925_filtre(:,73:144)=delta_vwnd925_filtre_min(:,1:72); 403 xi=[-180:3.75:176.25]; xi=xi'; yi=[-87.1591:3.708895:87.1591]; 414 xi=[-180:3.75:176.25]; 415 xi=xi'; 416 yi=[-87.1591:3.708895:87.1591]; 404 417 clear carteu cartev; 405 carteu=interp2(lon-180,lat,delta_uwnd925_filtre,xi,yi); 418 carteu=interp2(lon-180,lat,delta_uwnd925_filtre,xi,yi); 406 419 cartev=interp2(lon-180,lat,delta_vwnd925_filtre,xi,yi); 407 420 aa=quiver(xi,yi,carteu,cartev,'k'); … … 410 423 else 411 424 set (gca,'XTick',[-60:20:120],'XTickLabel',[' ';' ';' ';' ';' ';' ';' ';' ';' ';' '],'fontsize',6); 412 end 425 end 413 426 set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';' 0 ';'10N';'20N';'30N'],'fontname','Arial','fontsize',6); 414 427 cartemonde1; … … 422 435 text(-150,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 423 436 pos_vert=e/6.1; 424 set (gca,'position',[0.2 pos_vert 0.4 1/6.1]) 437 set (gca,'position',[0.2 pos_vert 0.4 1/6.1]) 425 438 end; 426 439 427 440 428 print -depsc2 composite_wind925_EOF12_ER1030_part2.eps; 429 430 431 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 441 print -depsc2 composite_wind925_EOF12_ER1030_part2.eps; 432 442 433 443 figure(3); … … 446 456 delta_uwnd925_filtre_min(b,c)=uwnd925_filtre_compomin1(f,b,c)-uwnd925_filtre_compomax1(f,b,c); 447 457 delta_vwnd925_filtre_min(b,c)=vwnd925_filtre_compomin1(f,b,c)-vwnd925_filtre_compomax1(f,b,c); 448 458 449 459 end; 450 460 end; … … 457 467 delta_vwnd925_filtre(:,1:72)=delta_vwnd925_filtre_min(:,73:144); 458 468 delta_vwnd925_filtre(:,73:144)=delta_vwnd925_filtre_min(:,1:72); 459 xi=[-180:3.75:176.25]; xi=xi'; yi=[-87.1591:3.708895:87.1591]; 469 xi=[-180:3.75:176.25]; 470 xi=xi'; 471 yi=[-87.1591:3.708895:87.1591]; 460 472 clear carteu cartev; 461 carteu=interp2(lon-180,lat,delta_uwnd925_filtre,xi,yi); 473 carteu=interp2(lon-180,lat,delta_uwnd925_filtre,xi,yi); 462 474 cartev=interp2(lon-180,lat,delta_vwnd925_filtre,xi,yi); 463 475 aa=quiver(xi,yi,carteu,cartev,'k'); … … 466 478 else 467 479 set (gca,'XTick',[-60:20:120],'XTickLabel',[' ';' ';' ';' ';' ';' ';' ';' ';' ';' '],'fontsize',6); 468 end 480 end 469 481 set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';' 0 ';'10N';'20N';'30N'],'fontname','Arial','fontsize',6); 470 482 cartemonde1; … … 478 490 text(-150,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 479 491 pos_vert=e/6.1; 480 set (gca,'position',[0.2 pos_vert 0.4 1/6.1]) 492 set (gca,'position',[0.2 pos_vert 0.4 1/6.1]) 481 493 end; 482 494 483 484 print -depsc2 composite_wind925_EOF12_ER1030_part3.eps; 485 486 487 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 495 print -depsc2 composite_wind925_EOF12_ER1030_part3.eps; 488 496 489 497 figure(4); … … 502 510 delta_uwnd925_filtre_min(b,c)=uwnd925_filtre_compomin1(f,b,c)-uwnd925_filtre_compomax1(f,b,c); 503 511 delta_vwnd925_filtre_min(b,c)=vwnd925_filtre_compomin1(f,b,c)-vwnd925_filtre_compomax1(f,b,c); 504 512 505 513 end; 506 514 end; … … 513 521 delta_vwnd925_filtre(:,1:72)=delta_vwnd925_filtre_min(:,73:144); 514 522 delta_vwnd925_filtre(:,73:144)=delta_vwnd925_filtre_min(:,1:72); 515 xi=[-180:3.75:176.25]; xi=xi'; yi=[-87.1591:3.708895:87.1591]; 523 xi=[-180:3.75:176.25]; 524 xi=xi'; 525 yi=[-87.1591:3.708895:87.1591]; 516 526 clear carteu cartev; 517 carteu=interp2(lon-180,lat,delta_uwnd925_filtre,xi,yi); 527 carteu=interp2(lon-180,lat,delta_uwnd925_filtre,xi,yi); 518 528 cartev=interp2(lon-180,lat,delta_vwnd925_filtre,xi,yi); 519 529 aa=quiver(xi,yi,carteu,cartev,'k'); … … 522 532 else 523 533 set (gca,'XTick',[-60:20:120],'XTickLabel',[' ';' ';' ';' ';' ';' ';' ';' ';' ';' '],'fontsize',6); 524 end 534 end 525 535 set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';' 0 ';'10N';'20N';'30N'],'fontname','Arial','fontsize',6); 526 536 cartemonde1; … … 534 544 text(-150,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 535 545 pos_vert=e/6.1; 536 set (gca,'position',[0.2 pos_vert 0.4 1/6.1]) 546 set (gca,'position',[0.2 pos_vert 0.4 1/6.1]) 537 547 end; 538 548 539 print -depsc2 composite_wind925_EOF12_ER1030_part4.eps; 540 541 542 549 print -depsc2 composite_wind925_EOF12_ER1030_part4.eps;
Note: See TracChangeset
for help on using the changeset viewer.