Ignore:
Timestamp:
07/23/09 10:48:16 (15 years ago)
Author:
smasson
Message:

minor adds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ReadWrite/ncdf_gettime.pro

    r396 r401  
    2525; procedure. It can be only '<pro>read_ncdf</pro>' or '<pro>scanfile</pro>'. 
    2626; 
     27; 
     28; @keyword CALTYPE 
     29; Used to specify (or orverwrite) the type of calendar that should be 
     30; used. We accept only 'noleap', '360d', 'greg' and 'gregorian'. By 
     31; default, we use the type of calendar defied in the attibute 
     32; calendar. if not, we define it as gregorian. 
     33; 
    2734; @keyword ERR 
    2835; Set this keyword to a named variable in which the value of the error 
     
    5360; $Id$ 
    5461;- 
    55 FUNCTION ncdf_gettime, filename, cdfid $ 
     62FUNCTION ncdf_gettime, filename, cdfid, CALTYPE = caltype $ 
    5663                       , TIMEVAR = timevar, CALLER = caller, ERR = err, _EXTRA = ex 
    5764; 
     
    140147; 
    141148  ncdf_getatt, cdfid, timeid, calendar = calendar, units = value 
     149  IF keyword_set(caltype) THEN calendar = strlowcase(caltype) 
    142150  CASE calendar OF 
    143151    'noleap':key_caltype = 'noleap' 
    144152    '360d':key_caltype = '360d' 
    145153    'greg':key_caltype = 'greg' 
     154    'gregorian':key_caltype = 'greg' 
     155    ELSE:BEGIN  
     156      dummy = report( ['unknow calendar type: '+calendar, 'we use gregorian calendar'] ) 
     157      key_caltype = 'greg' 
     158    END 
    146159  ENDCASE 
    147160;---------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.