Changeset 401 for trunk


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

minor adds

Location:
trunk/SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Postscript/printps.pro

    r397 r401  
    267267;------------------------------------------------------------ 
    268268  nameps = find(nameps+'{.ps,}{.gz,}', iodir = psdir, /nopro) 
     269  nameps = nameps[0] 
    269270  IF nameps EQ 'NOT FOUND' THEN BEGIN 
    270271    ng = report('file '+nameps+'[.ps][.gz] does not exist ') 
     
    274275; if the file is gzipped we call gunzip and change its name 
    275276  IF gzipped NE -1 AND NOT keyword_set(archive) THEN BEGIN 
    276     spawn, '\gunzip ' + nameps 
     277    spawn, '\gunzip -f ' + nameps 
    277278    nameps = strmid(nameps, 0, gzipped) 
    278279  ENDIF 
  • 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.