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_vwnd925_EOF23_1030.m

    r15 r16  
    11% initialisation 
    2 clear; close all; 
    3  
     2 
     3clear; 
     4close all; 
    45 
    56% etape 1 :on selectionne les mois d ete (attention aux annees bixestiles!) 
     
    89vwnd925=zeros(122,49,144,28); 
    910 
    10 siz=31+28+31+30+31+1; sizbis=31+28+31+30+31+30+31+31+30; 
     11siz=31+28+31+30+31+1; 
     12sizbis=31+28+31+30+31+30+31+31+30; 
    1113ncload('vwnd925.1979.nc'); vwnd925(:,:,:,1)=vwnd(siz:sizbis,1,:,:); clear vwnd; 
    1214ncload('vwnd925.1980.nc'); vwnd925(:,:,:,2)=vwnd(siz+1:sizbis+1,1,:,:); clear vwnd; 
     
    4749 
    4850%%%%%%%%%%%%%%% FICHIER OLR 
    49 % ouverture / lecture du fichier  
     51% ouverture / lecture du fichier 
    5052load eof23_1030.txt 
    5153ind_olr=reshape(eof23_1030,122,28); 
     
    5456% on calcule l ecart type sur la serie entiere de l OLR 
    5557ind_olr1=reshape(ind_olr, k,1); 
    56 ind_olr2=std(ind_olr1); clear ind_olr1; 
    57  
    58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     58ind_olr2=std(ind_olr1); 
     59clear ind_olr1; 
     60 
    5961% GEOPOTENTIEL 
    6062% intialisation des tableaux 
    61 vwnd925_filtre_compomax=NaN*ones(60,31,49,144);  
     63vwnd925_filtre_compomax=NaN*ones(60,31,49,144); 
    6264vwnd925_filtre_compomin=NaN*ones(60,31,49,144); 
    6365 
    64 compteurmax=0;  
     66compteurmax=0; 
    6567compteurmin=0; 
    6668 
    67 for a=1:28; % boucle sur les annees 
    68    clear delta;  
     69% boucle sur les annees 
     70for a=1:28; 
     71   clear delta; 
    6972   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; 
    7175        if b>1; 
    7276            delta(b)=ind_olr(b,a)-ind_olr(b-1,a); 
    7377        end; 
    7478   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); 
    7985            compteurmax=compteurmax+1; 
    8086            vwnd925_filtre_compomax(compteurmax,1,:,:)=vwnd(b-20,a,:,:); 
     
    111117            vwnd925_filtre_compomax(compteurmax,30,:,:)=vwnd(b+9,a,:,:); 
    112118            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 
    114120         elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); 
    115121            compteurmin=compteurmin+1; 
     
    150156         end; 
    151157      end; 
    152    end;          
     158   end; 
    153159end; 
    154160 
     
    156162% on fait la somme des valeurs de vwnd925_filtreentiel sur le nbre d occurences 
    157163% 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);  
     164vwnd925_filtre_compomin1(:,:,:)=nanmean(vwnd925_filtre_compomin); 
     165clear vwnd925_filtre_compomin; 
     166vwnd925_filtre_compomax1(:,:,:)=nanmean(vwnd925_filtre_compomax); 
     167clear vwnd925_filtre_compomax; 
     168 
     169x=[-10:1:10]'; 
     170 
     171figure(1); 
    164172orient('landscape'); 
    165173lat=lat'; 
     
    217225       else 
    218226         set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 
    219        end;        
     227       end; 
    220228       set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';' 0 ';'10N';'20N';'30N'],'fontname','Arial','fontsize',6); 
    221229       if e==4; 
    222           co=colorbar;             
     230          co=colorbar; 
    223231          set (co,'ytick',[-5:1:5],'yticklabel',[-5:1:5],'fontname','Arial','fontsize',6); 
    224232       end; 
    225        hold on; cartemonde1; 
     233       hold on; 
     234       cartemonde1; 
    226235       set (gca,'tickDir','out'); 
    227236       axis equal; 
     
    232241       text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 
    233242       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]); 
    235244end; 
    236245 
    237246print -depsc2 composite_vwnd925_EOF23_1030_part1.eps; 
    238247 
    239 figure(2);  
     248figure(2); 
    240249orient('landscape'); 
    241250 
     
    292301       else 
    293302         set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 
    294        end;        
     303       end; 
    295304       set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';' 0 ';'10N';'20N';'30N'],'fontname','Arial','fontsize',6); 
    296305       if e==4; 
    297           co=colorbar;             
     306          co=colorbar; 
    298307          set (co,'ytick',[-5:1:5],'yticklabel',[-5:1:5],'fontname','Arial','fontsize',6); 
    299308       end; 
    300        hold on; cartemonde1; 
     309       hold on; 
     310       cartemonde1; 
    301311       set (gca,'tickDir','out'); 
    302312       axis equal; 
     
    307317       text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 
    308318       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]); 
    310320end; 
    311321 
Note: See TracChangeset for help on using the changeset viewer.