Changeset 5785 for anuga_work/production/perth/run_perth_250m.py
- Timestamp:
- Sep 25, 2008, 1:34:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/perth/run_perth_250m.py
r5782 r5785 1 """Script for running tsunami inundation scenario for Perth, WA, Australia.1 """Script for running a tsunami inundation scenario for Perth, WA, Australia. 2 2 3 3 The scenario is defined by a triangular mesh created from project_250m.polygon, 4 the elevation data is com biled into a pts file through build_perth.py5 and a simulated tsunami is generated through an sts file from build_boundary.py 6 7 Input: sts file (build_boundary.py for res epective event)4 the elevation data is compiled into a pts file through build_perth.py 5 and a simulated tsunami is generated through an sts file from build_boundary.py. 6 7 Input: sts file (build_boundary.py for respective event) 8 8 pts file (build_perth.py) 9 information from project _250mfile9 information from project file 10 10 Outputs: sww file stored in project_250m.output_run_time_dir 11 11 The export_results_all.py and get_timeseries.py is reliant … … 48 48 49 49 # Application specific imports 50 import project _250m# Definition of file names and polygons50 import project # Definition of file names and polygons 51 51 numprocs = 1 52 52 myid = 0 … … 90 90 N = len(urs_bounding_polygon)-1 91 91 92 # boundary tags refer to project_250m.landward 4 points equals 5 segments start at N92 # boundary tags refer to project_250m.landward 4 points equals 5 segments start at N 93 93 boundary_tags={'back': [N+1,N+2,N+3], 'side': [N,N+4], 'ocean': range(N)} 94 94 95 96 95 #-------------------------------------------------------------------------- 97 96 # Create the triangular mesh based on overall clipping polygon with a tagged … … 100 99 #-------------------------------------------------------------------------- 101 100 102 # IMPORTANT don't cache create_mesh_from_region and Domain(mesh....) as it101 # IMPORTANT don't cache create_mesh_from_region and Domain(mesh....) as it 103 102 # causes problems with the ability to cache set quantity which takes alot of times 104 103 … … 132 131 print 'Setup initial conditions' 133 132 134 # following sets the stage/water to be offcoastonly133 # sets the initial stage in the offcoast region only 135 134 IC = Polygon_function( [(project_250m.poly_mainland, 0)], default = kwargs['tide'], 136 135 geo_reference = domain.geo_reference) … … 161 160 domain.set_name(kwargs['scenario_name']) 162 161 domain.set_datadir(kwargs['output_dir']) 163 domain.set_default_order(2) # Apply second order scheme164 domain.set_minimum_storable_height(0.01) # Don't store anything less than 1cm162 domain.set_default_order(2) # Apply second order scheme 163 domain.set_minimum_storable_height(0.01) # Don't store anything less than 1cm 165 164 domain.set_store_vertices_uniquely(False) 166 165 domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum']) … … 206 205 domain.write_boundary_statistics(tags = 'ocean') 207 206 207 # these outputs should be checked with the resultant inundation map 208 208 x, y = domain.get_maximum_inundation_location() 209 209 q = domain.get_maximum_inundation_elevation() 210 211 210 print 'Maximum runup observed at (%.2f, %.2f) with elevation %.2f' %(x,y,q) 212 211 213 print ' Thattook %.2f seconds' %(time.time()-t0)212 print 'Simulation took %.2f seconds' %(time.time()-t0) 214 213 215 214 #kwargs 'completed' must be added to write the final parameters to file … … 232 231 kwargs['alpha'] = project_250m.alpha 233 232 kwargs['friction']=project_250m.friction 234 235 233 236 234 run_model(**kwargs) 237 235
Note: See TracChangeset
for help on using the changeset viewer.