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_hgt925_EOF12_ER1030.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!) 
     
    810hgt925=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('hgt925.1979.nc'); hgt925(:,:,:,1)=hgt(siz:sizbis,1,:,:); clear hgt; 
    1215ncload('hgt925.1980.nc'); hgt925(:,:,:,2)=hgt(siz+1:sizbis+1,1,:,:); clear hgt; 
     
    3841ncload('hgt925.2006.nc'); hgt925(:,:,:,28)=hgt(siz:sizbis,1,:,:);clear hgt; 
    3942 
    40  
    4143clear siz1 siz1bis; 
    4244 
     
    4648 
    4749%%%%%%%%%%%%%%% FICHIER OLR 
    48 % ouverture / lecture du fichier  
     50% ouverture / lecture du fichier 
    4951load eof12_rossby_1030.txt 
    5052ind_olr=reshape(eof12_rossby_1030,122,28); 
     
    5355% on calcule l ecart type sur la serie entiere de l OLR 
    5456ind_olr1=reshape(ind_olr, k,1); 
    55 ind_olr2=std(ind_olr1); clear ind_olr1; 
    56  
    57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     57ind_olr2=std(ind_olr1); 
     58clear ind_olr1; 
     59 
    5860% GEOPOTENTIEL 
    5961% intialisation des tableaux 
    60 hgt925_filtre_compomax=NaN*ones(60,31,49,144);  
     62hgt925_filtre_compomax=NaN*ones(60,31,49,144); 
    6163hgt925_filtre_compomin=NaN*ones(60,31,49,144); 
    6264 
    63 compteurmax=0;  
     65compteurmax=0; 
    6466compteurmin=0; 
    6567 
    66 for a=1:28; % boucle sur les annees 
    67    clear delta;  
     68% boucle sur les annees 
     69for a=1:28; 
     70   clear delta; 
    6871   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; 
    7074        if b>1; 
    7175            delta(b)=ind_olr(b,a)-ind_olr(b-1,a); 
    7276        end; 
    7377   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); 
    7884            compteurmax=compteurmax+1; 
    7985            hgt925_filtre_compomax(compteurmax,1,:,:)=hgt(b-20,a,:,:); 
     
    110116            hgt925_filtre_compomax(compteurmax,30,:,:)=hgt(b+9,a,:,:); 
    111117            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 
    113119         elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); 
    114120            compteurmin=compteurmin+1; 
     
    149155         end; 
    150156      end; 
    151    end;          
     157   end; 
    152158end; 
    153159 
     
    155161% on fait la somme des valeurs de hgt925_filtreentiel sur le nbre d occurences 
    156162% 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);  
     163hgt925_filtre_compomin1(:,:,:)=nanmean(hgt925_filtre_compomin); 
     164clear hgt925_filtre_compomin; 
     165hgt925_filtre_compomax1(:,:,:)=nanmean(hgt925_filtre_compomax); 
     166clear hgt925_filtre_compomax; 
     167 
     168x=[-10:1:10]'; 
     169 
     170figure(1); 
    163171orient('landscape'); 
    164172lat=lat'; 
     
    217225       else 
    218226         set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 
    219        end;        
     227       end; 
    220228       set (gca,'YTick',[-20:10:20],'YTickLabel',['20S';'10S';' 0 ';'10N';'20N';],'fontname','Arial','fontsize',6); 
    221229       if e==4; 
    222           co=colorbar;             
     230          co=colorbar; 
    223231          set (co,'ytick',[-20:5:20],'yticklabel',[-20:5:20],'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_hgt925_EOF12_ER1030_part1.eps; 
    238247 
    239 figure(2);  
     248figure(2); 
    240249orient('landscape'); 
    241250 
     
    285294            sauvegrads('composite_hgt925_mode_rossby_1030_moins4',delta_hgt925,[-180 2.5 -10 2.5]); 
    286295       end; 
    287         
     296 
    288297       delta_hgt925=flipud(delta_hgt925); 
    289298 
     
    292301       else 
    293302         set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 
    294        end;        
     303       end; 
    295304       set (gca,'YTick',[-20:10:20],'YTickLabel',['20S';'10S';' 0 ';'10N';'20N';],'fontname','Arial','fontsize',6); 
    296305       if e==4; 
    297           co=colorbar;             
     306          co=colorbar; 
    298307          set (co,'ytick',[-20:5:20],'yticklabel',[-20:5:20],'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.