source: anuga_work/production/wollongong_2006/export_results.py @ 4294

Last change on this file since 4294 was 4276, checked in by sexton, 18 years ago

update project files for slide modelling

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