Changeset 1819
- Timestamp:
- Sep 12, 2005, 4:50:54 PM (19 years ago)
- Location:
- inundation/pyvolution
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/least_squares.py
r1814 r1819 979 979 980 980 # 981 self.interpolation_points = interpolation_points #FIXWME Needed?981 self.interpolation_points = interpolation_points 982 982 self.T = time[:] #Time assumed to be relative to starttime 983 983 self.index = 0 #Initial time index … … 1015 1015 verbose = verbose) 1016 1016 1017 #if interpol.cropped_points is True:1018 # raise 'Some interpolation points were outside mesh'1019 #FIXME: This will be raised if triangles are listed as1020 #discontinuous even though there is no need to stop1021 #(precrop = True above)1022 1023 1017 if verbose: print 'Interpolate' 1024 1018 for i, t in enumerate(self.T): … … 1031 1025 #Report 1032 1026 if verbose: 1027 #FIXME: Move to e.g. __repr__ 1033 1028 x = vertex_coordinates[:,0] 1034 1029 y = vertex_coordinates[:,1] -
inundation/pyvolution/util.py
r1758 r1819 214 214 215 215 if quantity_names is None or len(quantity_names) < 1: 216 #Get quantities from file 216 #If no quantities are specified get quantities from file 217 #x, y, time are assumed as the independent variables so 218 #they are excluded as potentiol quantities 217 219 quantity_names = [] 218 220 for name in fid.variables.keys(): 219 221 if name not in ['x', 'y', 'time']: 220 222 quantity_names.append(name) 221 222 #msg = 'ERROR: At least one independent value must be specified' 223 #raise msg 224 223 224 if len(quantity_names) < 1: 225 msg = 'ERROR: At least one independent value must be specified' 226 raise msg 227 228 229 #Now assert that requested quantitites (and the independent ones) 230 #are present in file 225 231 missing = [] 226 227 for quantity in ['time'] + quantity_names: 232 for quantity in ['time'] + quantity_names: #FIXME: Add x, y back 228 233 if not fid.variables.has_key(quantity): 229 234 missing.append(quantity)
Note: See TracChangeset
for help on using the changeset viewer.