source: development/momentum_sink/compare_sww.py @ 2378

Last change on this file since 2378 was 2369, checked in by duncan, 19 years ago

example of using file_function

File size: 696 bytes
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
7
8
9#swwfile = project.outputname + '.sww'
10swwfile = project.outputdir + sep  + 'friction_12330.sww'
11gauge_locations = [[10,10],[20,20]]
12
13quantities = ['stage']
14gauges = file_function(swwfile,
15                  quantities = quantities,
16                  interpolation_points = gauge_locations,
17                  verbose = True,
18                  use_cache = True)
19
20times = [0,1,2,3,4]
21
22for 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.