source: development/momentum_sink/scripts/compare_sww.py @ 2927

Last change on this file since 2927 was 2927, checked in by nicholas, 18 years ago

final update of all relavent data

File size: 1.0 KB
Line 
1"""Read in sww file, interpolate at specified locations and  times
2"""
3
4from os import sep
5import project
6from pyvolution.util import file_function
7import Numeric
8
9#from friction_block #import test
10
11#print "test", test
12#import sys
13#sys.exit()
14
15
16#swwfile = project.outputname + '.sww'
17#swwfile = project.outputdir + sep  + 'FrictionBlock_0.01_3.sww'
18swwfile = project.outputdir + sep  + 'Buildings_3662.sww'
19gauge_depth = Numeric.arrayrange(0, 700, 10)
20gauge_breadth = 100
21gauge_locations = []
22
23for GD in gauge_depth:
24    gauge_location = [GD,gauge_breadth]
25    gauge_locations.append(gauge_location)
26   
27
28quantities = ['stage','elevation']
29gauges = file_function(swwfile,
30                  quantities = quantities,
31                  interpolation_points = gauge_locations,
32                  verbose = True,
33                  use_cache = True)
34
35times = [250]
36
37for gauge, _ in enumerate(gauge_locations):
38    print "gauge", gauge
39    for time in times:
40        print "results ", gauges(time, gauge)
Note: See TracBrowser for help on using the repository browser.