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

    r15 r16  
     1% 
     2 
    13% initialisation 
    2 clear; close all; 
     4clear; 
     5close all; 
    36 
    47 
     
    811vwnd700=zeros(122,49,144,28); 
    912 
    10 siz=31+28+31+30+31+1; sizbis=31+28+31+30+31+30+31+31+30; 
     13siz=31+28+31+30+31+1; 
     14sizbis=31+28+31+30+31+30+31+31+30; 
    1115ncload('vwnd700.1979.nc'); vwnd700(:,:,:,1)=vwnd(siz:sizbis,1,:,:); clear vwnd; 
    1216ncload('vwnd700.1980.nc'); vwnd700(:,:,:,2)=vwnd(siz+1:sizbis+1,1,:,:); clear vwnd; 
     
    4751 
    4852%%%%%%%%%%%%%%% FICHIER OLR 
    49 % ouverture / lecture du fichier  
     53% ouverture / lecture du fichier 
    5054load eof12_rossby_1030.txt 
    5155ind_olr=reshape(eof12_rossby_1030,122,28); 
     
    5458% on calcule l ecart type sur la serie entiere de l OLR 
    5559ind_olr1=reshape(ind_olr, k,1); 
    56 ind_olr2=std(ind_olr1); clear ind_olr1; 
    57  
    58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     60ind_olr2=std(ind_olr1); 
     61clear ind_olr1; 
     62 
    5963% GEOPOTENTIEL 
    6064% intialisation des tableaux 
    61 vwnd700_filtre_compomax=NaN*ones(60,31,49,144);  
     65vwnd700_filtre_compomax=NaN*ones(60,31,49,144); 
    6266vwnd700_filtre_compomin=NaN*ones(60,31,49,144); 
    6367 
    64 compteurmax=0;  
     68compteurmax=0; 
    6569compteurmin=0; 
    6670 
    67 for a=1:28; % boucle sur les annees 
    68    clear delta;  
     71% boucle sur les annees 
     72for a=1:28; 
     73   clear delta; 
    6974   delta=zeros(122,1); 
    70    for b=1:122; % boucle sur les jours : on prepare avant    
     75   % boucle sur les jours : on prepare avant 
     76   for b=1:122; 
    7177        if b>1; 
    7278            delta(b)=ind_olr(b,a)-ind_olr(b-1,a); 
    7379        end; 
    7480   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);  
     81   % boucle sur les jours 
     82   for b=1:122; 
     83      % 1ere condition (laisser une marge de 10) 
     84      if (b>20 && b<112); 
     85% cas 1 : max deltas apres negetifs et deltas avant postifs 
     86         if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); 
    7987            compteurmax=compteurmax+1; 
    8088            vwnd700_filtre_compomax(compteurmax,1,:,:)=vwnd(b-20,a,:,:); 
     
    111119            vwnd700_filtre_compomax(compteurmax,30,:,:)=vwnd(b+9,a,:,:); 
    112120            vwnd700_filtre_compomax(compteurmax,31,:,:)=vwnd(b+10,a,:,:); 
    113 % cas 2 : min deltas apres positifs et deltas avant negatifs    
     121% cas 2 : min deltas apres positifs et deltas avant negatifs 
    114122         elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); 
    115123            compteurmin=compteurmin+1; 
     
    150158         end; 
    151159      end; 
    152    end;          
     160   end; 
    153161end; 
    154162 
     
    156164% on fait la somme des valeurs de vwnd700_filtreentiel sur le nbre d occurences 
    157165% on obtent un tableau de la forme (jours-avant-apres,lon,lat) 
    158 vwnd700_filtre_compomin1(:,:,:)=nanmean(vwnd700_filtre_compomin); clear vwnd700_filtre_compomin; 
    159 vwnd700_filtre_compomax1(:,:,:)=nanmean(vwnd700_filtre_compomax); clear vwnd700_filtre_compomax; 
    160  
    161 x=[-10:1:10]'; %' 
    162  
    163 figure(1);  
     166vwnd700_filtre_compomin1(:,:,:)=nanmean(vwnd700_filtre_compomin); 
     167clear vwnd700_filtre_compomin; 
     168vwnd700_filtre_compomax1(:,:,:)=nanmean(vwnd700_filtre_compomax); 
     169clear vwnd700_filtre_compomax; 
     170 
     171x=[-10:1:10]'; 
     172 
     173figure(1); 
    164174orient('landscape'); 
    165175lat=lat'; 
     
    217227       else 
    218228         set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 
    219        end;        
     229       end; 
    220230       set (gca,'YTick',[-20:10:20],'YTickLabel',['20S';'10S';' 0 ';'10N';'20N';],'fontname','Arial','fontsize',6); 
    221231       if e==4; 
    222           co=colorbar;             
     232          co=colorbar; 
    223233          set (co,'ytick',[-5:1:5],'yticklabel',[-5:1:5],'fontname','Arial','fontsize',6); 
    224234       end; 
    225        hold on; cartemonde1; 
     235       hold on; 
     236       cartemonde1; 
    226237       set (gca,'tickDir','out'); 
    227238       axis equal; 
     
    232243       text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 
    233244       pos_vert=e/10; 
    234        set (gca,'position',[0.2 pos_vert 0.5 0.1]);  
     245       set (gca,'position',[0.2 pos_vert 0.5 0.1]); 
    235246end; 
    236247 
    237248print -depsc2 composite_vwnd700_EOF12_ER1030_part1.eps; 
    238249 
    239 figure(2);  
     250figure(2); 
    240251orient('landscape'); 
    241252 
     
    291302       else 
    292303         set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); 
    293        end;        
     304       end; 
    294305       set (gca,'YTick',[-20:10:20],'YTickLabel',['20S';'10S';' 0 ';'10N';'20N';],'fontname','Arial','fontsize',6); 
    295306       if e==4; 
    296           co=colorbar;             
     307          co=colorbar; 
    297308          set (co,'ytick',[-5:1:5],'yticklabel',[-5:1:5],'fontname','Arial','fontsize',6); 
    298309       end; 
    299        hold on; cartemonde1; 
     310       hold on; 
     311       cartemonde1; 
    300312       set (gca,'tickDir','out'); 
    301313       axis equal; 
     
    306318       text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 
    307319       pos_vert=e/10; 
    308        set (gca,'position',[0.2 pos_vert 0.5 0.1]);  
     320       set (gca,'position',[0.2 pos_vert 0.5 0.1]); 
    309321end; 
    310322 
    311323print -depsc2 composite_vwnd700_EOF12_ER1030_part2.eps; 
    312  
Note: See TracChangeset for help on using the changeset viewer.