Changeset 21259


Ignore:
Timestamp:
10/12/16 06:37:54 (8 years ago)
Author:
bdef
Message:

BUG:fixing bug introduced for the step indexing

File:
1 edited

Legend:

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

    r21258 r21259  
    44from netCDF4 import Dataset
    55from netCDF4 import chartostring
     6from re import findall
    67from os import path
    78from whichdb import whichdb
     
    8990                                if classtype[mod][0]=='list':
    9091                                        keylist=[key for key in curclass.groups]
    91                                         steplist=[int(key) for key in curclass.groups]
     92                                        try:
     93                                                steplist=[int(key) for key in curclass.groups]
     94                                        except ValueError:
     95                                                steplist=[int(findall(r'\d+',key)[0]) for key in keylist]
    9296                                        indexlist=[index*(len(curclass.groups)-1)/max(steplist) for index in steplist]
    9397                                        listtype=curclass.groups[keylist[0]].classtype
Note: See TracChangeset for help on using the changeset viewer.