"""Read in sww file, interpolate at specified locations and times """ from os import sep import project from pyvolution.util import file_function import Numeric #from friction_block #import test #print "test", test #import sys #sys.exit() #swwfile = project.outputname + '.sww' #swwfile = project.outputdir + sep + 'FrictionBlock_0.01_3.sww' swwfile = project.outputdir + sep + 'Buildings_3662.sww' gauge_depth = Numeric.arrayrange(0, 700, 10) gauge_breadth = 100 gauge_locations = [] for GD in gauge_depth: gauge_location = [GD,gauge_breadth] gauge_locations.append(gauge_location) quantities = ['stage','elevation'] gauges = file_function(swwfile, quantities = quantities, interpolation_points = gauge_locations, verbose = True, use_cache = True) times = [250] for gauge, _ in enumerate(gauge_locations): print "gauge", gauge for time in times: print "results ", gauges(time, gauge)