source: trunk/anuga_core/demos/cairns/ExportResults.py @ 8947

Last change on this file since 8947 was 8728, checked in by steve, 12 years ago

Adding in usermanual and demos

File size: 1.1 KB
Line 
1import os
2import sys
3import project
4
5import anuga
6
7scenario = 'fixed_wave'
8name = 'cairns_' + scenario
9
10print 'output dir:', name
11which_var = 3
12
13if which_var == 0:    # Stage
14    outname = name + '_stage'
15    quantityname = 'stage'
16
17if which_var == 1:    # Absolute Momentum
18    outname = name + '_momentum'
19    quantityname = '(xmomentum**2 + ymomentum**2)**0.5'    #Absolute momentum
20
21if which_var == 2:    # Depth
22    outname = name + '_depth'
23    quantityname = 'stage-elevation'  #Depth
24
25if which_var == 3:    # Speed
26    outname = name + '_speed'
27    quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-30)'  #Speed
28
29if which_var == 4:    # Elevation
30    outname = name + '_elevation'
31    quantityname = 'elevation'  #Elevation
32
33print 'start sww2dem'
34
35anuga.sww2dem(name+'.sww',
36        outname+'.asc',
37        quantity=quantityname,
38        cellsize=100,     
39        easting_min=project.eastingmin,
40        easting_max=project.eastingmax,
41        northing_min=project.northingmin,
42        northing_max=project.northingmax,       
43        reduction=max, 
44        verbose=True)
Note: See TracBrowser for help on using the repository browser.