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