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
RevLine 
[3615]1import project, os
2import sys
3
[3650]4from anuga.shallow_water.data_manager import sww2dem
[3661]5from anuga.abstract_2d_finite_volumes.util import Screen_Catcher
[3615]6from os import sep
7
[3680]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
[3674]12#time_dir = '20060928_220905' #alpha = 1.0
[3675]13#time_dir = '20060926_064750' #this worked for cellsize 30 and 100
[3680]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
[3615]17directory = project.outputdir
[3661]18name = directory + time_dir +sep + 'source'
[3615]19
[3661]20print 'output dir:', name
[3615]21#print 'Which variable do you want to export?'
22#which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3  '  ))
[3661]23which_var = 4
[3615]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
[3675]41    outname = name + '_elevation_2'
[3615]42    quantityname = 'elevation'  #Elevation
43
[3661]44print 'start sww2dem'
[3615]45sww2dem(name, basename_out = outname,
46            quantity = quantityname,
[3680]47            cellsize = 500,      # would prefer this at 25
[3615]48            # define region for viz purposes
[3680]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,       
[3615]53            reduction = max, #this is because we want max quantityname
54            verbose = True,
55            format = 'asc')
[3661]56
Note: See TracBrowser for help on using the repository browser.