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

Last change on this file since 5708 was 5707, checked in by kristy, 16 years ago

one or many sww files

File size: 1.7 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
8name = home + 'anuga_validation/boxing_day_sceanario/anuga/outputs/20080825/good_polyline20080825_130706_0.8' 
9
10
11##output_dir = home + 'anuga_validation/boxing_day_sceanario/anuga/outputs/20080813/good_polyline20080813_'
12##
13##name1= output_dir +'101348_0.45'
14##name2= output_dir +'101521_0.55'
15##name3= output_dir +'101610_0.35'
16##name4= output_dir +'101741_0.25'
17##name5= output_dir +'101819_0.15'
18##
19##names= [name1, name2, name3, name4, name5]
20##
21##for the_name in names:
22##
23##    name = the_name[-11:]
24##    print 'sww filename', name
25
26
27bay_west = 417348.0
28bay_east = 425656.0
29bay_south = 870565.0
30bay_north = 877008.0
31
32which_var = 2
33
34if which_var == 0:  # Stage
35    outname = name + '_stage-eq-thurs-test'
36    quantityname = 'stage'
37
38if which_var == 1:  # Absolute Momentum
39    outname = name + '_momentum_i1'
40    quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 
41
42if which_var == 2:  # Depth
43    outname = name + '_depth'
44    quantityname = 'stage-elevation' 
45
46if which_var == 3:  # Speed
47    outname = name + '_speed_i0'
48    quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))'  #Speed
49
50if which_var == 4:  # Elevation
51    outname = name + '_elevation'
52    quantityname = 'elevation'  #Elevation
53
54print 'start sww2dem'
55sww2dem(name, basename_out = outname,
56        quantity = quantityname,
57        cellsize = 20,
58        easting_min = bay_west,
59        easting_max = bay_east,
60        northing_min = bay_south,
61        northing_max = bay_north,   
62        reduction = max, 
63        verbose = True,
64        format = 'asc')
Note: See TracBrowser for help on using the repository browser.