source: anuga_work/development/momentum_sink/scripts/compare_sww.py @ 5587

Last change on this file since 5587 was 3514, checked in by duncan, 18 years ago

Hi all,
I'm doing a change in the anuga structure, moving the code to

\anuga_core\source\anuga

After you have done an svn update, the PYTHONPATH has to be changed to;
PYTHONPATH = anuga_core/source/

This is part of changes required to make installation of anuga quicker and reducing the size of our sandpits.

If any imports are broken, try fixing them. With adding anuga. to them for example. If this seems to have really broken things, email/phone me.

Cheers
Duncan

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 anuga.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.