Changeset 7452 for anuga_core/source/anuga/visualiser/offline.py
- Timestamp:
- Sep 1, 2009, 10:29:19 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/visualiser/offline.py
r4325 r7452 1 from Numeric import array, Float, ravel, zeros 1 #from Numeric import array, Float, ravel, zeros 2 import numpy as num 2 3 from Scientific.IO.NetCDF import NetCDFFile 3 4 from Tkinter import Button, E, Tk, W, Label, StringVar, Scale, HORIZONTAL … … 80 81 else: 81 82 N_vert = len(fin.variables[quantityName]) 82 x = ravel(array(fin.variables['x'], Float))83 y = ravel(array(fin.variables['y'], Float))83 x = num.ravel(num.array(fin.variables['x'], num.float)) 84 y = num.ravel(num.array(fin.variables['y'], num.float)) 84 85 if dynamic is True: 85 q = array(fin.variables[quantityName][frameNumber], Float)86 else: 87 q = ravel(array(fin.variables[quantityName], Float))86 q = num.array(fin.variables[quantityName][frameNumber], num.float) 87 else: 88 q = num.ravel(num.array(fin.variables[quantityName], num.float)) 88 89 89 90 q *= self.height_zScales[quantityName] … … 123 124 for q in filter(lambda n:n != 'x' and n != 'y' and n != 'z' and n != 'time' and n != 'volumes', fin.variables.keys()): 124 125 if len(fin.variables[q].shape) == 1: # Not a time-varying quantity 125 quantities[q] = ravel(array(fin.variables[q], Float))126 quantities[q] = num.ravel(num.array(fin.variables[q], num.float)) 126 127 else: # Time-varying, get the current timestep data 127 quantities[q] = array(fin.variables[q][self.frameNumber], Float)128 quantities[q] = num.array(fin.variables[q][self.frameNumber], num.float) 128 129 fin.close() 129 130 return quantities
Note: See TracChangeset
for help on using the changeset viewer.