Changeset 6298
- Timestamp:
- Feb 9, 2009, 4:26:06 PM (16 years ago)
- Location:
- anuga_work/production/australia_ph2/sydney
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/australia_ph2/sydney/build_boundary_7875.py
r6290 r6298 5 5 Input: order_filename from project.py 6 6 event_number needs to be reflected in the project file 7 Output: creates a sts file and csv files stored in project. boundaries_dir_event.7 Output: creates a sts file and csv files stored in project.event_sts. 8 8 The run_sydney.py is reliant on the output of this script. 9 9 """ … … 103 103 104 104 maxname = 'max_sts_stage.csv' 105 fid_max = open(project. boundaries_dir_event+sep+maxname,'w')105 fid_max = open(project.event_sts+sep+maxname,'w') 106 106 s = 'index, x, y, max_stage \n' 107 107 fid_max.write(s) … … 120 120 121 121 minname = 'min_sts_stage.csv' 122 fid_min = open(project. boundaries_dir_event+sep+minname,'w')122 fid_min = open(project.event_sts+sep+minname,'w') 123 123 s = 'index, x, y, max_stage \n' 124 124 fid_min.write(s) … … 134 134 135 135 136 fid_sts = open(project. boundaries_dir_event+sep+basename+'_'+ str(index)+'.csv', 'w')136 fid_sts = open(project.event_sts+sep+basename+'_'+ str(index)+'.csv', 'w') 137 137 s = 'time, stage, xmomentum, ymomentum \n' 138 138 fid_sts.write(s) … … 152 152 return quantities,elevation,time 153 153 154 quantities,elevation,time=get_sts_gauge_data(os.path.join(project. boundaries_dir_event,project.scenario_name),verbose=False)154 quantities,elevation,time=get_sts_gauge_data(os.path.join(project.event_sts),verbose=False) 155 155 156 156 print len(elevation), len(quantities['stage'][0,:]) -
anuga_work/production/australia_ph2/sydney/comparisons/export_results_max.py
r6295 r6298 20 20 directory = project_250m.output_dir 21 21 22 time_dir1 = '20090206_15 0250_run_final_0_250m_large_jgriffin'22 time_dir1 = '20090206_152643_run_final_0_250m_large_jgriffin' 23 23 #time_dir2 = '20090123_155045_run_final_0_7875_250m_large_jgriffin' 24 24 #time_dir3 = '20090123_154945_run_final_0_7875_250m_small_jgriffin' … … 80 80 81 81 name1 = directory+time_dir+sep+project_250m.scenario_name 82 #name2 = directory+time_dir+sep+project_250m.scenario_name+'_time_52620_0' 83 # name3 = directory+time_dir+sep+project_250m.scenario_name+'_time_78360_0' 84 85 names = [name1]#, name2] #, name3] 82 83 names = [name1] 86 84 87 85 asc_name = [] -
anuga_work/production/australia_ph2/sydney/export_results_max.py
r6288 r6298 20 20 directory = project_250m.output_dir 21 21 22 time_dir1 = '20090 123_155045_run_final_0_7875_250m_large_jgriffin'22 time_dir1 = '20090206_150250_run_final_0_250m_large_jgriffin' 23 23 #time_dir2 = '20090123_155045_run_final_0_7875_250m_large_jgriffin' 24 24 #time_dir3 = '20090123_154945_run_final_0_7875_250m_small_jgriffin' … … 50 50 # one or more key strings from var_equations above 51 51 #var = ['stage', 'speed','depth'] 52 var = [' elevation']52 var = ['stage','elevation'] 53 53 54 54 ###### -
anuga_work/production/australia_ph2/sydney/project.py
r6289 r6298 41 41 # run_scenario script is executed 42 42 tide = 0 #0.6 43 #event_number = 27255 # Java 9.3 worst case for Perth 44 #event_number = 68693 # Sumatra 9.2 45 event_number = 27283 # Java 9.3 original 43 event_number = 7875 # Java 9.3 original 46 44 alpha = 0.1 # smoothing parameter for mesh 47 45 friction=0.01 # manning's friction coefficient … … 95 93 # Used in run_busselton,py 96 94 # Format for points easting,northing (no header) 97 ##land_initial_conditions_filename = [['initial_condition_extend.csv', 0],98 ##['initial_condition_comerong_island.csv', 0],99 ##['initial_condition_gabo_island.csv', 0],100 ##['initial_condition_montague_island.csv', 0]]95 land_initial_conditions_filename = [['initial_condition_extend.csv', 0], 96 ['initial_condition_comerong_island.csv', 0], 97 ['initial_condition_gabo_island.csv', 0], 98 ['initial_condition_montague_island.csv', 0]] 101 99 102 100 # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh … … 105 103 bounding_polygon_filename = 'bounding_polygon.csv' 106 104 105 # INTERIOR REGIONS - for designing the mesh 106 # Used in run_model.py 107 # Format for points easting,northing (no header) 108 ##interior_regions_data = [['coast_3km_buffer.csv', 50000]] 109 107 110 108 111 # BOUNDING POLYGON … … 119 122 # Format easting,northing (no header) 120 123 landward_boundary_filename = 'landward_boundary_extend.csv' 124 125 121 126 122 127 … … 148 153 149 154 # The absolute pathname of the mesh, generated in run_busselton.py 150 meshes = join(meshes_folder, scenario_name, '.msh')155 meshes = meshes_folder + sep + scenario_name + '.msh' 151 156 152 157 # The absolute pathname for the urs order points, used within build_boundary.py … … 158 163 159 164 # The absolute pathname for the .sts file, generated in build_boundary.py 160 event_sts = join(boundaries_folder, str(event_number) , scenario_name)165 event_sts = join(boundaries_folder, str(event_number)) 161 166 162 167 # The absolute pathname for the output folder names … … 174 179 175 180 # Create list of land polygons with initial conditions 176 ##land_initial_conditions = [] 177 ##for filename, MSL in land_initial_conditions_filename: 181 land_initial_conditions = [] 182 for filename, MSL in land_initial_conditions_filename: 183 polygon = read_polygon(join(polygons_folder, filename)) 184 land_initial_conditions.append([filename, MSL]) 185 186 ### Create list of interior polygons with scaling factor 187 interior_regions = [] 188 ##for filename, maxarea in interior_regions_data: 178 189 ## polygon = read_polygon(join(polygons_folder, filename)) 179 ## land_initial_conditions.append([filename, MSL]) 180 181 # Create list of interior polygons with scaling factor 182 interior_regions = [] 183 #for filename, maxarea in interior_regions_data: 184 # polygon = read_polygon(join(polygons_folder, filename)) 185 # interior_regions.append([polygon, maxarea*scale_factor]) 190 ## interior_regions.append([polygon, maxarea*scale_factor]) 186 191 187 192 # Initial bounding polygon for data clipping 188 193 bounding_polygon = read_polygon(join(polygons_folder, 189 194 bounding_polygon_filename)) 190 bounding_maxarea = 1 00000*scale_factor195 bounding_maxarea = 125000*scale_factor 191 196 192 197 # Estimate the number of triangles -
anuga_work/production/australia_ph2/sydney/run_model.py
r6287 r6298 1 """Run a tsunami inundation scenario for Busselton, WA, Australia.1 """Run a tsunami inundation scenario for sydney region, NSW, Australia. 2 2 3 3 The scenario is defined by a triangular mesh created from project.polygon, the 4 elevation data is compiled into a pts file through build_ busselton.py and a4 elevation data is compiled into a pts file through build_sydney.py and a 5 5 simulated tsunami is generated through an sts file from build_boundary.py. 6 6 7 7 Input: sts file (build_boundary.py for respective event) 8 pts file (build_ busselton.py)8 pts file (build_sydney.py) 9 9 information from project file 10 10 Outputs: sww file stored in project.output_run_time_dir … … 32 32 from anuga.interface import create_sts_boundary 33 33 from anuga.interface import csv2building_polygons 34 from file_length import file_length 34 35 35 36 from anuga.shallow_water.data_manager import start_screen_catcher … … 70 71 # Number of boundary segments 71 72 N = len(event_sts)-1 73 # Number of landward_boundary points 74 M = file_length(project.landward_boundary) 75 print 'M',M 72 76 73 77 # Boundary tags refer to project.landward_boundary 74 78 # 4 points equals 5 segments start at N 75 boundary_tags={'back': [N+1,N+2,N+3,N+4, N+5],76 'side': [N,N+ 6],79 boundary_tags={'back': range(N+1,N+M), 80 'side': [N,N+M], 77 81 'ocean': range(N)} 78 82 … … 80 84 domain = create_domain_from_regions(bounding_polygon_sts, 81 85 boundary_tags=boundary_tags, 82 maximum_triangle_area=project. res_poly_all,86 maximum_triangle_area=project.bounding_maxarea, 83 87 interior_regions=project.interior_regions, 84 88 mesh_filename=project.meshes,
Note: See TracChangeset
for help on using the changeset viewer.