Changeset 4072 for anuga_work/production/sydney_2006
- Timestamp:
- Dec 11, 2006, 6:45:38 PM (18 years ago)
- Location:
- anuga_work/production/sydney_2006
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/sydney_2006/export_results.py
r3514 r4072 1 import project, os 1 import project_slide, os 2 import sys 2 3 3 from anuga. pyvolution.data_manager import sww2dem4 from anuga.pyvolution.ermapper_grids import read_ermapper_grid4 from anuga.shallow_water.data_manager import sww2dem 5 from os import sep 5 6 6 name = project.outputname 7 time_dir = '20061206_061014' 8 directory = project_slide.outputdir 9 name = directory + time_dir + sep + project_slide.basename 7 10 8 #print 'Which variable do you want to export?' 9 #which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3 ' )) 11 is_parallel = False 12 if is_parallel == True: nodes = 4 13 print 'output dir:', name 14 10 15 which_var = 2 11 12 16 if which_var == 0: # Stage 13 17 outname = name + '_stage' … … 15 19 16 20 if which_var == 1: # Absolute Momentum 17 outname = name + '_momentum '18 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' #Absolute momentum21 outname = name + '_momentum_i1' 22 quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 19 23 20 24 if which_var == 2: # Depth 21 25 outname = name + '_depth' 22 quantityname = 'stage-elevation' #Depth26 quantityname = 'stage-elevation' 23 27 24 28 if which_var == 3: # Speed 25 outname = name + '_speed '29 outname = name + '_speed_i0' 26 30 #quantityname = '((xmomentum/(stage-elevation))**2 + (ymomentum/(stage-elevation))**2)**0.5' #Speed 27 #quantityname = 'xmomentum/(stage-elevation)' #Speed28 31 quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-30)' #Speed 29 32 30 31 sww2dem(name, basename_out = outname, 32 quantity = quantityname, 33 cellsize = 25, # Trevor would like this at 25 34 # define region for viz purposes 35 easting_min = project.eminviz, 36 easting_max = project.emaxviz, 37 northing_min = project.nminviz, 38 northing_max = project.nmaxviz, 39 reduction = max, #this is because we want max quantityname 40 verbose = True, 41 format = 'asc') 33 if which_var == 4: # Elevation 34 outname = name + '_elevation' 35 quantityname = 'elevation' #Elevation 42 36 43 #Check 44 45 #data = read_ermapper_grid(name) 46 #print 'Values from %s are in [%f, %f]' %(name, min(data.flat), max(data.flat)) 37 if is_parallel == True: 38 for i in range(0,nodes): 39 namei = name + '_P%d_%d' %(i,nodes) 40 outnamei = outname + '_P%d_%d' %(i,nodes) 41 print 'start sww2dem for sww file %d' %(i) 42 sww2dem(namei, basename_out = outnamei, 43 quantity = quantityname, 44 timestep = 1, 45 cellsize = 100, 46 #easting_min = project.e_min_area, 47 #easting_max = project.e_max_area, 48 #northing_min = project.n_min_area, 49 #northing_max = project.n_max_area, 50 reduction = max, 51 verbose = True, 52 format = 'asc') 53 else: 54 print 'start sww2dem' 55 sww2dem(name, basename_out = outname, 56 quantity = quantityname, 57 cellsize = 100, 58 easting_min = project_slide.eastingmin, 59 easting_max = project_slide.eastingmax, 60 northing_min = project_slide.northingmin, 61 northing_max = project_slide.northingmax, 62 reduction = max, 63 verbose = True, 64 format = 'asc') -
anuga_work/production/sydney_2006/project_slide.py
r4058 r4072 93 93 94 94 # sydney digitized polygons 95 poly_coast = read_polygon(polygondir+'coast .csv')95 poly_coast = read_polygon(polygondir+'coast2.csv') 96 96 poly_syd1 = read_polygon(polygondir+'local.csv') 97 97 … … 129 129 130 130 # exporting asc grid 131 #eastingmin = 132 #eastingmax = 133 #northingmin = 134 #northingmax = 131 eastingmin = 337500 132 eastingmax = 344060 133 northingmin = 6248890 134 northingmax = 6274550 135 135 136 136 ################################################################### -
anuga_work/production/sydney_2006/run_sydney_slide.py
r4063 r4072 113 113 114 114 from anuga.pmesh.mesh_interface import create_mesh_from_regions 115 remainder_res = 150000.115 remainder_res = 250000. 116 116 local_res = 50000. 117 117 coast_res = 500.
Note: See TracChangeset
for help on using the changeset viewer.