Changeset 4072 for anuga_work/production
- Timestamp:
- Dec 11, 2006, 6:45:38 PM (18 years ago)
- Location:
- anuga_work/production
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/newcastle_2006/project_slide.py
r4069 r4072 78 78 79 79 # bounding polygon for study area 80 polyAll = read_polygon(polygondir+'extentC 2.csv')80 polyAll = read_polygon(polygondir+'extentC3.csv') 81 81 82 82 print 'Area of bounding polygon', polygon_area(polyAll)/1000000.0 … … 107 107 108 108 # exporting asc grid 109 #eastingmin = 110 #eastingmax = 111 #northingmin = 112 #northingmax = 109 eastingmin = 366890 110 eastingmax = 404270 111 northingmin = 6335450 112 northingmax = 6375630 113 113 114 114 ################################################################### -
anuga_work/production/newcastle_2006/run_newcastle_slide.py
r4069 r4072 103 103 project_slide.polyAll, 104 104 {'boundary_tags': {'e0': [0], 'e1': [1], 'e2': [2], 105 'e3': [3], 'e4':[4] },105 'e3': [3], 'e4':[4], 'e5': [5]}, 106 106 'maximum_triangle_area': remainder_res, 107 107 'filename': meshname, … … 161 161 Bd = Dirichlet_boundary([tide,0,0]) 162 162 163 domain.set_boundary( {'e0': Bd, 'e1': Bd, 'e2': Bd, 'e3': Bd, 'e4': Bd} ) 163 domain.set_boundary( {'e0': Bd, 'e1': Bd, 'e2': Bd, 'e3': Bd, 164 'e4': Bd, 'e5': Bd} ) 164 165 165 166 -
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. -
anuga_work/production/wollongong_2006/project_slide.py
r4063 r4072 87 87 88 88 # areaA digitized polygons 89 poly_local = read_polygon(polygondir+'local.csv') 90 poly_gong = read_polygon(polygondir+'gong2.csv') 89 poly_local = read_polygon(polygondir+'local2.csv') 90 poly_gong = read_polygon(polygondir+'gong3.csv') 91 poly_southgong = read_polygon(polygondir+'south_gong.csv') 91 92 92 93 print 'Area of local polygon', polygon_area(poly_local)/1000000.0 … … 106 107 107 108 # exporting asc grid 108 #eastingmin = 109 #eastingmax = 110 #northingmin = 111 #northingmax = 109 ##eastingmin = 300000 110 ##eastingmax = 314000 111 ##northingmin = 6167680 112 ##northingmax = 6202130 113 114 eastingmin = 300000 115 eastingmax = 314000 116 northingmin = 6167680 117 northingmax = 6202130 112 118 113 119 ################################################################### -
anuga_work/production/wollongong_2006/run_gong_slide.py
r4069 r4072 100 100 gong_res = 500 101 101 interior_regions = [[project_slide.poly_local, local_res], 102 [project_slide.poly_gong, gong_res]] 102 [project_slide.poly_gong, gong_res], 103 [project_slide.poly_southgong, gong_res]] 103 104 104 105 from caching import cache
Note: See TracChangeset
for help on using the changeset viewer.