Ignore:
Timestamp:
10/05/14 20:19:07 (6 years ago)
Author:
mjuckes
Message:

added option to use dtype instead of datatype in netcdf4 module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CCCC/trunk/file_utils.py

    r148 r153  
    158158        for k in self.nc.variables[v].ncattrs(): 
    159159          self.da[v][k] = self.nc.variables[v].getncattr(k) 
    160         self.da[v]['_type'] = str( self.nc.variables[v].datatype ) 
     160        try: 
     161          self.da[v]['_type'] = str( self.nc.variables[v].dtype ) 
     162        except: 
     163          self.da[v]['_type'] = str( self.nc.variables[v].datatype ) 
     164 
    161165        self.da[v]['_data'] = self.nc.variables[v][:].tolist() 
    162166      else: 
Note: See TracChangeset for help on using the changeset viewer.