Changeset 6276
- Timestamp:
- Feb 4, 2009, 5:11:17 PM (16 years ago)
- Location:
- anuga_work/production/busselton/standardised_version
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/busselton/standardised_version/build_busselton.py
r6263 r6276 50 50 geospatial_data = {} 51 51 for filename in project.ascii_grid_filenames: 52 absolute_filename = project.topographies_ in_dir + filename52 absolute_filename = project.topographies_dir + filename 53 53 convert_dem_from_ascii2netcdf(absolute_filename, 54 54 basename_out=absolute_filename, … … 62 62 # Create Geospatial data from TXT files 63 63 for filename in project.point_filenames: 64 absolute_filename = project.topographies_ in_dir + filename64 absolute_filename = project.topographies_dir + filename 65 65 geospatial_data[filename] = Geospatial_data(file_name=absolute_filename, 66 66 verbose=True) -
anuga_work/production/busselton/standardised_version/project.py
r6262 r6276 7 7 8 8 import os 9 from os.path import join 9 10 from os import sep, getenv 10 11 from time import localtime, strftime, gmtime … … 36 37 state = 'western_australia' 37 38 scenario_name = 'busselton' 38 scenario = 'busselton_tsunami_scenario'39 scenario_folder = 'busselton_tsunami_scenario' 39 40 40 41 # Model specific parameters. One or all can be changed each time the … … 69 70 yieldstep=60 70 71 71 #------------------------------------------------------------------------------72 # Revision numbers - for comparisons study73 #------------------------------------------------------------------------------74 rev_num = 'newExtent'75 #rev_num = '5449'76 #rev_num = '4695' # 2nd Sept 200777 #rev_num = '4743' # 3nd Oct 200778 #rev_num = '4777' # 1st Nov 200779 #rev_num = '4874' # 3rd Dec 200780 #rev_num = '4901' # 3rd Jan 200781 #rev_num = '4990' # 5th Feb 200782 #rev_num = '5103' # 3rd March 200783 #rev_num = '5120' # 5th March 200784 #rev_num = '5140' # 7th March 200785 #rev_num = '5160' # 11th March 200786 #rev_num = '5185' # 1st April 200787 #rev_num = '5273' # 2nd May 200788 89 72 90 73 #------------------------------------------------------------------------------ … … 93 76 # Important to distinguish each run - ensure str(user) is included! 94 77 # Note, the user is free to include as many parameters as desired 95 dir_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_'+ 'alpha' +str(alpha)+'_'+str(user)78 output_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_'+ 'alpha' +str(alpha)+'_'+str(user) 96 79 97 80 #------------------------------------------------------------------------------ … … 101 84 102 85 # elevation data used in build_busselton.py 86 ascii_grid_filenames = [onshore_name, # Topo 87 offshore_name5] # Busselton Topo 88 89 point_filenames = [coast_name, # Coastline 90 coast_name1, # Beach survey 91 offshore_name, # Bathymetry 92 offshore_name1, # Bathymetry Charts 93 offshore_name2, # Digitised Fairsheet 94 offshore_name3, # 250m 95 offshore_name4] # Bunbury DPI 103 96 # onshore data: format ascii grid with accompanying projection file 104 97 onshore_name = 'busselton_v2_gda94_mga50' … … 116 109 # gauges - used in get_timeseries.py 117 110 #gauge_name = scenario_name+'.txt' 118 gauge _name = 'Gauges.csv'111 gauges_filename = 'gauges.csv' 119 112 # buildings - used in run_building_inundation.py 120 building = 'busselton_res_clip'113 building_exposure_filename = 'busselton_res_clip.csv' #from NEXIS 121 114 122 115 … … 125 118 # Check the run_busselton.py for boundary_tags 126 119 # thinned ordering file from Hazard Map: format is index,latitude,longitude (with title) 127 order_filename = 'thinned_boundary_ordering.csv'120 urs_order_filename = 'thinned_boundary_ordering.csv' 128 121 #landward bounding points 129 landward = 'landward_bounding_polygon.csv'122 landward_boundary_filename = 'landward_boundary.csv' 130 123 131 124 … … 135 128 # Output filename for elevation 136 129 # this is a combination of all the data (utilisied in build_boundary) 137 combined_name ='busselton_combined_elevation' 138 combined_smaller_name = 'busselton_combined_elevation_smaller' 130 combined_elevation_basename = scenario_name + '_combined_elevation' 139 131 140 132 #------------------------------------------------------------------------------ 141 133 # Directory Structure 142 134 #------------------------------------------------------------------------------ 143 anuga_dir = home+state+sep+scenario+sep+'anuga'+sep 144 topographies_in_dir = home+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep 145 topographies_dir = anuga_dir+'topographies'+sep 146 polygons_dir = anuga_dir+'polygons'+sep 147 tide_dir = anuga_dir+'tide_data'+sep 148 boundaries_dir = anuga_dir+'boundaries'+ sep 135 anuga_dir = home+state+sep+scenario+sep+'anuga' 136 topographies_dir = anuga_dir+'topographies' 137 polygons_dir = anuga_dir+'polygons' 138 tide_dir = anuga_dir+'tide_data' 139 boundaries_dir = anuga_dir+'boundaries' 149 140 output_dir = anuga_dir+'outputs'+sep 150 141 gauges_dir = anuga_dir+'gauges'+sep … … 155 146 #------------------------------------------------------------------------------ 156 147 157 ascii_grid_filenames = [onshore_name, # Topo158 offshore_name5] # Busselton Topo159 160 point_filenames = [coast_name, # Coastline161 coast_name1, # Beach survey162 offshore_name, # Bathymetry163 offshore_name1, # Bathymetry Charts164 offshore_name2, # Digitised Fairsheet165 offshore_name3, # 250m166 offshore_name4] # Bunbury DPI167 168 169 148 # Where the combined elevation file sits 170 combined_dir_name = topographies_dir + combined_name 171 combined_smaller_name_dir = topographies_dir + combined_smaller_name 149 combined_elevation = topographies_folder + combined_elevation_basename 172 150 173 151 # Where the mesh sits (this is created during the run_busselton.py) 174 meshes _dir_name= meshes_dir + scenario_name+'.msh'152 meshes = meshes_dir + scenario_name+'.msh' 175 153 176 154 # Where the boundary ordering files sit (this is used within build_boundary.py) 177 order_filename_dir = boundaries_dir+ order_filename155 urs_order = boundaries_folder+ order_filename 178 156 179 157 # Where the landward points of boundary extent sit (this is used within run_busselton.py) 180 landward_ dir = boundaries_dir + landward158 landward_boundary_dir = join(boundaries_dir, landward) 181 159 182 160 # Where the event sts files sits (this is created during the build_boundary.py) 183 161 boundaries_dir_event = boundaries_dir + str(event_number) + sep 184 boundaries_dir_mux = muxhome 185 urs_boundary_name = os.path.join(boundaries_dir_event, 162 urs_boundary_name = join(boundaries_dir_event, 186 163 scenario_name) 187 164 … … 193 170 194 171 # Where the directory of the gauges sit 195 gauges _dir_name = gauges_dir + gauge_name #used for get_timeseries.py196 building_in_dir_name = gauges_dir + building + '.csv' #used for run_building_inundation.py172 gauges = gauges_folder + gauges_filename #used for get_timeseries.py 173 building_in_dir_name = gauges_dir + building ' #used for run_building_inundation.py 197 174 198 175 #------------------------------------------------------------------------------ … … 201 178 202 179 # Land, to set the initial stage/water to be offcoast only 203 poly_mainland= read_polygon(polygons_dir+'initial_condition.csv')180 mainland_polygon = read_polygon(polygons_dir+'initial_condition.csv') 204 181 205 182 # Land, to set the initial stage/water to be offcoast only … … 207 184 208 185 # Initial bounding polygon for data clipping 209 poly_all= read_polygon(polygons_dir+'poly_all_extend.csv')210 res_poly_all = 100000*res_factor186 bounding_polygon = read_polygon(polygons_dir+'poly_all_extend.csv') 187 bounding_maxarea = 100000*scale_factor 211 188 212 189 # Area of Interest 1 (Busselton) 213 poly_aoi1= read_polygon(polygons_dir+'busselton_1km.csv')214 res_aoi1= 500*res_factor190 aoi1_polygon = read_polygon(polygons_dir+'busselton_1km.csv') 191 aoi1_maxarea = 500*res_factor 215 192 216 193 # Area of Interest 2 (Bunbury) … … 238 215 239 216 # Combined all regions, must check that all are included! 240 interior_regions = [[poly_aoi1,res_aoi1],[poly_aoi2,res_aoi2], 241 [poly_aos1,res_aos1],[poly_aos2,res_aos2], 242 [poly_aos3,res_aos3],[poly_aos4,res_aos4], 217 interior_regions = [[aoi1_polygon, aoi1_maxarea], 218 [poly_aoi2,res_aoi2], 219 [poly_aos1,res_aos1], 220 [poly_aos2,res_aos2], 221 [poly_aos3,res_aos3], 222 [poly_aos4,res_aos4], 243 223 [poly_sw1,res_sw1]] 244 224 245 225 246 trigs_min = number_mesh_triangles(interior_regions, poly_all,247 res_poly_all)226 trigs_min = number_mesh_triangles(interior_regions, 227 poly_all, res_poly_all) 248 228 print 'min estimated number of triangles', trigs_min 249 229
Note: See TracChangeset
for help on using the changeset viewer.