Changeset 44 for trunk


Ignore:
Timestamp:
01/28/09 17:37:51 (15 years ago)
Author:
pinsard
Message:

parametrisation of time_serie_jjas_....m and composite_olr_EOF1....m

Location:
trunk/src/mode_sahelien
Files:
8 edited
2 copied

Legend:

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

    r26 r44  
    11% 
     2%+ 
     3% 
     4% EVOLUTIONS 
     5% =========== 
     6% 
     7% $Id$ 
     8%  
     9% - fplod 2009-01-28T10:14:38Z aedon.locean-ipsl.upmc.fr (Darwin) 
     10% 
     11%   * moved to obsolete because very close from composite_olr_EOF12_ER1030.m 
     12% 
     13%- 
    214 
    315% initialisation 
  • trunk/src/mode_sahelien/composite_olr_EOF1_1030.m

    r26 r44  
    11% 
     2%+ 
     3% 
     4% EVOLUTIONS 
     5% =========== 
     6% 
     7% $Id$ 
     8%  
     9% - fplod 2009-01-28T14:21:06Z aedon.locean-ipsl.upmc.fr (Darwin) 
     10% 
     11%   * replaced by composite_olr_eof_df.m 
     12% 
     13%- 
    214 
    315% initialisation 
  • trunk/src/mode_sahelien/composite_olr_EOF1_30100.m

    r26 r44  
    11% 
     2%+ 
     3% 
     4% EVOLUTIONS 
     5% =========== 
     6% 
     7% $Id$ 
     8% 
     9% - fplod 2009-01-28T14:21:06Z aedon.locean-ipsl.upmc.fr (Darwin) 
     10% 
     11%   * replaced by composite_olr_eof_df.m 
     12% 
     13%- 
     14 
    215 
    316% initialisation 
  • trunk/src/mode_sahelien/composite_olr_eof_df.m

    r38 r44  
    1 % 
    2  
    3 % initialisation 
    4 clear; 
     1function composite_olr_eof_df(eof_num, ndmin, ndmax) 
     2% composite_olr_eof_df ++explication between ndmin days and ndmax days 
     3 
     4%+ 
     5% module 
     6% ====== 
     7% 
     8% ++ 
     9% 
     10% DESCRIPTION 
     11% =========== 
     12% 
     13% From ``olr.day.mean.nc`` and and eof\ *eof_num*\ \ *ndmin*\ -\ *ndmax*\ d.txt, 
     14% ``composite_olr_eof_df`` compute ++ 
     15% 
     16% ``composite_olr_eof_df`` plot ++ 
     17% 
     18% 2 Postscript files  
     19% composite_olr_eof\ *eof_num*\ _\ *ndmin*\ -\ *ndmax*\ d_part[12].eps are  
     20% written. 
     21% 
     22% CAUTIONS 
     23% ======== 
     24% 
     25% can't work with octave because of ncload and nanmean. 
     26% 
     27% EXAMPLES 
     28% ======== 
     29% 
     30% Following line read ``olr.day.mean.nc`` and ``eof1_10-30d.txt``,  
     31% compute ++, 
     32% plot ++,  
     33% write ``composite_olr_eof1_10-30d_part[12].eps``  
     34% :: 
     35%  
     36% >> composite_olr_eof_df(1,10,30); 
     37% 
     38% SEE ALSO 
     39% ======== 
     40% 
     41% time_serie_jjas_df.m_ 
     42% 
     43% .. _time_serie_jjas_df.m : time_serie_jjas_df.m.html 
     44% 
     45% composite_olr_phase.m_ 
     46% 
     47% .. _composite_olr_phase.m : composite_olr_phase.m.html 
     48% 
     49% 
     50% TODO 
     51% ==== 
     52% 
     53% improve description 
     54% 
     55% improve file pb 
     56% 
     57% use return function 
     58% 
     59% externalize time selection on olr.day.mean.nc 
     60% 
     61% test at the beginning if octave is running 
     62% 
     63% EVOLUTIONS 
     64% ========== 
     65% 
     66% $Id$ 
     67% 
     68% - fplod 2009-01-28T10:38:44Z aedon.locean-ipsl.upmc.fr (Darwin) 
     69% 
     70%   * created from composite_olr_EOF1_1030.m to replace it as well as 
     71%     composite_olr_EOF1_30100.m 
     72% 
     73%     Days will be now written ``ndmin``\-``ndmaxd`` (ex: 10-30d) in filenames. 
     74% 
     75%   * introducing parametrization on EOF number 
     76% 
     77%- 
     78 
     79global IRCAAM_ID; 
     80global IRCAAM_OD; 
     81 
     82eof_num_min=1; 
     83eof_num_max=4; 
     84 
    585close all; 
    686 
    7 ncload('olr.day.mean.nc'); 
     87if nargin==3 
     88 % eof_num must be greater or equal to 1 and lower or equal to 4 
     89 if ((eof_num < eof_num_min) || (eof_num > eof_num_max)) 
     90  disp(['eof_num_min = ', int2str(eof_num_min)]); 
     91  disp(['eof_num_max = ', int2str(eof_num_max)]); 
     92  error('eee : eof_num must be between eof_num_min and eof_num_max'); 
     93 end 
     94 % ndmin must be lower than ndmax 
     95 if (ndmin > ndmax) 
     96  disp(['ndmin = ', int2str(ndmin)]); 
     97  disp(['ndmax = ', int2str(ndmax)]); 
     98  error('eee : ndmin must be lower than ndmax'); 
     99 end 
     100else 
     101  usage='usage : composite_olr_eof_df(eof_num,ndmin, ndmax)'; 
     102  disp(usage); 
     103  error('eee : wrong arguments numbers') 
     104end 
     105 
     106% ndmin and ndmax will be used in xx-yyd form in filenames 
     107df = [int2str(ndmin),'-',int2str(ndmax),'d']; 
     108clear ndmin; 
     109clear ndmax; 
     110 
     111fullfilename=[IRCAAM_ID,'olr.day.mean.nc']; 
     112ncload(fullfilename); 
     113clear fullfilename; 
    8114 
    9115% taille 12327x73x144 1er juin 1974-31 decembre2007 
     
    145251clear olr; 
    146252 
    147 status=load('eof1_1030.txt'); 
    148 eof1_1030=status; 
     253fullfilename=[IRCAAM_ID,'eof',int2str(eof_num),'_',df,'.txt']; 
     254status=load(fullfilename); 
     255clear fullfilename; 
     256 
     257eof_num_df=status; 
    149258clear status; 
    150259% on met sous la forme annee mois 
    151 olr_eof=reshape(eof1_1030,122,28); 
    152 clear eof1_1030; 
     260olr_eof=reshape(eof_num_df,122,28); 
     261clear eof_num_df; 
    153262 
    154263% on calcule l ecart type sur la serie temporelle de l OLR 
     
    181290         if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && olr_eof(b,a)>(olrbis)); 
    182291            compteurmax=compteurmax+1; 
    183           olr_filtre_compomax(compteurmax,1,:,:)=olr1(b-20,a,:,:); 
     292            olr_filtre_compomax(compteurmax,1,:,:)=olr1(b-20,a,:,:); 
    184293            olr_filtre_compomax(compteurmax,2,:,:)=olr1(b-19,a,:,:); 
    185294            olr_filtre_compomax(compteurmax,3,:,:)=olr1(b-18,a,:,:); 
     
    332441 
    333442       if e==7; 
    334       title('OLR composite EOF1 1030j ITCZ 7.5-12.5 ','fontsize',8) ; 
     443          my_title=['OLR composite EOF ', int2str(eof_num), ' ', df, ' ITCZ 7.5-12.5 ']; 
     444          title(my_title,'fontsize',8) ; 
    335445       end; 
    336446       text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 
     
    340450 
    341451figure(1); 
    342 print('-depsc2','composite_olr_EOF1_1030_part1.eps'); 
     452fullfilename=[IRCAAM_OD,'composite_olr_eof',int2str(eof_num),'_', df, _part1.eps']; 
     453print('-depsc2',fullfilename); 
     454clear fullfilename; 
    343455 
    344456figure(2); 
     
    395507       axis([-80 100 -20 40]); 
    396508       if e==7; 
    397            title('OLR composite EOF1 1030j ITCZ 7.5-12.5 ','fontsize',8) ; 
     509          my_title=['OLR composite EOF ', int2str(eof_num), ' ', df, ' ITCZ 7.5-12.5 ']; 
     510          title(my_title,'fontsize',8) ; 
    398511       end; 
    399512       text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); 
     
    403516 
    404517figure(2); 
    405 print('-depsc2','composite_olr_EOF1_1030_part2.eps'); 
     518fullfilename=[IRCAAM_OD,'composite_olr_eof',int2str(eof_num),'_', df, '_part2.eps']; 
     519print('-depsc2',fullfilename); 
     520clear fullfilename; 
  • trunk/src/mode_sahelien/composite_olr_phase_num.m

    r42 r44  
    3232% SEE ALSO 
    3333% ======== 
    34 % 
    3534% 
    3635% lagged_correlations_eof2_eof3_1030.m_ 
  • trunk/src/mode_sahelien/time_serie_jjas.m

    r30 r44  
    11% 
     2%+ 
     3% 
     4% EVOLUTIONS 
     5% =========== 
     6% 
     7% $Id$ 
     8%  
     9% - fplod 2009-01-28T15:26:40Z aedon.locean-ipsl.upmc.fr (Darwin) 
     10% 
     11%   * replaced by time_serie_jjas_df.m 
     12% 
     13%- 
    214 
    315clear; 
  • trunk/src/mode_sahelien/time_serie_jjas_10_25.m

    r30 r44  
    11% 
     2%+ 
     3% 
     4% EVOLUTIONS 
     5% =========== 
     6% 
     7% $Id$ 
     8% 
     9% - fplod 2009-01-28T15:26:40Z aedon.locean-ipsl.upmc.fr (Darwin) 
     10% 
     11%   * replaced by time_serie_jjas_df.m 
     12% 
     13%- 
    214 
    315clear; 
  • trunk/src/mode_sahelien/time_serie_jjas_25_90.m

    r30 r44  
    11% 
     2%+ 
     3% 
     4% EVOLUTIONS 
     5% =========== 
     6% 
     7% $Id$ 
     8% 
     9% - fplod 2009-01-28T15:26:40Z aedon.locean-ipsl.upmc.fr (Darwin) 
     10% 
     11%   * replaced by time_serie_jjas_df.m 
     12% 
     13%- 
     14 
    215 
    316clear; 
  • trunk/src/mode_sahelien/time_serie_jjas_30100.m

    r30 r44  
    11% 
     2%+ 
     3% 
     4% EVOLUTIONS 
     5% =========== 
     6% 
     7% $Id$ 
     8% 
     9% - fplod 2009-01-28T15:26:40Z aedon.locean-ipsl.upmc.fr (Darwin) 
     10% 
     11%   * replaced by time_serie_jjas_df.m 
     12% 
     13%- 
    214 
    315clear; 
  • trunk/src/mode_sahelien/time_serie_jjas_df.m

    r38 r44  
     1function time_serie_jjas_df(ndmin, ndmax) 
     2% time_serie_jjas_df ++explication between ndmin days and ndmax days 
     3 
     4%+ 
     5% module 
     6% ====== 
    17% 
     8% ++ 
     9% 
     10% DESCRIPTION 
     11% =========== 
     12% 
     13% From eof_\ *ndmin*\ -\ *ndmax*\ d_jjas.mat,  
     14% ``time_serie_jjas_df`` compute ++. 
     15% 
     16% ``time_serie_jjas_df`` plot ++. 
     17% 
     18% ``time_serie_jjas_df`` save eof[123]\ *ndmin*\ -\ *ndmax*\ d.txt. 
     19%  
     20% 2 Postscript files 
     21% time_serie_jjas_\ *ndmin*\ -\ *ndmax*\ d_part[12].eps are 
     22% written. 
     23% 
     24% EXAMPLES 
     25% ======== 
     26% 
     27% Following line read ``eof_10-30d_jjas.mat``,  
     28% compute ++, 
     29% plot ++,  
     30% write ``eof[123]_10-30d.txt`` and 
     31% write ``time_serie_jjas_eof1_10-30d_part[12].eps`` 
     32% :: 
     33% 
     34% >> time_serie_jjas_df(10,30); 
     35% 
     36% SEE ALSO 
     37% ======== 
     38% 
     39% composite_olr_eof_df_ 
     40% 
     41% .. _composite_olr_eof_df : composite_olr_eof_df.html 
     42% 
     43% TODO 
     44% ==== 
     45% 
     46% improve description 
     47% 
     48% improve file pb 
     49% 
     50% use return function 
     51% 
     52% nb of figure depends on number of years to be plot : so figure(3) contains  
     53% something only if nb years > 23 (or so), so Postscript file of figure(3)  
     54% shoul not be saved if  nb years is less than 23 ! 
     55% 
     56% EVOLUTIONS 
     57% ========== 
     58% 
     59% $Id$ 
     60% 
     61% - fplod 2009-01-28T15:28:54Z aedon.locean-ipsl.upmc.fr (Darwin) 
     62% 
     63%   * created from time_serie_jjas_30100.m to replace it as well as 
     64%     time_serie_jjas.m, time_serie_jjas_25_90.m and time_serie_jjas_10_25.m 
     65% 
     66%     Days will be now written ``ndmin``\-``ndmaxd`` (ex: 10-30d) in filenames. 
     67% 
     68%- 
    269 
    3 clear; 
     70global IRCAAM_ID; 
     71global IRCAAM_OD; 
    472 
    5 status=load('eof_30100_jjas.mat','C','olr'); 
     73if nargin==2 
     74 % ndmin must be lower than ndmax 
     75 if (ndmin > ndmax) 
     76  disp(['ndmin = ', int2str(ndmin)]); 
     77  disp(['ndmax = ', int2str(ndmax)]); 
     78  error('eee : ndmin must be lower than ndmax'); 
     79 end 
     80else 
     81  usage='usage : time_serie_jjas_df(ndmin, ndmax)'; 
     82  disp(usage); 
     83  error('eee : wrong arguments numbers') 
     84end 
     85 
     86% ndmin and ndmax will be used in xx-yyd form in filenames 
     87df = [int2str(ndmin),'-',int2str(ndmax),'d']; 
     88clear ndmin; 
     89clear ndmax; 
     90 
     91fullfilename=[IRCAAM_ID,'eof_', df, '_jjas.mat']; 
     92status=load(fullfilename); 
     93clear fullfilename; 
    694C=status.C; 
    795olr=status.olr; 
     
    26114end; 
    27115 
    28 save('eof1_30100.txt','time_serie_olr1','-ASCII'); 
    29 save('eof2_30100.txt','time_serie_olr2','-ASCII'); 
    30 save('eof3_30100.txt','time_serie_olr3','-ASCII'); 
     116fullfilename=[IRCAAM_ID,'eof1_',df,'.txt']; 
     117save(fullfilename,'time_serie_olr1','-ASCII'); 
     118clear fullfilename; 
     119 
     120fullfilename=[IRCAAM_ID,'eof2_',df,'.txt']; 
     121save(fullfilename,'time_serie_olr2','-ASCII'); 
     122clear fullfilename; 
     123 
     124fullfilename=[IRCAAM_ID,'eof3_',df,'.txt']; 
     125save(fullfilename,'time_serie_olr3','-ASCII'); 
     126clear fullfilename; 
    31127 
    32128x=[1:3416]'; 
     
    54150   plot(x,y,'k:'); 
    55151   title(a+1978,'FontSize',8); 
     152   my_title=['serie temporelle VP1 filtrage ', df]; 
    56153   if a==2; 
    57        text(0,5.5,'serie temporelle VP1 filtrage 30100'); 
     154       text(0,5.5,my_title); 
    58155   elseif a==13; 
    59        text(0,5.5,'serie temporelle VP1 filtrage 30100'); 
     156       text(0,5.5,my_title); 
    60157   elseif a==24; 
    61        text(0,5.5,'serie temporelle VP1 filtrage 30100'); 
     158       text(0,5.5,my_title); 
    62159   end; 
    63160   set (gca,'tickDir','out'); 
     
    69166 
    70167figure(1); 
    71 print('-depsc2','time_serie_JJAS_30100_part1.eps'); 
     168fullfilename=[IRCAAM_OD,'time_serie_jjas_', df, '_part1.eps']; 
     169print('-depsc2',fullfilename); 
     170clear fullfilename; 
    72171figure(2); 
    73 print('-depsc2','time_serie_JJAS_30100_part2.eps'); 
     172fullfilename=[IRCAAM_OD,'time_serie_jjas_', df, '_part2.eps']; 
     173print('-depsc2',fullfilename); 
     174clear fullfilename; 
    74175figure(3); 
    75 print('-depsc2','time_serie_JJAS_30100_part3.eps'); 
     176fullfilename=[IRCAAM_OD,'time_serie_jjas_', df, '_part3.eps']; 
     177print('-depsc2',fullfilename); 
     178clear fullfilename; 
Note: See TracChangeset for help on using the changeset viewer.