Changeset 1845
- Timestamp:
- Sep 21, 2005, 2:42:41 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
production/karratha_2005/run_karratha.py
r1843 r1845 1 """Convert from Arcview ASCII DEMs via native netcdf dem format 2 to native pts netcdf format for use with least_squares fits 1 """Script for running a tsunami inundation scenario for Karratha, WA, Australia. 2 3 Source data such as elevation and boundary data is assumed to be available in 4 directories specified by project.py 5 The output sww file is stored in project.outputdir 6 7 The scenario is defined by a triangular mesh created from project.polygon, 8 the elevation data and boundary data obtained from a tsunami simulation done with MOST. 9 10 Ole Nielsen, GA - 2005 3 11 """ 4 12 … … 7 15 8 16 9 from pyvolution.shallow_water import Domain, Reflective_boundary, File_boundary, Dirichlet_boundary, Time_boundary, Transmissive_boundary 17 from pyvolution.shallow_water import Domain, Reflective_boundary, File_boundary,\ 18 Dirichlet_boundary, Time_boundary, Transmissive_boundary 10 19 from pyvolution.data_manager import convert_dem_from_ascii2netcdf,\ 11 20 dem2pts, ferret2sww … … 31 40 source_dir = project.boundarydir 32 41 33 34 #Data35 42 from pyvolution.data_manager import ferret2sww 36 37 43 38 44 south = project.south … … 42 48 43 49 44 #Mesh 50 51 #Create Triangular Mesh 45 52 from create_mesh import create_mesh 46 47 53 m = cache(create_mesh, 48 54 project.polygon, … … 90 96 91 97 92 #Setup IC 98 99 #Setup Initial Conditions 93 100 tide = 0 94 101 domain.set_quantity('friction', 0) … … 99 106 verbose = True) 100 107 101 #Setup BC102 108 109 110 #Setup Boundary Conditions 103 111 print domain.get_boundary_tags() 104 112 105 113 Bf = File_boundary(project.boundary_basename + '.sww', domain, verbose = True) 106 114 domain.starttime = 3000 #Obtained from MOST 107 108 115 109 116 Br = Reflective_boundary(domain) … … 113 120 f=lambda t: [(60<t<660)*4, 0, 0]) 114 121 115 #domain.set_boundary( {'wall': Bd, 'ocean': Bf} )116 122 domain.set_boundary( {'back': Br,'side': Bd, 'ocean': Bf} ) 117 123 … … 120 126 121 127 #Run 122 123 128 for t in domain.evolve(yieldstep = 60, finaltime = 40000): 124 129 domain.write_time()
Note: See TracChangeset
for help on using the changeset viewer.