Changeset 4423 for anuga_work/production/dampier_2006/export_results.py
- Timestamp:
- Apr 27, 2007, 1:29:59 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/dampier_2006/export_results.py
r4422 r4423 5 5 from os import sep 6 6 7 time_dir = '20070418_035124_run' # 7 time_dir = '20070419_065050_run' # HAT 8 #time_dir = '20070419_065018_run' # MSL 8 9 cellsize = 25 9 10 timestep = None … … 16 17 print 'output dir:', name 17 18 18 which_var = 2 19 if which_var == 0: # Stage 20 outname = name + '_stage' 21 quantityname = 'stage' 19 var = [2,3] # depth and speed 22 20 23 if which_var == 1: # Absolute Momentum 24 outname = name + '_momentum_i1' 25 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 21 for which_var in var: 22 if which_var == 0: # Stage 23 outname = name + '_stage' 24 quantityname = 'stage' 26 25 27 if which_var == 2: # Depth 28 outname = name + '_depth'29 quantityname = 'stage-elevation'26 if which_var == 1: # Absolute Momentum 27 outname = name + '_momentum_i1' 28 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 30 29 31 if which_var == 3: # Speed 32 outname = name + '_speed_i0'33 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))' #Speed30 if which_var == 2: # Depth 31 outname = name + '_depth_facility' 32 quantityname = 'stage-elevation' 34 33 35 if which_var == 4: # Elevation 36 outname = name + '_elevation'37 quantityname = 'elevation' #Elevation34 if which_var == 3: # Speed 35 outname = name + '_speed_facility' 36 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))' #Speed 38 37 38 if which_var == 4: # Elevation 39 outname = name + '_elevation' 40 quantityname = 'elevation' #Elevation 39 41 40 41 if is_parallel == True: 42 # print 'is_parallel',is_parallel 43 for i in range(0,nodes): 44 namei = name + '_P%d_%d' %(i,nodes) 45 outnamei = outname + '_P%d_%d' %(i,nodes) 46 print 'start sww2dem for sww file %d' %(i) 47 sww2dem(namei, basename_out = outnamei, 42 if is_parallel == True: 43 # print 'is_parallel',is_parallel 44 for i in range(0,nodes): 45 namei = name + '_P%d_%d' %(i,nodes) 46 outnamei = outname + '_P%d_%d' %(i,nodes) 47 print 'start sww2dem for sww file %d' %(i) 48 sww2dem(namei, basename_out = outnamei, 49 quantity = quantityname, 50 timestep = timestep, 51 cellsize = cellsize, 52 easting_min = project.e_min_area, 53 easting_max = project.e_max_area, 54 northing_min = project.n_min_area, 55 northing_max = project.n_max_area, 56 reduction = max, 57 verbose = True, 58 format = 'asc') 59 else: 60 print 'start sww2dem' 61 sww2dem(name, basename_out = outname, 48 62 quantity = quantityname, 49 63 timestep = timestep, … … 56 70 verbose = True, 57 71 format = 'asc') 58 else:59 print 'start sww2dem'60 sww2dem(name, basename_out = outname,61 quantity = quantityname,62 timestep = timestep,63 cellsize = cellsize,64 easting_min = project.e_min_area,65 easting_max = project.e_max_area,66 northing_min = project.n_min_area,67 northing_max = project.n_max_area,68 reduction = max,69 verbose = True,70 format = 'asc')
Note: See TracChangeset
for help on using the changeset viewer.