Rev | Line | |
---|
[2927] | 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 | |
---|
| 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' |
---|
| 18 | swwfile = project.outputdir + sep + 'Buildings_3662.sww' |
---|
| 19 | gauge_depth = Numeric.arrayrange(0, 700, 10) |
---|
| 20 | gauge_breadth = 100 |
---|
| 21 | gauge_locations = [] |
---|
| 22 | |
---|
| 23 | for GD in gauge_depth: |
---|
| 24 | gauge_location = [GD,gauge_breadth] |
---|
| 25 | gauge_locations.append(gauge_location) |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | quantities = ['stage','elevation'] |
---|
| 29 | gauges = file_function(swwfile, |
---|
| 30 | quantities = quantities, |
---|
| 31 | interpolation_points = gauge_locations, |
---|
| 32 | verbose = True, |
---|
| 33 | use_cache = True) |
---|
| 34 | |
---|
| 35 | times = [250] |
---|
| 36 | |
---|
| 37 | for 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.