Changeset 886
- Timestamp:
- Feb 15, 2005, 10:42:52 AM (20 years ago)
- Location:
- inundation/ga/storm_surge/pyvolution
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/test_util.py
r862 r886 390 390 fid = NetCDFFile(filename) 391 391 392 x = fid.variables['x'] 393 y = fid.variables['y'] 394 stage = fid.variables['stage'] 395 xmomentum = fid.variables['xmomentum'] 396 ymomentum = fid.variables['ymomentum'] 397 time = fid.variables['time'] 392 x = fid.variables['x'][:] 393 y = fid.variables['y'][:] 394 stage = fid.variables['stage'][:] 395 xmomentum = fid.variables['xmomentum'][:] 396 ymomentum = fid.variables['ymomentum'][:] 397 time = fid.variables['time'][:] 398 398 399 399 #Take stage vertex values at last timestep on diagonal … … 413 413 414 414 #And the midpoints are found now 415 Dx = take( x, [0,5,10,15])416 Dy = take( y, [0,5,10,15])415 Dx = take(reshape(x, (16,1)), [0,5,10,15]) 416 Dy = take(reshape(y, (16,1)), [0,5,10,15]) 417 417 418 418 diag = concatenate( (Dx, Dy), axis=1) 419 419 d_midpoints = (diag[1:] + diag[:-1])/2 420 420 421 421 #Let us see if the file function can find the correct 422 422 #values at the midpoints at the last timestep: -
inundation/ga/storm_surge/pyvolution/util.py
r881 r886 2 2 3 3 It is also a clearing house for function tat may later earn a module 4 of their own. 4 of their own. 5 5 """ 6 6 … … 245 245 y = reshape(y, (len(y),1)) 246 246 vertex_coordinates = concatenate((x,y), axis=1) #m x 2 array 247 247 248 248 interpol = Interpolation(vertex_coordinates, 249 249 triangles,
Note: See TracChangeset
for help on using the changeset viewer.