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

Last change on this file since 4219 was 4063, checked in by sexton, 18 years ago

updates for nsw slide modelling and cairns demo

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