Ignore:
Timestamp:
09/20/16 20:15:00 (8 years ago)
Author:
smasson
Message:

set of bugfixes...

File:
1 edited

Legend:

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

    r495 r501  
    5858; if this attribute does not exist. 
    5959; 
     60; @keyword interval_operation 
     61; Set this keyword to a named variable in which the value of 
     62; interval_operation is returned. Return -1 if this attribute 
     63; does not exist. 
     64; 
    6065; @keyword _EXTRA 
    6166; defined only to be able to call <pro>ncdf_getatt</pro> with the 
     
    7681                 , MISSING_VALUE = missing_value, UNITS = units, CALENDAR = calendar $ 
    7782                 , LONG_NAME = long_name, STANDARD_NAME = standard_name, DOUBLE = double $ 
    78                  , _extra = ex 
     83                 , INTERVAL_OPERATION = interval_operation, _extra = ex 
    7984; 
    8085  compile_opt idl2, strictarrsubs 
     
    9499  long_name = '' 
    95100  standard_name = '' 
     101  interval_operation = -1 
    96102; 
    97103  varinq = ncdf_varinq(cdfid, varid) 
     
    136142        '_fillvalue':ncdf_attget, cdfid, varid, attname, missing_value 
    137143        'missing_value':ncdf_attget, cdfid, varid, attname, missing_value 
     144        'interval_operation':BEGIN 
     145          ncdf_attget, cdfid, varid, attname, tmp 
     146          tmp = string(tmp) 
     147          interval_operation = fix(strmid(tmp,0,strpos(tmp,' '))) 
     148        END 
    138149        ELSE: 
    139150      ENDCASE 
     
    148159      missing_value = tmp 
    149160    ENDIF ELSE BEGIN 
    150       ras = report('Warning: missing value is not a number: ' + missing_value) 
    151       missing_value = 'no' 
     161      ;; ras = report('Warning: missing value is not a number: ' + missing_value) 
     162      ;; missing_value = 'no' 
     163      missing_value = (byte(strlowcase(a)))[0] 
    152164    ENDELSE 
    153165  ENDIF 
Note: See TracChangeset for help on using the changeset viewer.