Changeset 3615 for anuga_work/production/hobart_2006/run_hobart.py
- Timestamp:
- Sep 18, 2006, 5:19:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/hobart_2006/run_hobart.py
r3559 r3615 6 6 7 7 The scenario is defined by a triangular mesh created from project.polygon, 8 the elevation data and a simulated submarine landslide.8 the elevation data and a tsunami wave generated by MOST. 9 9 10 10 Ole Nielsen and Duncan Gray, GA - 2005 and Nick Bartzis, GA - 2006 11 11 """ 12 13 14 12 #-------------------------------------------------------------------------------# Import necessary modules 15 13 #------------------------------------------------------------------------------- … … 67 65 # filenames 68 66 onshore_dem_name = project.onshore_dem_name 69 coast_points = project.coast_dem_name70 offshore_points = project.offshore_dem_name71 67 meshname = project.meshname+'.msh' 72 68 source_dir = project.boundarydir … … 81 77 82 78 #creates pts file for onshore DEM 83 dem2pts(onshore_dem_name, 84 easting_min=project.eastingmin, 85 easting_max=project.eastingmax, 86 northing_min=project.northingmin, 87 northing_max= project.northingmax, 88 use_cache=True, 89 verbose=True) 90 91 convert_dem_from_ascii2netcdf(islands_dem_name, use_cache=True, verbose=True) 92 93 #creates pts file for islands DEM 94 dem2pts(islands_dem_name, use_cache=True, verbose=True) 79 dem2pts(onshore_dem_name, use_cache=True, verbose=True) 95 80 96 81 print'create G1' 97 G1 = Geospatial_data(file_name = project.offshore_dem_name + '.xya')82 G1 = Geospatial_data(file_name = project.offshore_dem_name_local + '.xya') 98 83 print'create G2' 99 G2 = Geospatial_data(file_name = project.o nshore_dem_name + '.pts')84 G2 = Geospatial_data(file_name = project.offshore_dem_name_aho + '.xya') 100 85 print'create G3' 101 G3 = Geospatial_data(file_name = project.coast_dem_name + '.xya') 102 print'add G1+G2+G3' 103 G = G1 + G2 + G3 86 G3 = Geospatial_data(file_name = project.onshore_dem_name + '.pts') 87 print'create G4' 88 G4 = Geospatial_data(file_name = project.coast_dem_name + '.xya') 89 print'add G1+G2+G3+G4' 90 G = G1 + G2 + G3 + G4 104 91 print'export G' 105 92 G.export_points_file(project.combined_dem_name + '.pts') … … 113 100 from anuga.pmesh.mesh_interface import create_mesh_from_regions 114 101 115 # new116 region_res = 200000117 coast_res = 25000118 hobart_res = 5000102 # use 75 for onshore components (12.5m DEM) 103 island_res = 10000 104 hobart_res = 10000 105 peninsular_res = 10000 119 106 interior_regions = [[project.poly_hobart, hobart_res], 120 [project.poly_ coast, coast_res],121 [project.poly_ region, region_res]]107 [project.poly_tasman_peninsula, peninsula_res], 108 [project.poly_bruny, island_res]] 122 109 123 110 print 'number of interior regions', len(interior_regions) … … 126 113 _ = cache(create_mesh_from_regions, 127 114 project.polyAll, 128 {'boundary_tags': {'top': [0], 'topleft': [1], 129 'topleft1': [2], 'bottomleft': [3], 130 'bottom': [4], 'bottomright': [5], 131 'topright':[6]}, 115 {'boundary_tags': {'bottom': [0], 'right': [1], 116 'top': [2], 'left': [3]}, 132 117 'maximum_triangle_area': 100000, 133 118 'filename': meshname, … … 177 162 print 'start ferret2sww' 178 163 from anuga.pyvolution.data_manager import ferret2sww 179 164 ''' 180 165 south = project.south 181 166 north = project.north … … 209 194 dependencies = source_dir + project.boundary_basename + '.sww') 210 195 211 196 ''' 212 197 print 'Available boundary tags', domain.get_boundary_tags() 213 198 214 Bf = File_boundary(source_dir + project.boundary_basename + '.sww',199 #Bf = File_boundary(source_dir + project.boundary_basename + '.sww', 215 200 domain, verbose = True) 216 201 Br = Reflective_boundary(domain) … … 222 207 f=lambda t: [(60<t<480)*6, 0, 0]) 223 208 224 domain.set_boundary( {'top': Bf, 'topleft': Bf, 225 'topleft1': Bf, 'bottomleft': Bd, 226 'bottom': Br, 'bottomright': Br, 'topright': Bd} ) 209 # for MOST BC 210 #domain.set_boundary( {'top': Bd, 'left': Bd, 211 # 'bottom': Bf, 'right': Bf} ) 212 213 # for testing 214 domain.set_boundary( {'top': Bd, 'left': Bd, 215 'bottom': Bd, 'right': Bw} ) 227 216 228 217 #------------------------------------------------------------------------------- … … 234 223 for t in domain.evolve(yieldstep = 240, finaltime = 7200): 235 224 domain.write_time() 236 domain.write_boundary_statistics(tags = ' top')225 domain.write_boundary_statistics(tags = 'bottom') 237 226 238 227 for t in domain.evolve(yieldstep = 120, finaltime = 12600 239 228 ,skip_initial_step = True): 240 229 domain.write_time() 241 domain.write_boundary_statistics(tags = 'top') 242 243 for t in domain.evolve(yieldstep = 60, finaltime = 19800 244 ,skip_initial_step = True): 245 domain.write_time() 246 domain.write_boundary_statistics(tags = 'top') 247 248 for t in domain.evolve(yieldstep = 120, finaltime = 25200 249 ,skip_initial_step = True): 250 domain.write_time() 251 domain.write_boundary_statistics(tags = 'top') 252 253 for t in domain.evolve(yieldstep = 240, finaltime = 36000 254 ,skip_initial_step = True): 255 domain.write_time() 256 domain.write_boundary_statistics(tags = 'top') 230 domain.write_boundary_statistics(tags = 'bottom') 257 231 258 232 print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset
for help on using the changeset viewer.