source: anuga_core/documentation/user_manual/demos/cairns/ExportResults.py @ 7064

Last change on this file since 7064 was 7064, checked in by rwilson, 11 years ago

Fiddling with layout of user guide.

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