Changeset 59 for trunk/src/mode_sahelien


Ignore:
Timestamp:
02/18/09 17:42:07 (15 years ago)
Author:
pinsard
Message:

add some try/catch on opening file for reading

Location:
trunk/src/mode_sahelien
Files:
10 edited

Legend:

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

    r56 r59  
    6464% 
    6565% $Id$ 
     66% 
     67% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     68% 
     69%   * add try/catch on opening file for reading 
    6670% 
    6771% - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    104108 
    105109fullfilename=[IRCAAM_ID,'eof_',df,'_jjas.mat']; 
    106 status=load(fullfilename,'C','L'); 
     110try 
     111 status=load(fullfilename,'C','L'); 
     112catch 
     113 error('eee : File %s not found\n', fullfilename); 
     114end 
     115 
    107116clear fullfilename; 
    108117 
  • trunk/src/mode_sahelien/carte_eof_ER_jjas_df.m

    r56 r59  
    6363% 
    6464% $Id$ 
     65% 
     66% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     67% 
     68%   * add try/catch on opening file for reading 
    6569% 
    6670% - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    99103 
    100104fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat']; 
    101 status=load(fullfilename,'C','L'); 
     105try 
     106 status=load(fullfilename,'C','L'); 
     107catch 
     108 error('eee : File %s not found\n', fullfilename); 
     109end 
     110 
    102111clear fullfilename; 
    103112 
  • trunk/src/mode_sahelien/composite_olr_eof_df.m

    r56 r59  
    5353% improve description 
    5454% 
    55 % improve file pb 
     55% improve file pb especialy ncload 
    5656% 
    5757% use return function 
     
    6565% 
    6666% $Id$ 
     67% 
     68% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     69% 
     70%   * add try/catch on opening file for reading 
    6771% 
    6872% - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    115119fullfilename=[IRCAAM_ID,'olr.day.mean.nc']; 
    116120ncload(fullfilename); 
     121 
    117122clear fullfilename; 
    118123 
     
    256261 
    257262fullfilename=[IRCAAM_ID,'eof',int2str(eof_num),'_',df,'.txt']; 
    258 status=load(fullfilename); 
     263try 
     264 status=load(fullfilename); 
     265catch 
     266 error('eee : File %s not found\n', fullfilename); 
     267end 
     268 
    259269clear fullfilename; 
    260270 
     
    454464 
    455465figure(1); 
    456 fullfilename=[IRCAAM_OD,'composite_olr_eof',int2str(eof_num),'_', df, _part1.eps']; 
     466fullfilename=[IRCAAM_OD,'composite_olr_eof',int2str(eof_num),'_', df, '_part1.eps']; 
    457467print('-depsc2',fullfilename); 
    458468clear fullfilename; 
  • trunk/src/mode_sahelien/composite_olr_phase_num.m

    r44 r59  
    5454% improve description 
    5555% 
    56 % improve file pb 
     56% improve file pb especialy ncload 
    5757% 
    5858% use return function 
     
    6868% 
    6969% $Id$ 
     70% 
     71% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     72% 
     73%   * add try/catch on opening file for reading 
    7074% 
    7175% - fplod 2009-01-28T10:38:44Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    97101fullfilename=[IRCAAM_ID,'olr.day.mean.nc']; 
    98102ncload(fullfilename); 
     103 
    99104clear fullfilename; 
    100105 
     
    245250 
    246251fullfilename=[IRCAAM_OD,'phase',int2str(phase_num),'.txt']; 
    247 status=load(fullfilename); 
     252try 
     253 status=load(fullfilename); 
     254catch 
     255 error('eee : File %s not found\n', fullfilename); 
     256end 
     257 
    248258clear fullfilename; 
    249259 
  • trunk/src/mode_sahelien/olr_eof_jjas2006_rossby_df.m

    r56 r59  
    5858% $Id$ 
    5959% 
     60% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     61% 
     62%   * add try/catch on opening file for reading 
    6063% 
    6164% - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    97100 
    98101fullfilename=[IRCAAM_ID,'olrfilernew7900jjas_',df,'.dat']; 
    99 fid=fopen(fullfilename); 
     102try 
     103 fid=fopen(fullfilename); 
     104catch 
     105 error('eee : File %s not found\n', fullfilename); 
     106end 
     107 
    100108clear fullfilename; 
    101109 
  • trunk/src/mode_sahelien/reconstitution_ER_rossby_df.m

    r56 r59  
    6060% $Id$ 
    6161% 
     62% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     63% 
     64%   * add try/catch on opening file for reading 
    6265% 
    6366% - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    99102 
    100103fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat']; 
    101 status=load(fullfilename,'C','olr'); 
     104try 
     105 status=load(fullfilename,'C','olr'); 
     106catch 
     107 error('eee : File %s not found\n', fullfilename); 
     108end 
     109 
    102110clear fullfilename; 
    103111 
  • trunk/src/mode_sahelien/time_serie_ER_rossby_df.m

    r56 r59  
    6060% $Id$ 
    6161% 
     62% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     63% 
     64%   * add try/catch on opening file for reading 
    6265% 
    6366% - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    9699 
    97100fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat']; 
    98 status=load(fullfilename,'C','olr'); 
     101try 
     102 status=load(fullfilename,'C','olr'); 
     103catch 
     104 error('eee : File %s not found\n', fullfilename); 
     105end 
     106 
    99107clear fullfilename; 
    100108C=status.C; 
  • trunk/src/mode_sahelien/time_serie_ER_rossby_df_complet.m

    r56 r59  
    5252% ========== 
    5353% 
     54% $Id$ 
     55% 
     56% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     57% 
     58%   * add try/catch on opening file for reading 
    5459% 
    5560% - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    97102 
    98103fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat']; 
    99 status=load(fullfilename,'C','olr'); 
     104try 
     105 status=load(fullfilename,'C','olr'); 
     106catch 
     107 error('eee : File %s not found\n', fullfilename); 
     108end 
     109 
    100110clear fullfilename; 
    101111C=status.C; 
  • trunk/src/mode_sahelien/time_serie_histog_phase_num.m

    r42 r59  
    5454% 
    5555% $Id$ 
     56% 
     57% 
     58% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     59% 
     60%   * add try/catch on opening file for reading 
    5661% 
    5762% - fplod 2009-01-28T09:01:45Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    8186 
    8287fullfilename=[IRCAAM_ID,'phase',int2str(phase_num),'.txt']; 
    83 status=load(fullfilename); 
     88try 
     89 status=load(fullfilename); 
     90catch 
     91 error('eee : File %s not found\n', fullfilename); 
     92end 
     93 
    8494clear fullfilename; 
    8595 
  • trunk/src/mode_sahelien/time_serie_jjas_df.m

    r56 r59  
    5959% $Id$ 
    6060% 
     61% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 
     62% 
     63%   * add try/catch on opening file for reading 
     64% 
    6165% - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin) 
    6266% 
     
    9498 
    9599fullfilename=[IRCAAM_ID,'eof_', df, '_jjas.mat']; 
    96 status=load(fullfilename); 
     100try 
     101 status=load(fullfilename); 
     102catch 
     103 error('eee : File %s not found\n', fullfilename); 
     104end 
     105 
    97106clear fullfilename; 
     107 
    98108C=status.C; 
    99109olr=status.olr; 
Note: See TracChangeset for help on using the changeset viewer.