Changeset 26096
- Timestamp:
- 03/15/21 02:42:09 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/io/loadvars.py
r26063 r26096 52 52 raise TypeError("Unrecognized input arguments.") 53 53 54 onlylast = True54 onlylast = False 55 55 56 56 for key, value in kwargs.items(): … … 89 89 if debug: 90 90 print(' ==== Now treating classtype {}'.format(mod)) 91 if np.size(classtree[mod]) > 1: 91 if mod not in classtree.keys(): 92 print("WARNING: {} classe is not in the model anymore and will be omited.".format(mod)) 93 elif np.size(classtree[mod]) > 1: 92 94 # this points to a subclass (results.TransientSolution for example) 93 95 curclass = NCFile.groups[classtree[mod][0]].groups[classtree[mod][1]] … … 115 117 nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]].steps.append(getattr(classtype[mod][1], 'solutionstep')()) 116 118 Tree = nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]][:] 117 print(nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]].steps[0])118 119 # }}} 119 120 elif classtype[mod][0] == 'massfluxatgate': #this is for output definitions {{{ … … 177 178 timelist = np.arange(0, len(NCFile.dimensions['Time'])) 178 179 for t in timelist: 180 print("filing step {} for {}".format(t, var)) 179 181 if vardim == 0: 180 182 Tree[t].__dict__[str(var)] = varval[:].data … … 337 339 if class_dict[classe][0] not in ['dict', 'list', 'cell']: 338 340 modulename = split(r'\.', class_dict[classe][0])[0] 339 class_dict[classe].append(__import__(modulename)) 340 class_tree[classe] = [group, ] 341 if modulename == "giaivins": 342 print("WARNING: module {} does not exist anymore and is skipped".format(modulename)) 343 else: 344 class_dict[classe].append(__import__(modulename)) 345 class_tree[classe] = [group, ] 341 346 except AttributeError: 342 347 print(('group {} is empty'.format(group)))
Note:
See TracChangeset
for help on using the changeset viewer.