source: anuga_work/production/broome_2006/export_results.py @ 3944

Last change on this file since 3944 was 3944, checked in by sexton, 17 years ago

(i) update sww2timeseries so can handle gauges which don't fall within sww domain (ii) script for generating report for dampier based on sww files from parallel setup

File size: 1.5 KB
Line 
1import project, os
2import sys
3
4from anuga.shallow_water.data_manager import sww2dem
5from anuga.abstract_2d_finite_volumes.util import Screen_Catcher
6from os import sep
7
8time_dir = '20061101_024119' 
9
10directory = project.outputdir
11name = directory + time_dir +sep + 'source'
12
13print 'output dir:', name
14which_var = 4
15if which_var == 0:  # Stage
16    outname = name + '_stage'
17    quantityname = 'stage'
18
19if which_var == 1:  # Absolute Momentum
20    outname = name + '_momentum'
21    quantityname = '(xmomentum**2 + ymomentum**2)**0.5'  #Absolute momentum
22
23if which_var == 2:  # Depth
24    outname = name + '_depth'
25    quantityname = 'stage-elevation'  #Depth
26
27if which_var == 3:  # Speed
28    outname = name + '_speed'
29    quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-30)'  #Speed
30
31if which_var == 4:  # Elevation
32    outname = name + '_elevation'
33    quantityname = 'elevation'  #Elevation
34
35print 'start sww2dem'
36
37sww2dem(name, basename_out = outname,
38            quantity = quantityname,
39            cellsize = 100,      # would prefer this at 25
40            # define region for viz purposes
41            easting_min = project.eastingmin,
42            easting_max = project.eastingmax,
43            northing_min = project.northingmin,
44            northing_max = project.northingmax,       
45            reduction = max, #this is because we want max quantityname
46            verbose = True,
47            format = 'asc')
48
Note: See TracBrowser for help on using the repository browser.