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

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

slide report updates and gold coast hypothetical

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