Changeset 21236


Ignore:
Timestamp:
09/28/16 08:24:17 (8 years ago)
Author:
bdef
Message:

BUG:sorting a few bugs, now able to run from netCDF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/io/loadvars.py

    r21235 r21236  
    121121                                                if varval.dtype==str:
    122122                                                        if varval.shape==1:
    123                                                                 Tree.__dict__[str(var)]=varval[0]
     123                                                                Tree.__dict__[str(var)]=str(varval[0])
    124124                                                        if 'True' in varval[:] or 'False' in varval[:]:
    125125                                                                Tree.__dict__[str(var)]=np.asarray(varval[:],dtype=bool)
     
    150150                                for attr in curclass.ncattrs():
    151151                                        #print('    treating {}'.format(attr))
    152                                         if classtree[mod][0]!='results': #no attributes in results
    153                                                 Tree.__dict__[str(attr)]=curclass.getncattr(attr)
     152                                        if classtree[mod][0]!='results' and attr!='classtype': #no attributes in results
     153                                                Tree.__dict__[str(attr)]=str(curclass.getncattr(attr))
    154154                                                if curclass.getncattr(attr)=='True':
    155155                                                        Tree.__dict__[str(attr)]=True
Note: See TracChangeset for help on using the changeset viewer.