Changeset 16 for trunk/src/mode_sahelien/composite_hgt500_eof1_1030.m
- Timestamp:
- 01/06/09 10:53:18 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mode_sahelien/composite_hgt500_eof1_1030.m
r15 r16 1 % 1 2 % initialisation 2 clear; close all;3 3 clear; 4 close all; 4 5 5 6 % etape 1 :on selectionne les mois d ete (attention aux annees bixestiles!) … … 8 9 hgt500=zeros(122,49,144,28); 9 10 10 siz=31+28+31+30+31+1; sizbis=31+28+31+30+31+30+31+31+30; 11 siz=31+28+31+30+31+1; 12 sizbis=31+28+31+30+31+30+31+31+30; 11 13 ncload('hgt500.1979.nc'); hgt500(:,:,:,1)=hgt(siz:sizbis,1,:,:); clear hgt; 12 14 ncload('hgt500.1980.nc'); hgt500(:,:,:,2)=hgt(siz+1:sizbis+1,1,:,:); clear hgt; … … 54 56 end 55 57 end 56 57 58 58 59 hgt1=zeros(122,28,49,144); 59 60 hgt1(:,:,:,1:72)=hgt500(:,:,:,73:144); 60 61 hgt1(:,:,:,73:144)=hgt500(:,:,:,1:72); 61 clear hgt500; hgt500=hgt1; clear hgt1; 62 clear hgt500; 63 hgt500=hgt1; 64 clear hgt1; 62 65 63 66 hgt1=permute(hgt500,[2 1 3 4]); 64 hgt2(:,:,:)=nanmean(hgt1); clear hgt1; 67 hgt2(:,:,:)=nanmean(hgt1); 68 clear hgt1; 65 69 hgt3=reshape(hgt500, 3416,49,144); 66 hgt4(:,:)=nanmean(hgt3); clear hgt3; 70 hgt4(:,:)=nanmean(hgt3); 71 clear hgt3; 67 72 68 73 for a=1:122; 69 74 for b=1:28; 70 75 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)); 76 for d=1:144; 77 hgt500(a,b,c,d)=hgt500(a,b,c,d)-(hgt2(a,c,d)-hgt4(c,d)); 73 78 end; 74 79 end; … … 86 91 % on calcule l ecart type sur la serie entiere de l OLR 87 92 ind_olr1=reshape(ind_olr, k,1); 88 ind_olr2=1.5*std(ind_olr1); clear ind_olr1; 89 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 93 ind_olr2=1.5*std(ind_olr1); 94 clear ind_olr1; 95 90 96 % GEOPOTENTIEL 91 97 % intialisation des tableaux 92 hgt500_filtre_compomax=NaN*ones(60,31,49,144); 98 hgt500_filtre_compomax=NaN*ones(60,31,49,144); 93 99 hgt500_filtre_compomin=NaN*ones(60,31,49,144); 94 100 95 compteurmax=0; 101 compteurmax=0; 96 102 compteurmin=0; 97 103 hgt=hgt500; 98 clear hgt500 99 for a=1:28; % boucle sur les annees 100 clear delta; 104 clear hgt500; 105 % boucle sur les annees 106 for a=1:28; 107 clear delta; 101 108 delta=zeros(122,1); 102 for b=1:122; % boucle sur les jours : on prepare avant 109 % boucle sur les jours : on prepare avant 110 for b=1:122; 103 111 if b>1; 104 112 delta(b)=ind_olr(b,a)-ind_olr(b-1,a); 105 113 end; 106 114 end; 107 for b=1:122; % boucle sur les jours 108 if (b>20 && b<112); % 1ere condition (laisser une marge de 10) 109 % cas 1 : max deltas apres negetifs et deltas avant postifs 110 if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); 115 % boucle sur les jours 116 for b=1:122; 117 % 1ere condition (laisser une marge de 10) 118 if (b>20 && b<112); 119 % cas 1 : max deltas apres negetifs et deltas avant postifs 120 if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); 111 121 compteurmax=compteurmax+1; 112 122 hgt500_filtre_compomax(compteurmax,1,:,:)=hgt(b-20,a,:,:); … … 143 153 hgt500_filtre_compomax(compteurmax,30,:,:)=hgt(b+9,a,:,:); 144 154 hgt500_filtre_compomax(compteurmax,31,:,:)=hgt(b+10,a,:,:); 145 % cas 2 : min deltas apres positifs et deltas avant negatifs 155 % cas 2 : min deltas apres positifs et deltas avant negatifs 146 156 elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); 147 157 compteurmin=compteurmin+1; … … 182 192 end; 183 193 end; 184 end; 194 end; 185 195 end; 186 196 disp(['iii : compteurmin =', int2str(compteurmin)]); … … 204 214 % on fait la somme des valeurs de hgt500_filtreentiel sur le nbre d occurences 205 215 % on obtent un tableau de la forme (jours-avant-apres,lon,lat) 206 hgt500_filtre_compomin1(:,:,:)=nanmean(hgt500_filtre_compomin); clear hgt500_filtre_compomin; 207 hgt500_filtre_compomax1(:,:,:)=nanmean(hgt500_filtre_compomax); clear hgt500_filtre_compomax; 208 209 x=[-10:1:10]'; %' 210 211 figure(1); 216 hgt500_filtre_compomin1(:,:,:)=nanmean(hgt500_filtre_compomin); 217 clear hgt500_filtre_compomin; 218 hgt500_filtre_compomax1(:,:,:)=nanmean(hgt500_filtre_compomax); 219 clear hgt500_filtre_compomax; 220 221 x=[-10:1:10]'; 222 223 figure(1); 212 224 orient('landscape'); 213 225 lat=lat'; … … 248 260 else 249 261 set (gca,'XTick',[-60:30:60],'XTickLabel',[' ';' ';' ';' ';' ']); 250 end; 262 end; 251 263 set (gca,'YTick',[20:10:70],'YTickLabel',[' ';'30N';'40N';'50N';'60N';' '],'fontname','Arial','fontsize',6); 252 264 if e==4; 253 co=colorbar; 265 co=colorbar; 254 266 set (co,'ytick',[-40:20:40],'yticklabel',[-40:20:40],'fontname','Arial','fontsize',6); 255 267 end; 256 hold on; cartemonde1; 268 hold on; 269 cartemonde1; 257 270 set (gca,'tickDir','out'); 258 271 axis equal; … … 263 276 text(-270,50,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 264 277 pos_vert=e/10; 265 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 278 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 266 279 end; 267 280 268 281 print -depsc2 compo_hgt500_eof1_1030a.eps; 269 282 270 figure(2); 283 figure(2); 271 284 orient('landscape'); 272 285 … … 297 310 subplot(7,1,8-e); 298 311 palettejerome30; 299 colormap(palette);300 312 colormap(palette); 313 301 314 delta_hgt500_filtre_min(1,1)=-50.001; 302 315 delta_hgt500_filtre_min(1,2)=50.001; 303 316 304 317 aa=contourf(lon-180,lat,delta_hgt500_filtre_min,[-50:2.5:50],'LineStyle','none'); 305 318 if e==1; … … 307 320 else 308 321 set (gca,'XTick',[-60:30:60],'XTickLabel',[' ';' ';' ';' ';' ']); 309 end; 322 end; 310 323 set (gca,'YTick',[20:10:70],'YTickLabel',[' ';'30N';'40N';'50N';'60N';' '],'fontname','Arial','fontsize',6); 311 324 if e==4; 312 co=colorbar; 325 co=colorbar; 313 326 set (co,'ytick',[-40:20:40],'yticklabel',[-40:20:40],'fontname','Arial','fontsize',6); 314 327 end; 315 hold on; cartemonde1; 328 hold on; 329 cartemonde1; 316 330 set (gca,'tickDir','out'); 317 331 axis equal; … … 322 336 text(-270,50,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 323 337 pos_vert=e/10; 324 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 338 set (gca,'position',[0.2 pos_vert 0.5 0.1]); 325 339 end; 326 340 print -depsc2 compo_hgt500_eof1_1030b.eps;
Note: See TracChangeset
for help on using the changeset viewer.