source: anuga_work/development/boxingday08/export_results.py @ 5404

Last change on this file since 5404 was 5404, checked in by ole, 16 years ago

Fixed clipping of polygons.
Updated polygon files
Played with resolutions.

File size: 1.3 KB
Line 
1
2import sys
3
4from anuga.shallow_water.data_manager import sww2dem
5from os import sep
6import project
7
8#name='good_simulation/good_simulation_polylinefriction20080529_115703'
9#name='good_simulation/good_simulation_ursfriction20080529_160110'
10name='good_simulation/good_simulationsourcefriction20080529_160144'
11
12print 'output dir:', name
13
14which_var = 2
15if which_var == 0:  # Stage
16    outname = name + '_stage-eq-thurs-test'
17    quantityname = 'stage'
18
19if which_var == 1:  # Absolute Momentum
20    outname = name + '_momentum_i1'
21    quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 
22
23if which_var == 2:  # Depth
24    outname = name + '_depth'
25    quantityname = 'stage-elevation' 
26
27if which_var == 3:  # Speed
28    outname = name + '_speed_i0'
29    quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))'  #Speed
30
31if which_var == 4:  # Elevation
32    outname = name + '_elevation'
33    quantityname = 'elevation'  #Elevation
34
35print 'start sww2dem'
36sww2dem(name, basename_out = outname,
37        quantity = quantityname,
38        cellsize = 20,
39        easting_min = project.bay_west,
40        easting_max = project.bay_east,
41        northing_min = project.bay_south,
42        northing_max = project.bay_borth,   
43        reduction = max, 
44        verbose = True,
45        format = 'asc')
Note: See TracBrowser for help on using the repository browser.