Changeset 154


Ignore:
Timestamp:
10/05/14 20:20:38 (5 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

    r153 r154  
    149149        for k in self.nc.variables[v].ncattrs(): 
    150150          self.va[v][k] = self.nc.variables[v].getncattr(k) 
    151         self.va[v]['_type'] = str( self.nc.variables[v].datatype ) 
     151        try: 
     152          self.va[v]['_type'] = str( self.nc.variables[v].dtype ) 
     153        except: 
     154          self.va[v]['_type'] = str( self.nc.variables[v].datatype ) 
    152155        if v in ['plev','plev_bnds','height']: 
    153156          self.va[v]['_data'] = self.nc.variables[v][:].tolist() 
Note: See TracChangeset for help on using the changeset viewer.