Changeset 23719
- Timestamp:
- 02/13/19 04:45:30 (6 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/organizer.py
r23716 r23719 6 6 from savevars import savevars 7 7 from model import model 8 from dbm.ndbm import whichdb 8 #hack to keep python 2 compatipility 9 try: 10 #py3 import 11 from dbm.ndbm import whichdb 12 except ImportError: 13 #py2 import 14 from whichdb import whichdb 15 9 16 import MatlabFuncs as m 10 17 … … 55 62 #Get steps 56 63 self.requestedsteps=options.getfieldvalue('steps',[0]) 57 64 58 65 #Get trunk prefix (only if provided by user) 59 66 if options.exist('trunkprefix'): … … 131 138 raise TypeError("Step provided should not have any white space") 132 139 if self._currentstep>0 and string in [step['string'] for step in self.steps]: 133 raise RuntimeError("Step '%s' already present. Change name" % string) 140 raise RuntimeError("Step '%s' already present. Change name" % string) 134 141 135 142 #Add step … … 139 146 self._currentstep+=1 140 147 141 #if requestedsteps = 0, print all steps in self 148 #if requestedsteps = 0, print all steps in self 142 149 if 0 in self.requestedsteps: 143 150 if self._currentstep==1: -
issm/trunk-jpl/src/m/io/loadmodel.py
r23716 r23719 1 1 from loadvars import loadvars 2 from dbm.ndbm import whichdb 2 #hack to keep python 2 compatipility 3 try: 4 #py3 import 5 from dbm.ndbm import whichdb 6 except ImportError: 7 #py2 import 8 from whichdb import whichdb 3 9 from netCDF4 import Dataset 4 10 … … 8 14 9 15 check that model prototype has not changed. if so, adapt to new model prototype. 10 16 11 17 Usage: 12 18 md=loadmodel(path) -
issm/trunk-jpl/src/m/io/loadvars.py
r23716 r23719 7 7 from os import path 8 8 from collections import OrderedDict 9 from dbm.ndbm import whichdb10 9 from model import * 10 #hack to keep python 2 compatipility 11 try: 12 #py3 import 13 from dbm.ndbm import whichdb 14 except ImportError: 15 #py2 import 16 from whichdb import whichdb 11 17 12 18 def loadvars(*args):
Note:
See TracChangeset
for help on using the changeset viewer.