Changeset 16 for trunk/src/mode_sahelien/composite_hgt500_eof234_1025_3j.m
- Timestamp:
- 01/06/09 10:53:18 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mode_sahelien/composite_hgt500_eof234_1025_3j.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 hgt500=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('hgt500.1979.nc'); hgt500(:,:,:,1)=hgt(siz:sizbis,1,:,:); clear hgt; 12 15 ncload('hgt500.1980.nc'); hgt500(:,:,:,2)=hgt(siz+1:sizbis+1,1,:,:); clear hgt; … … 54 57 end 55 58 end 56 59 57 60 58 61 hgt1=zeros(122,28,49,144); 59 62 hgt1(:,:,:,1:72)=hgt500(:,:,:,73:144); 60 63 hgt1(:,:,:,73:144)=hgt500(:,:,:,1:72); 61 clear hgt500; hgt500=hgt1; clear hgt1; 64 clear hgt500; 65 hgt500=hgt1; 66 clear hgt1; 62 67 63 68 hgt1=permute(hgt500,[2 1 3 4]); 64 hgt2(:,:,:)=nanmean(hgt1); clear hgt1; 69 hgt2(:,:,:)=nanmean(hgt1); 70 clear hgt1; 65 71 hgt3=reshape(hgt500, 3416,49,144); 66 hgt4(:,:)=nanmean(hgt3); clear hgt3; 72 hgt4(:,:)=nanmean(hgt3); 73 clear hgt3; 67 74 68 75 for a=1:122; 69 76 for b=1:28; 70 77 for c=1:37; 71 for d=1:144; 72 hgt500(a,b,c,d)=hgt500(a,b,c,d)-(hgt2(a,c,d)-hgt4(c,d)); 78 for d=1:144; 79 hgt500(a,b,c,d)=hgt500(a,b,c,d)-(hgt2(a,c,d)-hgt4(c,d)); 73 80 end; 74 81 end; … … 84 91 85 92 % on met sous la forme annee mois 86 ind_olr=reshape(v,122,29); clear v; 93 ind_olr=reshape(v,122,29); 94 clear v; 87 95 88 96 % on selectionne les annees de 1979 a 2006 89 ind_olr=ind_olr(:,1:28); 90 k=122*28; 97 ind_olr=ind_olr(:,1:28); 98 k=122*28; 91 99 92 100 % on centre et on reduit la serie de l OLR 93 101 ind_olr=reshape(ind_olr, k,1); 94 olr_std=std(ind_olr); 95 olr_moy=mean(ind_olr); 102 olr_std=std(ind_olr); 103 olr_moy=mean(ind_olr); 96 104 97 105 for a=1:3416; … … 100 108 ind_olr=reshape(ind_olr,122,28); 101 109 102 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%103 110 % GEOPOTENTIEL 104 111 % intialisation des tableaux 105 hgt500_filtre_compomax=NaN*ones(3,80,31,49,144); 112 hgt500_filtre_compomax=NaN*ones(3,80,31,49,144); 106 113 hgt500_filtre_compomin=NaN*ones(3,80,31,49,144); 107 114 tablecompteurmax=zeros(80,4); 108 115 tablecompteurmin=zeros(80,4); 109 compteurmax=0; 116 compteurmax=0; 110 117 compteurmin=0; 111 118 hgt=hgt500; 112 119 clear hgt500 113 for a=1:28; % boucle sur les annees 114 clear delta; 120 % boucle sur les annees 121 for a=1:28; 122 clear delta; 115 123 delta=zeros(122,1); 116 for b=1:122; % boucle sur les jours : on prepare avant 124 % boucle sur les jours : on prepare avant 125 for b=1:122; 117 126 if b>1; 118 127 delta(b)=ind_olr(b,a)-ind_olr(b-1,a); 119 128 end; 120 129 end; 121 for b=1:122; % boucle sur les jours 122 if (b>21 && b<112); % 1ere condition (laisser une marge de 10) 123 % cas 1 : max deltas apres negetifs et deltas avant postifs 124 if (delta(b+1)<0 && delta(b)>0 && ind_olr(b,a)>1.50); 130 % boucle sur les jours 131 for b=1:122; 132 % 1ere condition (laisser une marge de 10) 133 if (b>21 && b<112); 134 % cas 1 : max deltas apres negetifs et deltas avant postifs 135 if (delta(b+1)<0 && delta(b)>0 && ind_olr(b,a)>1.50); 125 136 compteurmax=compteurmax+1; 126 format short g; 137 format short g; 127 138 128 139 tablecompteurmax(compteurmax,:)=[compteurmax b 1978+a ind_olr(b,a)]; … … 224 235 225 236 226 % cas 2 : min deltas apres positifs et deltas avant negatifs 237 % cas 2 : min deltas apres positifs et deltas avant negatifs 227 238 elseif (delta(b+1)>0 && delta(b)<0 && ind_olr(b,a)<-1.50); 228 239 compteurmin=compteurmin+1; 229 240 format short g; 230 tablecompteurmin(compteurmin,:)=[compteurmin b 1978+a ind_olr(b,a)]; 241 tablecompteurmin(compteurmin,:)=[compteurmin b 1978+a ind_olr(b,a)]; 231 242 hgt500_filtre_compomin(1,compteurmin,1,:,:)=hgt(b-21,a,:,:); 232 243 hgt500_filtre_compomin(1,compteurmin,2,:,:)=hgt(b-20,a,:,:); … … 326 337 end; 327 338 end; 328 end; 339 end; 329 340 end; 330 341 disp(['iii : compteurmin =', int2str(compteurmin)]); … … 337 348 hgt500_filtre_compomin=reshape(hgt500_filtre_compomin,240,31,49,144); 338 349 hgt500_filtre_compomax=reshape(hgt500_filtre_compomax,240,31,49,144); 339 hgt500_filtre_compomin1(:,:,:)=nanmean(hgt500_filtre_compomin); clear hgt500_filtre_compomin; 340 hgt500_filtre_compomax1(:,:,:)=nanmean(hgt500_filtre_compomax); clear hgt500_filtre_compomax; 341 342 x=[-10:1:10]'; %' 343 344 figure(1); 350 hgt500_filtre_compomin1(:,:,:)=nanmean(hgt500_filtre_compomin); 351 clear hgt500_filtre_compomin; 352 hgt500_filtre_compomax1(:,:,:)=nanmean(hgt500_filtre_compomax); 353 clear hgt500_filtre_compomax; 354 355 x=[-10:1:10]'; 356 357 figure(1); 345 358 orient('landscape'); 346 359 lat=lat'; … … 376 389 else 377 390 set (gca,'XTick',[-60:30:60],'XTickLabel',[' ';' ';' ';' ';' ']); 378 end; 391 end; 379 392 set (gca,'YTick',[20:10:70],'YTickLabel',[' ';'30N';'40N';'50N';'60N';' '],'fontname','Arial','fontsize',6); 380 393 if e==4; 381 co=colorbar; 394 co=colorbar; 382 395 set (co,'ytick',[-40:20:40],'yticklabel',[-40:20:40],'fontname','Arial','fontsize',6); 383 396 end; 384 hold on; cartemonde1; 397 hold on; 398 cartemonde1; 385 399 set (gca,'tickDir','out'); 386 400 axis equal; … … 391 405 text(-180,50,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 392 406 pos_vert=e/10; 393 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 407 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 394 408 end; 395 409 396 410 print -depsc2 compo_hgt500_eof234_1025_pb1_seuil150.eps; 397 411 398 figure(2); 412 figure(2); 399 413 orient('landscape'); 400 414 … … 421 435 palettejerome30; 422 436 colormap(palette); 423 437 424 438 delta_hgt500_filtre_min(1,1)=-50.001; 425 439 delta_hgt500_filtre_min(1,2)=50.001; 426 440 427 441 aa=contourf(lon-180,lat,delta_hgt500_filtre_min,[-50:2.5:50],'LineStyle','none'); 428 442 if e==1; … … 430 444 else 431 445 set (gca,'XTick',[-60:30:60],'XTickLabel',[' ';' ';' ';' ';' ']); 432 end; 446 end; 433 447 set (gca,'YTick',[20:10:70],'YTickLabel',[' ';'30N';'40N';'50N';'60N';' '],'fontname','Arial','fontsize',6); 434 448 if e==4; 435 co=colorbar; 449 co=colorbar; 436 450 set (co,'ytick',[-40:20:40],'yticklabel',[-40:20:40],'fontname','Arial','fontsize',6); 437 451 end; 438 hold on; cartemonde1; 452 hold on; 453 cartemonde1; 439 454 set (gca,'tickDir','out'); 440 455 axis equal; … … 445 460 text(-180,50,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 446 461 pos_vert=e/10; 447 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 462 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 448 463 end; 449 464 print -depsc2 compo_hgt500_eof234_1025_pb2_seuil150.eps; 450 451
Note: See TracChangeset
for help on using the changeset viewer.