Changeset 4429 for anuga_work/production/broome_2006/export_results.py
- Timestamp:
- May 15, 2007, 4:13:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/broome_2006/export_results.py
r4347 r4429 5 5 from os import sep 6 6 7 time_dir = '20061113_040953' 7 time_dir = '20070423_040235_run' # 8 cellsize = 25 9 timestep = None 10 directory = project.output_dir 11 #name = directory + time_dir + sep + project.scenario_name 12 name = directory+time_dir+sep+project.scenario_name 8 13 9 directory = project.outputdir 10 name = directory + time_dir +sep + 'source' 14 is_parallel = True 15 if is_parallel == True: nodes = 4 16 print 'output dir:', name 11 17 12 print 'output dir:', name 13 which_var = 4 18 which_var = 2 14 19 if which_var == 0: # Stage 15 20 outname = name + '_stage' … … 17 22 18 23 if which_var == 1: # Absolute Momentum 19 outname = name + '_momentum '20 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' #Absolute momentum24 outname = name + '_momentum_i1' 25 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 21 26 22 27 if which_var == 2: # Depth 23 28 outname = name + '_depth' 24 quantityname = 'stage-elevation' #Depth29 quantityname = 'stage-elevation' 25 30 26 31 if which_var == 3: # Speed 27 outname = name + '_speed '32 outname = name + '_speed_i0' 28 33 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))' #Speed 29 34 … … 32 37 quantityname = 'elevation' #Elevation 33 38 34 print 'start sww2dem'35 39 36 sww2dem(name, basename_out = outname,37 quantity = quantityname,38 cellsize = 25, # would prefer this at 2539 # define region for viz purposes40 easting_min = project.eastingmin,41 easting_max = project.eastingmax,42 northing_min = project.northingmin,43 northing_max = project.northingmax,44 reduction = max, #this is because we want max quantityname45 verbose = True,46 format = 'asc')47 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, 48 quantity = quantityname, 49 timestep = timestep, 50 cellsize = cellsize, 51 easting_min = project.e_min_area, 52 easting_max = project.e_max_area, 53 northing_min = project.n_min_area, 54 northing_max = project.n_max_area, 55 reduction = max, 56 verbose = True, 57 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.