Last change
on this file since 6971 was
3514,
checked in by duncan, 19 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 | |
---|
4 | from os import sep |
---|
5 | import project |
---|
6 | from anuga.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.