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