Changeset 6284
- Timestamp:
- Feb 5, 2009, 4:28:52 PM (16 years ago)
- Location:
- anuga_work/production/busselton/standardised_version
- Files:
-
- 2 added
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/busselton/standardised_version/build_elevation.py
r6281 r6284 4 4 Input: elevation data from project.py 5 5 Output: pts file stored in project.topographies_dir 6 The run_ busselton.py is reliant on the output of this script.6 The run_model.py is reliant on the output of this script. 7 7 8 8 """ … … 14 14 # Standard modules 15 15 import os 16 from os.path import join 16 17 17 18 # Related major packages … … 50 51 geospatial_data = {} 51 52 for filename in project.ascii_grid_filenames: 52 absolute_filename = project.topographies_folder + os.sep + filename53 absolute_filename = join(project.topographies_folder, filename) 53 54 convert_dem_from_ascii2netcdf(absolute_filename, 54 55 basename_out=absolute_filename, … … 62 63 # Create Geospatial data from TXT files 63 64 for filename in project.point_filenames: 64 absolute_filename = project.topographies_folder + os.sep + filename65 absolute_filename = join(project.topographies_folder, filename) 65 66 geospatial_data[filename] = Geospatial_data(file_name=absolute_filename, 66 67 verbose=True) … … 88 89 89 90 print 'Export combined DEM file' 90 G_clip.export_points_file(project.combined_ dir_name+ '.pts')91 G_clip.export_points_file(project.combined_elevation + '.pts') 91 92 print 'Do txt version too' 92 93 # Use for comparision in ARC 93 G_clip.export_points_file(project.combined_ dir_name+ '.txt')94 G_clip.export_points_file(project.combined_elevation + '.txt') 94 95 -
anuga_work/production/busselton/standardised_version/project.py
r6282 r6284 40 40 # Model specific parameters. One or all can be changed each time the 41 41 # run_scenario script is executed 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 42 46 tide = 0 #0.6 43 47 #event_number = 27255 # Java 9.3 worst case for Perth … … 82 86 #------------------------------------------------------------------------------ 83 87 # ELEVATION DATA 84 # Used in build_ busselton.py88 # Used in build_elevation.py 85 89 # Format for ascii grids, as produced in ArcGIS + a projection file 86 90 ascii_grid_filenames = ['busselton_v2', # Topo … … 100 104 101 105 # LAND - used to set the initial stage/water to be offcoast only 102 # Used in run_ busselton,py106 # Used in run_model,py 103 107 # Format for points easting,northing (no header) 104 108 land_initial_conditions_filename = [['initial_condition_extend.csv', 0], … … 106 110 107 111 # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh 108 # Used in build_ busselton.py112 # Used in build_elevation.py 109 113 # Format for points easting,northing (no header) 110 114 bounding_polygon_filename = 'bounding_polygon.csv' 111 115 112 116 # INTERIOR REGIONS - for designing the mesh 113 # Used in run_ busselton.py117 # Used in run_model.py 114 118 # Format for points easting,northing (no header) 115 119 interior_regions_data = [['busselton_1km.csv', 500], … … 132 136 133 137 # BOUNDING POLYGON 134 # used in build_boundary.py and run_ busselton.py respectively138 # used in build_boundary.py and run_model.py respectively 135 139 # NOTE: when files are put together the points must be in sequence 136 140 # For ease go clockwise! 137 # Check the run_ busselton.py for boundary_tags141 # Check the run_model.py for boundary_tags 138 142 139 143 # Thinned ordering file from Hazard Map (geographic) … … 167 171 #------------------------------------------------------------------------------ 168 172 # Output filename for elevation 169 # this is a combination of all the data generated in build_ busselton.py173 # this is a combination of all the data generated in build_elevation.py 170 174 combined_elevation_basename = scenario_name + '_combined_elevation' 171 175 … … 185 189 #------------------------------------------------------------------------------ 186 190 187 # The absolute pathname of the all elevation, generated in build_ busselton.py191 # The absolute pathname of the all elevation, generated in build_elevation.py 188 192 combined_elevation = join(topographies_folder, combined_elevation_basename) 189 193 190 # The absolute pathname of the mesh, generated in run_busselton.py 191 meshes = join(meshes_folder, scenario_name, '.msh') 194 195 # The absolute pathname of the mesh, generated in run_model.py 196 meshes = join(meshes_folder, scenario_name) + '.msh' 192 197 193 198 # The absolute pathname for the urs order points, used within build_boundary.py … … 195 200 196 201 # The absolute pathname for the landward points of the bounding polygon, 197 # Used within run_ busselton.py)202 # Used within run_model.py) 198 203 landward_boundary = join(boundaries_folder, landward_boundary_filename) 199 204 … … 202 207 203 208 # The absolute pathname for the output folder names 204 # Used for build_ busselton.py205 output_build = output_folder + sep + build_time+ '_' + str(user)206 # Used for run_ busselton.py207 output_run = output_folder + sep + run_time+ output_comment209 # Used for build_elevation.py 210 output_build = join(output_folder, build_time) + '_' + str(user) 211 # Used for run_model.py 212 output_run = join(output_folder, run_time) + output_comment 208 213 # Used by post processing 209 214 output_run_time = join(output_run, scenario_name) … … 225 230 for filename, MSL in land_initial_conditions_filename: 226 231 polygon = read_polygon(join(polygons_folder, filename)) 227 land_initial_conditions.append([ filename, MSL])232 land_initial_conditions.append([polygon, MSL]) 228 233 229 234 # Create list of interior polygons with scaling factor -
anuga_work/production/busselton/standardised_version/run_model.py
r6281 r6284 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_elevation.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_elevation.py) 9 9 information from project file 10 10 Outputs: sww file stored in project.output_run_time_dir … … 73 73 # Boundary tags refer to project.landward_boundary 74 74 # 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],75 boundary_tags={'back': [N+1, N+2, N+3, N+4, N+5, N+6, N+7], 76 'side': [N, N+8], 77 77 'ocean': range(N)} 78 78 … … 80 80 domain = create_domain_from_regions(bounding_polygon_sts, 81 81 boundary_tags=boundary_tags, 82 maximum_triangle_area=project. res_poly_all,82 maximum_triangle_area=project.bounding_maxarea, 83 83 interior_regions=project.interior_regions, 84 84 mesh_filename=project.meshes,
Note: See TracChangeset
for help on using the changeset viewer.