Changeset 5783
- Timestamp:
- Sep 25, 2008, 10:39:12 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/perth/project.py
r5781 r5783 1 1 """Common filenames and locations for elevation, meshes and outputs. 2 This script is the heart of all scripts in folder2 This script is the heart of all scripts in the folder 3 3 """ 4 4 #------------------------------------------------------------------------------ … … 18 18 # Directory setup 19 19 #------------------------------------------------------------------------------ 20 # #Note: INUNDATIONHOME is the inundation directory, not the data directory.20 # Note: INUNDATIONHOME is the inundation directory, not the data directory. 21 21 22 22 home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent diruser = get_user_name() … … 25 25 host = get_host_name() 26 26 27 # #time stuff28 time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir29 gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir27 # determines time for setting up output directories 28 time = strftime('%Y%m%d_%H%M%S',localtime()) 29 gtime = strftime('%Y%m%d_%H%M%S',gmtime()) 30 30 build_time = time+'_build' 31 31 run_time = time+'_run' 32 print 'gtime: ', gtime33 32 34 33 #------------------------------------------------------------------------------ … … 36 35 #------------------------------------------------------------------------------ 37 36 38 ##Changed to reflect the modeled community (also sets up the directory system) 37 # this section needs to be updated to reflect the modelled community. 38 # Note, the user needs to set up the directory system accordingly 39 39 state = 'western_australia' 40 40 scenario_name = 'perth' 41 41 scenario = 'perth_tsunami_scenario' 42 ##One or all can be changed each time the run_scenario script is excuted 43 tide = 0 #0.6 44 #event_number = 27255 42 43 # Model specific parameters. One or all can be changed each time the 44 # run_scenario script is executed 45 tide = 0 #0.6 46 #event_number = 27255 # linked to hazard map 45 47 event_number = 27283 46 alpha = 0.1 47 friction=0.01 48 starttime=0 49 finaltime=80000 50 51 setup='final' ## Can replace with trial or basic, this action will thin the mesh 52 ## so that the run script will take less time (hence less acurate) 48 alpha = 0.1 # smoothing parameter for mesh 49 friction=0.01 # manning's friction coefficient 50 starttime=0 51 finaltime=80000 # final time for simulation 52 53 setup='final' # Final can be replaced with trial or basic. 54 # Either will result in a coarser mesh that will allow a 55 # faster, but less accurate, simulation. 53 56 54 57 if setup =='trial': … … 71 74 # Output Filename 72 75 #------------------------------------------------------------------------------ 73 ##Important to distiquish each run 76 # Important to distinguish each run - ensure str(user) is included! 77 # Note, the user is free to include as many parameters as desired 74 78 dir_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_'+ 'alpha' +str(alpha)+'_'+str(user) 75 79 76 80 #------------------------------------------------------------------------------ 77 # I NPUT DATA78 #------------------------------------------------------------------------------ 79 80 # #ELEVATION DATA## -used in build_perth.py81 # # onshore data: format ascii grid with accompaning projection file81 # Input Data 82 #------------------------------------------------------------------------------ 83 84 # elevation data used in build_perth.py 85 # onshore data: format ascii grid with accompanying projection file 82 86 onshore_name = 'perth_dli_ext' 83 # # island: format ascii grid with accompaning projection file87 # island: format ascii grid with accompanying projection file 84 88 island_name = 'rott_dli_ext' 85 89 island_name1 = 'gard_dli_ext' 86 90 island_name2 = 'carnac_island_dli_ext' 87 91 island_name3 = 'penguin_dli_ext' 88 # #coastline: format x,y,elevation (with title)92 # coastline: format x,y,elevation (with title) 89 93 coast_name = 'coastline_perthP.txt' 90 # #bathymetry: format x,y,elevation (with title)94 # bathymetry: format x,y,elevation (with title) 91 95 offshore_name = 'Perth.txt' 92 96 offshore_name1 = 'Perth_Chart.txt' … … 94 98 offshore_name3 = 'port_swanriver.txt' 95 99 96 # #GAUGES##- used in get_timeseries.py100 # gauges - used in get_timeseries.py 97 101 gauge_name = 'perth.csv' 98 102 gauge_name2 = 'thinned_MGA50.csv' 99 103 100 # #BOUNDING POLYGON## -used in build_boundary.py and run_perth.py respectively101 # NOTE: when files are put togethermust be in sequence - for ease go clockwise!102 # Check the run_perth.py for boundary_tags103 # #thinned ordering file from Hazard Map: formatindex,latitude,longitude (with title)104 # BOUNDING POLYGON - used in build_boundary.py and run_perth.py respectively 105 # NOTE: when files are put together the points must be in sequence - for ease go clockwise! 106 # Check the run_perth.py for boundary_tags 107 # thinned ordering file from Hazard Map: format is index,latitude,longitude (with title) 104 108 order_filename = 'thinned_boundary_ordering.txt' 105 # #landward bounding points109 #landward bounding points 106 110 landward = 'landward_bounding_polygon.txt' 107 111 108 112 #------------------------------------------------------------------------------ 109 # O UTPUT ELEVATION DATA110 #------------------------------------------------------------------------------ 111 # #Output filename for elevation112 # # its a combination of all the data put together(utilisied in build_boundary)113 # Output Elevation Data 114 #------------------------------------------------------------------------------ 115 # Output filename for elevation 116 # this is a combination of all the data (utilisied in build_boundary) 113 117 combined_name ='perth_combined_elevation' 114 118 combined_smaller_name = 'perth_combined_elevation_smaller' … … 128 132 129 133 #------------------------------------------------------------------------------ 130 # Location of input and output Data131 #------------------------------------------------------------------------------ 132 # #where the input data sits134 # Location of input and output data 135 #------------------------------------------------------------------------------ 136 # where the input data sits 133 137 onshore_in_dir_name = topographies_in_dir + onshore_name 134 138 island_in_dir_name = topographies_in_dir + island_name … … 142 146 offshore_in_dir_name3 = topographies_in_dir + offshore_name3 143 147 144 # #where the output data sits148 # where the output data sits 145 149 onshore_dir_name = topographies_dir + onshore_name 146 150 island_dir_name = topographies_dir + island_name … … 154 158 offshore_dir_name3 = topographies_dir + offshore_name3 155 159 156 # #where the combinedfile sits160 # where the combined elevation file sits 157 161 combined_dir_name = topographies_dir + combined_name 158 162 combined_smaller_name_dir = topographies_dir + combined_smaller_name 159 163 160 # #where the mesh sits (this is created during the run_perth.py)164 # where the mesh sits (this is created during the run_perth.py) 161 165 meshes_dir_name = meshes_dir + scenario_name+'.msh' 162 166 163 # where the boundary orderfiles sit (this is used within build_boundary.py)167 # where the boundary ordering files sit (this is used within build_boundary.py) 164 168 order_filename_dir = boundaries_dir + order_filename 165 169 166 # where the landward points of boundary extent sit (this is used within run_perth.py)170 # where the landward points of boundary extent sit (this is used within run_perth.py) 167 171 landward_dir = boundaries_dir + landward 168 172 169 # where the event sts files sits (this is created during the build_boundary.py)173 # where the event sts files sits (this is created during the build_boundary.py) 170 174 boundaries_dir_event = boundaries_dir + str(event_number) + sep 171 175 boundaries_dir_mux = muxhome 172 176 173 # where the directory of the output filename sits174 output_build_time_dir = output_dir+build_time+dir_comment+sep #used for build_perth.py175 output_run_time_dir = output_dir+run_time+dir_comment+sep #used for run_perth.py177 # where the directory of the output filename sits 178 output_build_time_dir = output_dir+build_time+dir_comment+sep #used for build_perth.py 179 output_run_time_dir = output_dir+run_time+dir_comment+sep #used for run_perth.py 176 180 output_run_time_dir_name = output_run_time_dir + scenario_name #Used by post processing 177 181 178 #w here the directory of the gauges sit179 gauges_dir_name = gauges_dir + gauge_name #used for get_timeseries.py180 gauges_dir_name2 = gauges_dir + gauge_name2 #used for get_timeseries.py182 #w here the directory of the gauges sit 183 gauges_dir_name = gauges_dir + gauge_name #used for get_timeseries.py 184 gauges_dir_name2 = gauges_dir + gauge_name2 #used for get_timeseries.py 181 185 182 186 #------------------------------------------------------------------------------ … … 184 188 #------------------------------------------------------------------------------ 185 189 186 #Land, to set the stage/water to be offcoast only190 #Land, to set the initial stage/water to be offcoast only 187 191 poly_mainland = read_polygon(polygons_dir+'initial_condition.csv') 188 192 189 # Initial bounding polygon for data clipping193 # Initial bounding polygon for data clipping 190 194 poly_all = read_polygon(polygons_dir+'poly_all.csv') 191 195 res_poly_all = 100000*res_factor 192 196 193 # Area of Interest 1 (Fremantle)197 # Area of Interest 1 (Fremantle) 194 198 poly_aoi1 = read_polygon(polygons_dir+'CBD_coastal.csv') 195 199 res_aoi1 = 500*res_factor 196 200 197 # Area of Interest 2 (Rockingham)201 # Area of Interest 2 (Rockingham) 198 202 poly_aoi2 = read_polygon(polygons_dir+'rockingham_penguin.csv') 199 203 res_aoi2 = 500*res_factor 200 204 201 # Area of Interest 2 (garden Island)205 # Area of Interest 2 (garden Island) 202 206 poly_aoi2a = read_polygon(polygons_dir+'garden.csv') 203 207 res_aoi2a= 500*res_factor 204 208 205 # Area of Interest 3 (geordie bay - record of tsunami impact)209 # Area of Interest 3 (geordie bay - record of tsunami impact) 206 210 poly_aoi3 = read_polygon(polygons_dir+'geordie_bay.csv') 207 211 res_aoi3 = 500*res_factor 208 212 209 # Area of Interest 4 (sorrento - record of tsunami impact)213 # Area of Interest 4 (sorrento - record of tsunami impact) 210 214 poly_aoi4 = read_polygon(polygons_dir+'sorrento_gauge.csv') 211 215 res_aoi4 = 500*res_factor 212 216 213 # Area of Significance 1 (Garden Island and sand bank infront of Rockingham)217 # Area of Significance 1 (Garden Island and sand bank infront of Rockingham) 214 218 poly_aos1 = read_polygon(polygons_dir+'garden_rockingham.csv') 215 219 res_aos1 = 1000*res_factor 216 220 217 # Area of Significance 2 (incorporate coastline of rottnest)221 # Area of Significance 2 (incorporate coastline of rottnest) 218 222 poly_aos2 = read_polygon(polygons_dir+'rottnest_external.csv') 219 223 res_aos2 = 1000*res_factor 220 224 221 # Refined areas222 # Polygon designed to incorporate Dredge Area from Fremantle to223 # Rockingham the steep incline was making the meshgo to 0225 # Refined areas 226 # Polygon designed to incorporate dredged area from Fremantle to 227 # Rockingham as the steep incline was making the elevation go to 0 224 228 poly_aos3 = read_polygon(polygons_dir+'DredgeArea.csv') 225 229 res_aos3 = 1000*res_factor 226 230 227 # Shallow water 1231 # Shallow water 1 228 232 poly_sw1 = read_polygon(polygons_dir+'internal_h20mORd3km.csv') 229 233 res_sw1 = 25000*res_factor 230 234 231 # Deep water (land of Rottnest, ANUGA does not do donuts!)235 # Deep water (land of Rottnest, ANUGA does not do donuts!) 232 236 poly_dw1 = read_polygon(polygons_dir+'rottnest_internal.csv') 233 237 res_dw1 = 100000*res_factor … … 244 248 print 'min estimated number of triangles', trigs_min 245 249 246 247 250 #------------------------------------------------------------------------------ 248 251 # Clipping regions for export to asc and regions for clipping data 252 # Final inundation maps should only be created in regions of the finest mesh 249 253 #------------------------------------------------------------------------------ 250 254
Note: See TracChangeset
for help on using the changeset viewer.