source: anuga_work/production/hobart_2006/export_results.py @ 5212

Last change on this file since 5212 was 4347, checked in by sexton, 17 years ago

update export_results script with updates calculation for speed

File size: 2.7 KB
Line 
1import project, os
2import sys
3
4from anuga.shallow_water.data_manager import sww2dem
5from anuga.abstract_2d_finite_volumes.util import Screen_Catcher
6from os import sep
7
8#time_dir = '20061006_062319' # Mw 8-5
9#time_dir = '20061008_234702' # Mw 8-7
10time_dir = '20061022_224422' # Mw 8-7
11
12directory = project.outputdir
13name = directory + time_dir +sep + 'source'
14
15print 'output dir:', name
16which_var = 2
17if which_var == 0:  # Stage
18    outname = name + '_stage'
19    quantityname = 'stage'
20
21if which_var == 1:  # Absolute Momentum
22    outname = name + '_momentum'
23    quantityname = '(xmomentum**2 + ymomentum**2)**0.5'  #Absolute momentum
24
25if which_var == 2:  # Depth
26    outname = name + '_depth_bruny'
27    quantityname = 'stage-elevation'  #Depth
28
29if which_var == 3:  # Speed
30    outname = name + '_speed'
31    quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))'  #Speed
32
33if which_var == 4:  # Elevation
34    outname = name + '_elevation'
35    quantityname = 'elevation'  #Elevation
36
37print 'start sww2dem'
38# for hobart
39##sww2dem(name, basename_out = outname,
40##            quantity = quantityname,
41##            cellsize = 25,      # would prefer this at 25
42##            # define region for viz purposes
43##            easting_min = project.eastingmin25,
44##            easting_max = project.eastingmax25,
45##            northing_min = project.northingmin25,
46##            northing_max = project.northingmax25,       
47##            reduction = max, #this is because we want max quantityname
48##            verbose = True,
49##            format = 'asc')
50
51### for bruny
52##sww2dem(name, basename_out = outname,
53##            quantity = quantityname,
54##            cellsize = 25,      # would prefer this at 25
55##            # define region for viz purposes
56##            easting_min = project.eastingmin25_2,
57##            easting_max = project.eastingmax25_2,
58##            northing_min = project.northingmin25_2,
59##            northing_max = project.northingmax25_2,       
60##            reduction = max, #this is because we want max quantityname
61##            verbose = True,
62##            format = 'asc')
63
64# for fixed timestep
65sww2dem(name, basename_out = outname,
66            quantity = quantityname,
67            cellsize = 10,      # would prefer this at 25
68            # define region for viz purposes
69            easting_min = project.eastingmin25_2,
70            easting_max = project.eastingmax25_2,
71            northing_min = project.northingmin25_2,
72            northing_max = project.northingmax25_2,       
73            #reduction = max, #this is because we want max quantityname
74            verbose = True,
75            format = 'asc')
76
Note: See TracBrowser for help on using the repository browser.