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