Changeset 5785 for anuga_work/production/perth/project_250m.py
- Timestamp:
- Sep 25, 2008, 1:34:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/perth/project_250m.py
r5782 r5785 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 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 50 52 51 53 interior_mesh = 'all' # Can have 'all' or 'none' for Phase 2 study 52 54 53 setup='final' ## Can replace with trial or basic, this action will thin the mesh 54 ## so that the run script will take less time (hence less acurate) 55 setup='final' # Final can be replaced with trial or basic. 56 # Either will result in a coarser mesh that will allow a 57 # faster, but less accurate, simulation. 55 58 56 59 if setup =='trial': … … 73 76 # Output Filename 74 77 #------------------------------------------------------------------------------ 75 ##Important to distiquish each run 78 # Important to distinguish each run - ensure str(user) is included! 79 # Note, the user is free to include as many parameters as desired 76 80 dir_comment='_'+setup+'_'+str(tide)+'_'+str(event_number)+'_250m_' + str(interior_mesh) +'_'+str(user) 77 81 78 82 #------------------------------------------------------------------------------ 79 # I NPUT DATA80 #------------------------------------------------------------------------------ 81 82 # #ELEVATION DATA## -used in build_perth.py83 # # onshore data: format ascii grid with accompaning projection file84 grid_250m_2005= 'grid'85 86 # #GAUGES##- used in get_timeseries.py83 # Input Data 84 #------------------------------------------------------------------------------ 85 86 # elevation data used in build_perth.py 87 # onshore data: format ascii grid with accompanying projection file 88 onshore_name = 'grid' 89 90 # gauges - used in get_timeseries.py 87 91 gauge_name = 'perth.csv' 88 92 gauge_name2 = 'thinned_MGA50.csv' 89 93 90 # #BOUNDING POLYGON## -used in build_boundary.py and run_perth.py respectively91 # NOTE: when files are put togethermust be in sequence - for ease go clockwise!92 # Check the run_perth.py for boundary_tags93 # #thinned ordering file from Hazard Map: formatindex,latitude,longitude (with title)94 # BOUNDING POLYGON - used in build_boundary.py and run_perth.py respectively 95 # NOTE: when files are put together the points must be in sequence - for ease go clockwise! 96 # Check the run_perth.py for boundary_tags 97 # thinned ordering file from Hazard Map: format is index,latitude,longitude (with title) 94 98 order_filename = 'thinned_boundary_ordering.txt' 95 # #landward bounding points99 #landward bounding points 96 100 landward = 'landward_bounding_polygon.txt' 97 101 98 102 #------------------------------------------------------------------------------ 99 # O UTPUT ELEVATION DATA100 #------------------------------------------------------------------------------ 101 # #Output filename for elevation102 # # its a combination of all the data put together(utilisied in build_boundary)103 # Output Elevation Data 104 #------------------------------------------------------------------------------ 105 # Output filename for elevation 106 # this is a combination of all the data (utilisied in build_boundary) 103 107 combined_name ='perth_combined_elevation_250m' 104 108 … … 117 121 118 122 #------------------------------------------------------------------------------ 119 # Location of input and output Data120 #------------------------------------------------------------------------------ 121 # #where the input data sits122 onshore_in_dir_name = topographies_in_dir + grid_250m_2005123 124 # #where the output data sits125 onshore_dir_name = topographies_dir + grid_250m_2005126 127 # #where the combinedfile sits123 # Location of input and output data 124 #------------------------------------------------------------------------------ 125 # where the input data sits 126 onshore_in_dir_name = topographies_in_dir + onshore_name 127 128 # where the output data sits 129 onshore_dir_name = topographies_dir + onshore_name 130 131 # where the combined elevation file sits 128 132 combined_dir_name = topographies_dir + combined_name 129 133 130 # #where the mesh sits (this is created during the run_perth.py)131 meshes_dir_name = meshes_dir + scenario_name + interior_mesh +'.msh'132 133 # where the boundary orderfiles sit (this is used within build_boundary.py)134 # where the mesh sits (this is created during the run_perth.py) 135 meshes_dir_name = meshes_dir + scenario_name+ interior_mesh +'.msh' 136 137 # where the boundary ordering files sit (this is used within build_boundary.py) 134 138 order_filename_dir = boundaries_dir + order_filename 135 139 136 # where the landward points of boundary extent sit (this is used within run_perth.py)140 # where the landward points of boundary extent sit (this is used within run_perth.py) 137 141 landward_dir = boundaries_dir + landward 138 142 139 # where the event sts files sits (this is created during the build_boundary.py)143 # where the event sts files sits (this is created during the build_boundary.py) 140 144 boundaries_dir_event = boundaries_dir + str(event_number) + sep 141 145 boundaries_dir_mux = muxhome 142 146 143 # where the directory of the output filename sits144 output_build_time_dir = output_dir+build_time+dir_comment+sep #used for build_perth.py145 output_run_time_dir = output_dir+run_time+dir_comment+sep #used for run_perth.py147 # where the directory of the output filename sits 148 output_build_time_dir = output_dir+build_time+dir_comment+sep #used for build_perth.py 149 output_run_time_dir = output_dir+run_time+dir_comment+sep #used for run_perth.py 146 150 output_run_time_dir_name = output_run_time_dir + scenario_name #Used by post processing 147 151 148 #w here the directory of the gauges sit149 gauges_dir_name = gauges_dir + gauge_name #used for get_timeseries.py150 gauges_dir_name2 = gauges_dir + gauge_name2 #used for get_timeseries.py152 #w here the directory of the gauges sit 153 gauges_dir_name = gauges_dir + gauge_name #used for get_timeseries.py 154 gauges_dir_name2 = gauges_dir + gauge_name2 #used for get_timeseries.py 151 155 152 156 #------------------------------------------------------------------------------ … … 154 158 #------------------------------------------------------------------------------ 155 159 156 #Land, to set the stage/water to be offcoast only160 #Land, to set the initial stage/water to be offcoast only 157 161 poly_mainland = read_polygon(polygons_dir+'initial_condition.csv') 158 162 159 # Initial bounding polygon for data clipping163 # Initial bounding polygon for data clipping 160 164 poly_all = read_polygon(polygons_dir+'poly_all.csv') 161 165 res_poly_all = 100000*res_factor 162 166 163 # Area of Interest 1 (Fremantle)167 # Area of Interest 1 (Fremantle) 164 168 poly_aoi1 = read_polygon(polygons_dir+'CBD_coastal.csv') 165 169 res_aoi1 = 500*res_factor 166 170 167 # Area of Interest 2 (Rockingham)171 # Area of Interest 2 (Rockingham) 168 172 poly_aoi2 = read_polygon(polygons_dir+'rockingham_penguin.csv') 169 173 res_aoi2 = 500*res_factor 170 174 171 # Area of Interest 2 (garden Island)175 # Area of Interest 2 (garden Island) 172 176 poly_aoi2a = read_polygon(polygons_dir+'garden.csv') 173 177 res_aoi2a= 500*res_factor 174 178 175 # Area of Interest 3 (geordie bay - record of tsunami impact)179 # Area of Interest 3 (geordie bay - record of tsunami impact) 176 180 poly_aoi3 = read_polygon(polygons_dir+'geordie_bay.csv') 177 181 res_aoi3 = 500*res_factor 178 182 179 # Area of Interest 4 (sorrento - record of tsunami impact)183 # Area of Interest 4 (sorrento - record of tsunami impact) 180 184 poly_aoi4 = read_polygon(polygons_dir+'sorrento_gauge.csv') 181 185 res_aoi4 = 500*res_factor 182 186 183 # Area of Significance 1 (Garden Island and sand bank infront of Rockingham)187 # Area of Significance 1 (Garden Island and sand bank infront of Rockingham) 184 188 poly_aos1 = read_polygon(polygons_dir+'garden_rockingham.csv') 185 189 res_aos1 = 1000*res_factor 186 190 187 # Area of Significance 2 (incorporate coastline of rottnest)191 # Area of Significance 2 (incorporate coastline of rottnest) 188 192 poly_aos2 = read_polygon(polygons_dir+'rottnest_external.csv') 189 193 res_aos2 = 1000*res_factor 190 194 191 # Refined areas192 # Polygon designed to incorporate Dredge Area from Fremantle to193 # Rockingham the steep incline was making the meshgo to 0195 # Refined areas 196 # Polygon designed to incorporate dredged area from Fremantle to 197 # Rockingham as the steep incline was making the elevation go to 0 194 198 poly_aos3 = read_polygon(polygons_dir+'DredgeArea.csv') 195 199 res_aos3 = 1000*res_factor 196 200 197 # Shallow water 1201 # Shallow water 1 198 202 poly_sw1 = read_polygon(polygons_dir+'internal_h20mORd3km.csv') 199 203 res_sw1 = 25000*res_factor 200 204 201 # Deep water (land of Rottnest, ANUGA does not do donuts!)205 # Deep water (land of Rottnest, ANUGA does not do donuts!) 202 206 poly_dw1 = read_polygon(polygons_dir+'rottnest_internal.csv') 203 207 res_dw1 = 100000*res_factor … … 215 219 print'Mesh = none' 216 220 interior_regions = [] 217 221 218 222 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 219 223 print 'min estimated number of triangles', trigs_min 220 224 221 222 225 #------------------------------------------------------------------------------ 223 226 # Clipping regions for export to asc and regions for clipping data 227 # Final inundation maps should only be created in regions of the finest mesh 224 228 #------------------------------------------------------------------------------ 225 229
Note: See TracChangeset
for help on using the changeset viewer.