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

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

update to export_results script for Hobart

File size: 2.0 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# OLE - this is the smallest sww file with the complex bounding polygon
9time_dir = '20060928_073318' #alpha = 0.5
10
11#time_dir = '20060928_064732' #alpha = 0.01
12#time_dir = '20060928_220905' #alpha = 1.0
13#time_dir = '20060926_064750' #this worked for cellsize 30 and 100
14#time_dir = '20060929_033100' #alpha = 0.01 poly anticlockwise - DIDN'T WORK
15#time_dir = '20060929_075954' #alpha = 0.1 grid with MOST
16#time_dir = '20060929_075009' #alpha = 0.1 points with MOST
17directory = project.outputdir
18name = directory + time_dir +sep + 'source'
19
20print 'output dir:', name
21#print 'Which variable do you want to export?'
22#which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3  '  ))
23which_var = 4
24if which_var == 0:  # Stage
25    outname = name + '_stage'
26    quantityname = 'stage'
27
28if which_var == 1:  # Absolute Momentum
29    outname = name + '_momentum'
30    quantityname = '(xmomentum**2 + ymomentum**2)**0.5'  #Absolute momentum
31
32if which_var == 2:  # Depth
33    outname = name + '_depth'
34    quantityname = 'stage-elevation'  #Depth
35
36if which_var == 3:  # Speed
37    outname = name + '_speed'
38    quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-30)'  #Speed
39
40if which_var == 4:  # Elevation
41    outname = name + '_elevation_2'
42    quantityname = 'elevation'  #Elevation
43
44print 'start sww2dem'
45sww2dem(name, basename_out = outname,
46            quantity = quantityname,
47            cellsize = 500,      # would prefer this at 25
48            # define region for viz purposes
49            #easting_min = project.e_min_area,
50            #easting_max = project.e_max_area,
51            #northing_min = project.n_min_area,
52            #northing_max = project.n_max_area,       
53            reduction = max, #this is because we want max quantityname
54            verbose = True,
55            format = 'asc')
56
Note: See TracBrowser for help on using the repository browser.