Last change
on this file since 2395 was
2395,
checked in by nicholas, 19 years ago
|
Updated compare_sww.py. Increased distance of rear boundary and changed to dirichlet
|
File size:
1.0 KB
|
Line | |
---|
1 | """Read in sww file, interpolate at specified locations and times |
---|
2 | """ |
---|
3 | |
---|
4 | from os import sep |
---|
5 | import project |
---|
6 | from pyvolution.util import file_function |
---|
7 | import Numeric |
---|
8 | #from friction_block #import test |
---|
9 | |
---|
10 | #print "test", test |
---|
11 | #import sys |
---|
12 | #sys.exit() |
---|
13 | |
---|
14 | |
---|
15 | #swwfile = project.outputname + '.sww' |
---|
16 | #swwfile = project.outputdir + sep + 'FrictionBlock_0.01_3.sww' |
---|
17 | swwfile = project.outputdir + sep + 'Buildings_3662.sww' |
---|
18 | gauge_depth = Numeric.arrayrange(0, 700, 20) |
---|
19 | gauge_breadth = 100 |
---|
20 | gauge_locations = [] |
---|
21 | |
---|
22 | for GD in gauge_depth: |
---|
23 | gauge_location = [GD,gauge_breadth] |
---|
24 | gauge_locations.append(gauge_location) |
---|
25 | |
---|
26 | quantities = ['stage','elevation','xmomentum'] |
---|
27 | gauges = file_function(swwfile, |
---|
28 | quantities = quantities, |
---|
29 | interpolation_points = gauge_locations, |
---|
30 | verbose = True, |
---|
31 | use_cache = True) |
---|
32 | |
---|
33 | times = [150,500] |
---|
34 | |
---|
35 | for gauge, _ in enumerate(gauge_locations): |
---|
36 | print "gauge", gauge |
---|
37 | for time in times: |
---|
38 | print "results ", gauges(time, gauge) |
---|
Note: See
TracBrowser
for help on using the repository browser.