Changeset 5401 for anuga_work/development/boxingday08/run_boxingday_most.py
- Timestamp:
- Jun 13, 2008, 10:29:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/boxingday08/run_boxingday_most.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 #------------------------------------------------------------------------------ … … 53 52 54 53 timestamp = strftime('%Y%m%d_%H%M%S',localtime()) 55 basename = scenario + 'source'54 basename = scenario[:4] + '_most' 56 55 57 56 … … 70 69 # resolutions (maximal area of per triangle) for each polygon 71 70 #------------------------------------------------------------------------------ 72 extent_res = 1000000 0.071 extent_res = 1000000.0 73 72 contour20m_res = 50000.0 74 73 island_res = 5000.0 75 74 bay_res = 2000.0 76 patong_res = 100.0 75 patong_res = 400.0 76 77 77 78 78 79 # make polygon that contains land that does not affect result. 79 80 interior_regions = [[project.patong, patong_res], 80 81 [project.bay, bay_res], 81 [project.contour20m, contour20m_res] ,82 [project.island_north, island_res],83 [project.island_south, island_res],84 [project.island_south2, island_res]]82 [project.contour20m, contour20m_res]]#, 83 #[project.island_north, island_res], 84 #[project.island_south, island_res], 85 #[project.island_south2, island_res]] 85 86 86 87 #for coarse run to test gauges 87 extent_res = 10000000.0 88 interior_regions=None88 #extent_res = 1000000.0 #causes inaccurate stage 89 #interior_regions=None 89 90 90 91 from Numeric import arange,allclose 91 boundary_tags={'ocean': arange( 1,85).tolist(), 'otherocean': [0,89], 'land': [86, 87], 'both': [85,88]}92 93 94 #trigs_min = number_mesh_triangles(interior_regions, create_boundary.bounding_polygon,extent_res)92 boundary_tags={'ocean': arange(0,41).tolist(), 'otherocean': [41,44], 'land': [42,43]} 93 94 95 #trigs_min = number_mesh_triangles(interior_regions, project.bounding_polygon,extent_res) 95 96 #print 'Minimum number of traingles ', trigs_min 96 97 … … 102 103 103 104 _ = cache(create_mesh_from_regions, 104 create_boundary.bounding_polygon,105 project.bounding_polygon, 105 106 {'boundary_tags': boundary_tags, 106 107 'maximum_triangle_area': extent_res, 107 108 'filename': meshname, 108 109 'interior_regions': interior_regions}, 109 verbose = True ,110 dependencies = ['run_boxingday_most.py']110 verbose = True#, 111 #dependencies = ['run_boxingday_most.py'] 111 112 #, evaluate=True 112 113 ) … … 128 129 print domain.statistics() 129 130 130 domain.set_name(basename+ 'friction'+timestamp)131 domain.set_name(basename+timestamp) 131 132 domain.set_datadir(scenario) 132 133 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum']) … … 197 198 print 'Available boundary tags', domain.get_boundary_tags() 198 199 Bf = File_boundary(project.boundary_most_out+'.sww', 199 domain, time_thinning=1, verbose = True)200 domain, time_thinning=1, use_cache=True,verbose = True) 200 201 Br = Reflective_boundary(domain) 201 202 Bd = Dirichlet_boundary([tide,0.0,0.0]) … … 219 220 # start when boundary stage first becomes non-zero. 220 221 221 for t in domain.evolve(yieldstep = 5.0, finaltime = 18000.0,222 for t in domain.evolve(yieldstep = 20.0, finaltime = 18000.0, 222 223 skip_initial_step = False): 223 224 if allclose(t,10800.0):
Note: See TracChangeset
for help on using the changeset viewer.