Changeset 5415 for anuga_work/production/busselton/project.py
- Timestamp:
- Jun 24, 2008, 10:24:21 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/busselton/project.py
r5408 r5415 13 13 # file and system info 14 14 #--------------------------------- 15 #codename = 'project.py' 15 16 16 17 home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent dir 17 18 user = get_user_name() 18 19 host = get_host_name() 20 19 21 # INUNDATIONHOME is the inundation directory, not the data directory. 20 21 #needed when running using mpirun, mpirun doesn't inherit umask from .bashrc22 umask(002)23 22 24 23 #time stuff 25 24 time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir 25 gtime = strftime('%Y%m%d_%H%M%S',gmtime()) #gets time for new dir 26 26 build_time = time+'_build' 27 27 run_time = time+'_run' 28 29 tide = 0.6 28 print 'gtime: ', gtime 30 29 31 30 #Making assumptions about the location of scenario data … … 34 33 scenario = 'busselton_tsunami_scenario' 35 34 36 #Maybe will try to make project a class to allow these parameters to be passed in. 35 tide = 0.6 36 37 37 alpha = 0.1 38 38 friction=0.01 39 39 starttime=0 40 midtime=21600 41 #finaltime=25000 42 finaltime=86000 40 finaltime=80000 43 41 export_cellsize=25 44 42 setup='final' … … 62 60 yieldstep=60 63 61 64 dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+str(user) 65 66 67 # onshore data provided by WA DLI 68 #onshore_name = 'DLI_orthophoto_DEM' # original 69 onshore_name = 'dli_dem_clipped' # original 70 #islands 62 rev_num = 'current' 63 ##rev_num = '4695' # 2nd Sept 2007 64 ##rev_num = '4743' # 3nd Oct 2007 65 ##rev_num = '4777' # 1st Nov 2007 66 ##rev_num = '4874' # 3rd Dec 2007 67 ##rev_num = '4901' # 3rd Jan 2007 68 ##rev_num = '4990' # 5th Feb 2007 69 ##rev_num = '5103' # 3rd March 2007 70 ##rev_num = '5185' # 1st April 2007 71 ##rev_num = '5273' # 2nd May 2007 72 73 74 dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+str(rev_num)+'_'+str(user) 75 76 77 # onshore data provided by WA DLI - provided by Hamish on the 17th June 2008 78 79 onshore_name = 'busselton_v2_gda94_mga50' # original 71 80 72 81 # AHO + DPI data 73 coast_name = 'coastline_excluding_beach_survey' 74 coast_name1 = 'bussleton_beach_data' 75 offshore_name = 'Busselton_bathymetry' 82 coast_name = 'Contour_0' # provided by hamish, represent better coastline than the 100km as compared to charts 83 coast_name1 = 'beach_survey_final' 84 offshore_name = 'Bathymetry_final' 85 offshore_name1 = 'Busselton_Chart' 86 offshore_name2 = 'Busselton_Digitised' 76 87 77 88 #final topo name … … 82 93 83 94 topographies_in_dir = home+state+sep+scenario+sep+'elevation_final'+sep+'points'+sep 84 topographies_dir = home+state+sep+scenario+sep+'anuga'+sep+'topographies'+sep95 topographies_dir = anuga_dir+'topographies'+sep 85 96 86 97 # input topo file location … … 89 100 coast_in_dir_name = topographies_in_dir + coast_name #coastline 90 101 coast_in_dir_name1 = topographies_in_dir + coast_name1 #beach survey 102 91 103 offshore_in_dir_name = topographies_in_dir + offshore_name #bathymetry 104 offshore_in_dir_name1 = topographies_in_dir + offshore_name1 #bathymetry Charts 105 offshore_in_dir_name2 = topographies_in_dir + offshore_name2 #Digitised Fairsheet 92 106 93 107 #output to anuga from build file … … 96 110 coast_dir_name = topographies_dir + coast_name 97 111 coast_dir_name1 = topographies_dir + coast_name1 112 98 113 offshore_dir_name = topographies_dir + offshore_name 114 offshore_dir_name1 = topographies_dir + offshore_name1 115 offshore_dir_name2 = topographies_dir + offshore_name2 99 116 100 117 #final topo files … … 108 125 tide_dir = anuga_dir+'tide_data'+sep 109 126 127 #boundaries_source = '1' 128 110 129 if source=='exmouth': 111 130 boundaries_name = 'busselton_3103_30052008' #exmouth gun … … 114 133 if source=='test': 115 134 boundaries_name = 'other' #exmouth gun 116 boundaries_in_dir = anuga_dir+'boundaries'+sep +'urs'+sep+'exmouth'+sep+'1_10000'+sep135 boundaries_in_dir = anuga_dir+'boundaries'+sep 117 136 118 137 … … 124 143 #output locations 125 144 output_dir = anuga_dir+'outputs'+sep 126 output_build_time_dir = output_dir +build_time+dir_comment+sep145 output_build_time_dir = output_dir +'test'+sep + build_time + dir_comment + sep 127 146 #output_run_time_dir = output_dir +run_time+dir_comment+sep 128 output_run_time_dir = anuga_dir+sep+'outputs'+sep+run_time+dir_comment+sep147 output_run_time_dir = output_dir +'test'+sep + run_time + dir_comment +sep # take test out 129 148 output_run_time_dir_name = output_run_time_dir + scenario_name #Used by post processing 130 149 131 150 #gauges 132 gauge_name = ' ???.csv'151 gauge_name = 'busselton.csv' 133 152 gauges_dir = home+state+sep+scenario+sep+'anuga'+sep+'gauges'+sep 134 153 gauges_dir_name = gauges_dir + gauge_name … … 151 170 res_poly_all = 100000*res_factor 152 171 172 173 ############################### 174 # Interior region definitions 175 ############################### 176 177 #digitized polygons 178 poly_large = read_polygon(polygons_dir+'coast_5km_d20m.csv') 179 res_large = 1000*res_factor 180 181 poly_busselton = read_polygon(polygons_dir+'busselton_1km.csv') 182 res_busselton = 500*res_factor 183 184 poly_bunbury = read_polygon(polygons_dir+'bunbury_1km.csv') 185 res_bunbury = 500*res_factor 186 187 188 interior_regions = [[poly_large,res_large],[poly_busselton,res_busselton],[poly_bunbury,res_bunbury]] 189 190 191 boundary_tags={'back': [0, 1, 2, 3, 4, 9], 192 'side': [5], 'ocean': [6, 7, 8]} 193 194 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 195 196 poly_mainland=read_polygon(polygons_dir+'initial_condition.csv') 197 198 print 'min number triangles', trigs_min 199 200 153 201 ################################################################### 154 202 # Clipping regions for export to asc and regions for clipping data 155 203 ################################################################### 156 204 157 # exporting asc grid 158 eastingmin = 340000 159 eastingmax = 350000 160 northingmin = 6273400 161 northingmax = 6277700 162 163 ############################### 164 # Interior region definitions 165 ############################### 166 167 #digitized polygons 168 poly_busselton1 = read_polygon(polygons_dir+'neg20_pos10_polygon.csv') 169 res_busselton1 = 10000*res_factor 170 171 poly_busselton2 = read_polygon(polygons_dir+'neg5_pos5_poly.csv') 172 res_busselton2 = 500*res_factor 173 174 #plot_polygons([polyAll,poly_broome1,poly_broome2,poly_broome3],figname='boundingpoly2',verbose=False) 175 176 interior_regions = [[poly_busselton1,res_busselton1],[poly_busselton2,res_busselton2]] 177 print 'Hello',interior_regions 178 179 boundary_tags={'back': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14], 180 'side': [10], 'ocean': [11, 12, 13]} 181 182 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 183 184 poly_mainland=read_polygon(polygons_dir+'initial_condition.csv') 185 186 print 'min number triangles', trigs_min 187 188 205 # exporting asc grid for Busselton 206 xminBusselton = 325000 207 xmaxBusselton = 360000 208 yminBusselton = 6273000 209 ymaxBusselton = 6290000 210 211 # exporting asc grid for Busselton 212 xminBunbury = 370000 213 xmaxBunbury = 386000 214 yminBunbury = 6305000 215 ymaxBunbury = 6334000
Note: See TracChangeset
for help on using the changeset viewer.