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