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 | |
---|
8 | |
---|
9 | #swwfile = project.outputname + '.sww' |
---|
10 | swwfile = project.outputdir + sep + 'friction_12330.sww' |
---|
11 | gauge_locations = [[10,10],[20,20]] |
---|
12 | |
---|
13 | quantities = ['stage'] |
---|
14 | gauges = file_function(swwfile, |
---|
15 | quantities = quantities, |
---|
16 | interpolation_points = gauge_locations, |
---|
17 | verbose = True, |
---|
18 | use_cache = True) |
---|
19 | |
---|
20 | times = [0,1,2,3,4] |
---|
21 | |
---|
22 | for gauge, _ in enumerate(gauge_locations): |
---|
23 | print "gauge", gauge |
---|
24 | for time in times: |
---|
25 | print "results ", gauges(time, gauge) |
---|
Note: See
TracBrowser
for help on using the repository browser.