source: anuga_work/production/sydney_2006/export_results.py @ 4314

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

update slide modelling parameters

File size: 2.6 KB
Line 
1import project_slide, os
2import sys
3
4from anuga.shallow_water.data_manager import sww2dem
5from os import sep
6
7#time_dir = '20061211_071516' #bulli
8#time_dir = '20061212_012705' #shovel
9#time_dir = '20061212_064807' #yacaaba
10# correct depths
11#time_dir = '20070121_213509' #shovel
12#time_dir = '20070119_055222' #yacaaba
13#time_dir = '20070121_213444' #bulli
14#corrected yacaaba and birubi
15time_dir = '20070322_035214' # yacaaba
16#time_dir = '20070322_035135' # birubi
17
18directory = project_slide.outputdir
19name = directory + time_dir + sep + project_slide.basename
20#name = 'test500000.035000'
21#name = 'test'
22
23is_parallel = False
24if is_parallel == True: nodes = 4
25print 'output dir:', name
26
27which_var = 0
28if which_var == 0:  # Stage
29    outname = name + '_stage-eq-thurs-test'
30    quantityname = 'stage'
31
32if which_var == 1:  # Absolute Momentum
33    outname = name + '_momentum_i1'
34    quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 
35
36if which_var == 2:  # Depth
37    outname = name + '_depth-yacaaba'
38    quantityname = 'stage-elevation' 
39
40if which_var == 3:  # Speed
41    outname = name + '_speed_i0'
42    #quantityname = '((xmomentum/(stage-elevation))**2 + (ymomentum/(stage-elevation))**2)**0.5'  #Speed
43    quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-30)'  #Speed
44
45if which_var == 4:  # Elevation
46    outname = name + '_elevation'
47    quantityname = 'elevation'  #Elevation
48
49if is_parallel == True:
50    for i in range(0,nodes):
51        namei = name + '_P%d_%d' %(i,nodes)
52        outnamei = outname + '_P%d_%d' %(i,nodes)
53        print 'start sww2dem for sww file %d' %(i)
54        sww2dem(namei, basename_out = outnamei,
55                    quantity = quantityname,
56                    timestep = 1,
57                    cellsize = 100,     
58                    #easting_min = project.e_min_area,
59                    #easting_max = project.e_max_area,
60                    #northing_min = project.n_min_area,
61                    #northing_max = project.n_max_area,       
62                    reduction = max, 
63                    verbose = True,
64                    format = 'asc')
65else:
66    print 'start sww2dem'
67    sww2dem(name, basename_out = outname,
68                quantity = quantityname,
69                timestep = 0,
70                cellsize = 50,     
71                easting_min = project_slide.eastingmin,
72                easting_max = project_slide.eastingmax,
73                northing_min = project_slide.northingmin,
74                northing_max = project_slide.northingmax,       
75                reduction = max, 
76                verbose = True,
77                format = 'asc')
Note: See TracBrowser for help on using the repository browser.