source: anuga_work/development/boxingday08/export_results_GA.py @ 5603

Last change on this file since 5603 was 5603, checked in by kristy, 14 years ago

export_results_GA.py is designed so that we are able to export DEM from SWW files here at GA.

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