Changeset 334


Ignore:
Timestamp:
03/07/08 15:39:18 (16 years ago)
Author:
smasson
Message:

add long_name and short_name in ncdf_getatt

File:
1 edited

Legend:

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

    r327 r334  
    4444; doesn't exist. 
    4545; 
     46; @keyword long_name 
     47; Set this keyword to a named variable in which the value of 
     48; long_name is returned. Return empty string if this attribute 
     49; does not exist. 
     50; 
     51; @keyword standard_name 
     52; Set this keyword to a named variable in which the value of 
     53; standard_name (CF convention) is returned. Return empty string  
     54; if this attribute does not exist. 
     55; 
    4656; @examples 
    4757; IDL> ncdf_getatt, cdfid, 'sst', add_offset = add_offset, scale_factor = scale_factor, units = units 
     
    5464; 
    5565;- 
    56 PRO ncdf_getatt, fileid, varid, add_offset=add_offset $ 
    57                , scale_factor=scale_factor, missing_value=missing_value $ 
    58                , units=units, calendar=calendar 
     66PRO ncdf_getatt, fileid, varid, add_offset = add_offset, scale_factor = scale_factor $ 
     67                 , missing_value = missing_value, units = units, calendar = calendar $ 
     68                 , long_name = long_name, standard_name = standard_name 
    5969; 
    6070  compile_opt idl2, strictarrsubs 
     
    6878  missing_value = 'no' 
    6979  calendar = 'greg' 
     80  long_name = '' 
     81  standard_name = '' 
    7082;  
    7183  varinq = ncdf_varinq(cdfid, varid) 
     
    90102            END 
    91103          ENDCASE 
     104        END 
     105        'long_name':BEGIN 
     106           ncdf_attget, cdfid, varid, attname, tmp 
     107           long_name = strtrim(tmp, 2)            
     108        END 
     109        'standard_name':BEGIN 
     110           ncdf_attget, cdfid, varid, attname, tmp 
     111           standard_name = strtrim(tmp, 2)            
    92112        END 
    93113        'add_offset':ncdf_attget, cdfid, varid, attname, add_offset 
Note: See TracChangeset for help on using the changeset viewer.