- Timestamp:
- Jun 13, 2008, 10:29:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/boxingday08/run_boxingday_polyline.py
r5393 r5401 40 40 # Application specific imports 41 41 import project # Definition of file names and polygons 42 import create_boundary43 42 44 43 … … 54 53 55 54 timestamp = strftime('%Y%m%d_%H%M%S',localtime()) 56 basename = scenario + '_polyline'55 basename = scenario[:4] + '_polyline' 57 56 58 57 … … 71 70 # resolutions (maximal area of per triangle) for each polygon 72 71 #------------------------------------------------------------------------------ 73 extent_res = 1000000 0.072 extent_res = 1000000.0 74 73 contour20m_res = 50000.0 75 74 island_res = 5000.0 76 75 bay_res = 2000.0 77 patong_res = 100.076 patong_res = 400.0 78 77 79 78 … … 82 81 interior_regions = [[project.patong, patong_res], 83 82 [project.bay, bay_res], 84 [project.contour20m, contour20m_res] ,85 [project.island_north, island_res],86 [project.island_south, island_res],87 [project.island_south2, island_res]]83 [project.contour20m, contour20m_res]]#, 84 #[project.island_north, island_res], 85 #[project.island_south, island_res], 86 #[project.island_south2, island_res]] 88 87 89 88 90 89 #for coarse run to test gauges 91 extent_res = 10000000.092 interior_regions=None90 #extent_res = 10000000.0 91 #interior_regions=None 93 92 94 93 from Numeric import arange,allclose 95 boundary_tags={'ocean': arange( 1,85).tolist(), 'otherocean': [0,89], 'land': [86, 87], 'both': [85,88]}96 97 #trigs_min = number_mesh_triangles(interior_regions, create_boundary.bounding_polygon,extent_res)94 boundary_tags={'ocean': arange(0,41).tolist(), 'otherocean': [41,44], 'land': [42,43]} 95 96 #trigs_min = number_mesh_triangles(interior_regions, project.bounding_polygon,extent_res) 98 97 #print 'Minimum number of traingles ', trigs_min 99 98 … … 105 104 106 105 _ = cache(create_mesh_from_regions, 107 create_boundary.bounding_polygon,106 project.bounding_polygon, 108 107 {'boundary_tags': boundary_tags, 109 108 'maximum_triangle_area': extent_res, … … 111 110 'interior_regions': interior_regions}, 112 111 verbose = True, 113 dependencies = [' create_boundary.py']112 dependencies = ['project.py'] 114 113 #, evaluate=True 115 114 ) … … 130 129 print domain.statistics() 131 130 132 domain.set_name(basename+ 'friction'+timestamp)131 domain.set_name(basename+timestamp) 133 132 #domain.set_name(basename) 134 133 domain.set_datadir(scenario) … … 168 167 #------------------------------------------------------------------------------ 169 168 boundary_urs_in='data/boxing' 170 boundary_urs_out= create_boundary.base_name169 boundary_urs_out=project.base_name 171 170 172 171 print 'Available boundary tags', domain.get_boundary_tags() 173 172 Bf = File_boundary(boundary_urs_out+'.sts', 174 173 domain, time_thinning=1, 175 use_cache= False,verbose = True,boundary_polygon=create_boundary.bounding_polygon)174 use_cache=True,verbose = True,boundary_polygon=project.bounding_polygon) 176 175 177 176 Br = Reflective_boundary(domain) … … 196 195 # start when boundary stage first becomes non-zero. 197 196 198 for t in domain.evolve(yieldstep = 5.0, finaltime = 18000.0,197 for t in domain.evolve(yieldstep = 20.0, finaltime = 18000.0, 199 198 skip_initial_step = False): 200 199 if allclose(t,10800.0):
Note: See TracChangeset
for help on using the changeset viewer.