Ignore:
Timestamp:
01/06/09 10:53:18 (15 years ago)
Author:
pinsard
Message:

remove trailing blanks, split lines with multiple statements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mode_sahelien/composite_uwnd925_EOF24_1030.m

    r15 r16  
     1% 
     2 
    13% initialisation 
    2 clear; close all; 
    3  
     4clear; 
     5close all; 
    46 
    57% etape 1 :on selectionne les mois d ete (attention aux annees bixestiles!) 
     
    810vwnd925=zeros(122,49,144,28); 
    911 
    10 siz=31+28+31+30+31+1; sizbis=31+28+31+30+31+30+31+31+30; 
     12siz=31+28+31+30+31+1; 
     13sizbis=31+28+31+30+31+30+31+31+30; 
    1114ncload('vwnd925.1979.nc'); vwnd925(:,:,:,1)=vwnd(siz:sizbis,1,:,:); clear vwnd; 
    1215ncload('vwnd925.1980.nc'); vwnd925(:,:,:,2)=vwnd(siz+1:sizbis+1,1,:,:); clear vwnd; 
     
    4750 
    4851%%%%%%%%%%%%%%% FICHIER OLR 
    49 % ouverture / lecture du fichier  
     52% ouverture / lecture du fichier 
    5053load eof24_1030.txt 
    5154ind_olr=reshape(eof24_1030,122,28); 
     
    5457% on calcule l ecart type sur la serie entiere de l OLR 
    5558ind_olr1=reshape(ind_olr, k,1); 
    56 ind_olr2=std(ind_olr1); clear ind_olr1; 
    57  
    58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     59ind_olr2=std(ind_olr1); 
     60clear ind_olr1; 
     61 
    5962% GEOPOTENTIEL 
    6063% intialisation des tableaux 
    61 vwnd925_filtre_compomax=NaN*ones(60,31,49,144);  
     64vwnd925_filtre_compomax=NaN*ones(60,31,49,144); 
    6265vwnd925_filtre_compomin=NaN*ones(60,31,49,144); 
    6366 
    64 compteurmax=0;  
     67compteurmax=0; 
    6568compteurmin=0; 
    6669 
    67 for a=1:28; % boucle sur les annees 
    68    clear delta;  
     70% boucle sur les annees 
     71for a=1:28; 
     72   clear delta; 
    6973   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; 
    7176        if b>1; 
    7277            delta(b)=ind_olr(b,a)-ind_olr(b-1,a); 
    7378        end; 
    7479   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); 
    7986            compteurmax=compteurmax+1; 
    8087            vwnd925_filtre_compomax(compteurmax,1,:,:)=vwnd(b-20,a,:,:); 
     
    111118            vwnd925_filtre_compomax(compteurmax,30,:,:)=vwnd(b+9,a,:,:); 
    112119            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 
    114121         elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); 
    115122            compteurmin=compteurmin+1; 
     
    150157         end; 
    151158      end; 
    152    end;          
     159   end; 
    153160end; 
    154161 
     
    156163% on fait la somme des valeurs de vwnd925_filtreentiel sur le nbre d occurences 
    157164% 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);  
     165vwnd925_filtre_compomin1(:,:,:)=nanmean(vwnd925_filtre_compomin); 
     166clear vwnd925_filtre_compomin; 
     167vwnd925_filtre_compomax1(:,:,:)=nanmean(vwnd925_filtre_compomax); 
     168clear vwnd925_filtre_compomax; 
     169 
     170x=[-10:1:10]'; 
     171 
     172figure(1); 
    164173orient('landscape'); 
    165174lat=lat'; 
     
    217226       else 
    218227         set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 
    219        end;        
     228       end; 
    220229       set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';' 0 ';'10N';'20N';'30N'],'fontname','Arial','fontsize',6); 
    221230       if e==4; 
    222           co=colorbar;             
     231          co=colorbar; 
    223232          set (co,'ytick',[-5:1:5],'yticklabel',[-5:1:5],'fontname','Arial','fontsize',6); 
    224233       end; 
    225        hold on; cartemonde1; 
     234       hold on; 
     235       cartemonde1; 
    226236       set (gca,'tickDir','out'); 
    227237       axis equal; 
     
    232242       text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 
    233243       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]); 
    235245end; 
    236246 
    237247print -depsc2 composite_vwnd925_EOF234_1030_part1.eps; 
    238248 
    239 figure(2);  
     249figure(2); 
    240250orient('landscape'); 
    241251 
     
    292302       else 
    293303         set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 
    294        end;        
     304       end; 
    295305       set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';' 0 ';'10N';'20N';'30N'],'fontname','Arial','fontsize',6); 
    296306       if e==4; 
    297           co=colorbar;             
     307          co=colorbar; 
    298308          set (co,'ytick',[-5:1:5],'yticklabel',[-5:1:5],'fontname','Arial','fontsize',6); 
    299309       end; 
    300        hold on; cartemonde1; 
     310       hold on; 
     311       cartemonde1; 
    301312       set (gca,'tickDir','out'); 
    302313       axis equal; 
     
    307318       text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 
    308319       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]); 
    310321end; 
    311322 
Note: See TracChangeset for help on using the changeset viewer.