Changeset 5575
- Timestamp:
- Jul 25, 2008, 4:17:26 PM (16 years ago)
- Location:
- anuga_work/production/busselton
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/busselton/export_results.py
r5478 r5575 17 17 #time_dir = '20080707_164738_run_trial_0.6_exmouth_5120_kvanputt' 18 18 #time_dir = '20080707_165101_run_trial_0.6_exmouth_5140_kvanputt' 19 time_dir = '20080707_165619_run_trial_0.6_exmouth_5160_kvanputt' 19 #time_dir = '20080707_165619_run_trial_0.6_exmouth_5160_kvanputt' 20 #time_dir = '20080708_101451_run_trial_0.6_exmouth_4743_jsexton' 21 #time_dir = '20080708_101731_run_trial_0.6_exmouth_4777_jsexton' 22 #time_dir = '20080710_095410_run_trial_0.6_exmouth_4695_jsexton' 23 time_dir = '20080717_092900_run_final_0_exmouth_newExtent_kvanputt' 20 24 21 25 22 26 cellsize = 25 23 27 #cellsize = 150 24 #timestep = 028 timestep = 0 25 29 directory = project.output_dir 26 30 name = directory+sep+'test'+sep+time_dir+sep+project.scenario_name … … 35 39 print 'output dir:', name 36 40 37 #var = [0,4]41 var = [0,4] 38 42 #var = [2,3] # depth and Speed 39 var = [2,3,4] # elevation, depth and Speed43 #var = [2,3,4] # elevation, depth and Speed 40 44 41 45 … … 82 86 sww2dem(name, basename_out = outname, 83 87 quantity = quantityname, 84 #timestep = timestep,88 timestep = timestep, 85 89 cellsize = cellsize, 86 90 #easting_min = project_grad.e_min_area, -
anuga_work/production/busselton/project.py
r5526 r5575 10 10 #from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_points_from_latlon_to_utm 11 11 from anuga.utilities.system_tools import get_user_name, get_host_name 12 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon 12 13 13 14 # file and system info … … 16 17 17 18 home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent dir 19 muxhome = getenv('MUXHOME') 18 20 user = get_user_name() 19 21 host = get_host_name() … … 33 35 scenario = 'busselton_tsunami_scenario' 34 36 35 tide = 0 37 tide = 0.6 36 38 37 39 alpha = 0.1 38 40 friction=0.01 39 41 starttime=0 40 finaltime= 50000 # changed for rev_number trial42 finaltime=80000 41 43 export_cellsize=25 42 44 setup='final' 43 source=' exmouth'45 source='polyline' 44 46 45 47 … … 135 137 #boundaries_source = '1' 136 138 137 if source=='exmouth':138 boundaries_name = 'busselton_3103_30052008' #exmouth gun139 boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep140 141 if source=='test':142 boundaries_name = 'other' #exmouth gun143 boundaries_in_dir = anuga_dir+'boundaries'+sep144 139 ##if source=='exmouth': 140 ## boundaries_name = 'busselton_3103_30052008' # exmouth gun 141 ## boundaries_in_dir = anuga_dir+'boundaries'+sep+'urs'+sep+'exmouth'+sep+'1_10000'+sep 142 ## 143 ##if source=='test': 144 ## boundaries_name = 'other' #exmouth gun 145 ## boundaries_in_dir = anuga_dir+'boundaries'+sep 146 ## 145 147 146 148 #boundaries locations 147 boundaries_in_dir_name = boundaries_in_dir + boundaries_name149 #boundaries_in_dir_name = boundaries_in_dir + boundaries_name 148 150 boundaries_dir = anuga_dir+'boundaries'+sep 149 151 boundaries_dir_name = boundaries_dir + scenario_name 152 boundaries_dir_mux = muxhome 150 153 151 154 #output locations 152 155 output_dir = anuga_dir+'outputs'+sep 153 #output_build_time_dir = output_dir +'test'+sep + build_time + dir_comment + sep154 156 output_build_time_dir = output_dir +build_time + dir_comment + sep 155 #output_run_time_dir = output_dir +run_time+dir_comment+sep 156 output_run_time_dir = output_dir +'test'+sep + run_time + dir_comment +sep # take test out 157 output_run_time_dir = output_dir + run_time + dir_comment +sep 157 158 output_run_time_dir_name = output_run_time_dir + scenario_name #Used by post processing 158 159 … … 170 171 171 172 ############################### 172 # Domain definitions173 # Interior region definitions 173 174 ############################### 174 175 175 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon 176 177 # bounding polygon for study area 176 # Initial bounding polygon for data clipping 178 177 poly_all = read_polygon(polygons_dir+'poly_all_extend.csv') 179 178 res_poly_all = 100000*res_factor 180 181 182 ###############################183 # Interior region definitions184 ###############################185 179 186 180 #digitized polygons … … 209 203 210 204 211 boundary_tags={'back': [3, 4, 5, 6, 7],212 'side': [2, 8], 'ocean': [0, 1, 9]}213 214 205 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 206 print 'min number triangles', trigs_min 215 207 216 208 poly_mainland=read_polygon(polygons_dir+'initial_condition.csv') 217 218 print 'min number triangles', trigs_min219 209 220 210 -
anuga_work/production/busselton/run_busselton.py
r5480 r5575 39 39 from anuga.damage_modelling.inundation_damage import add_depth_and_momentum2csv, inundation_damage 40 40 from anuga.fit_interpolate.benchmark_least_squares import mem_usage 41 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon 41 42 42 43 # Application specific imports … … 71 72 print "Processor Name:",get_processor_name() 72 73 73 # filenames 74 # meshes_dir_name = project.meshes_dir_name+'.msh' 75 76 # creates copy of code in output dir 77 print 'min triangles', project.trigs_min, 78 print 'Note: This is generally about 20% less than the final amount' 79 74 #----------------------------------------------------------------------- 75 # Domain definitions 76 #----------------------------------------------------------------------- 77 78 # Read in boundary from ordered sts file 79 urs_bounding_polygon=create_sts_boundary(project.scenario_name) 80 81 # Reading the landward defined points, this incorporates the original clipping 82 # polygon minus the 100m contour 83 landward_bounding_polygon = read_polygon(project.polygons_dir+'landward_bounding_polygon.txt') 84 85 # Combine sts polyline with landward points 86 bounding_polygon = urs_bounding_polygon + landward_bounding_polygon 87 88 # counting segments 89 N = len(urs_bounding_polygon)-1 90 boundary_tags={'back': [N+1,N+2,N+3,N+4, N+5], 'side': [N,N+6],'ocean': range(N)} 91 92 80 93 #-------------------------------------------------------------------------- 81 94 # Create the triangular mesh based on overall clipping polygon with a … … 106 119 print 'Setup computational domain' 107 120 108 #domain = cache(Domain, (meshes_dir_name), {'use_cache':True, 'verbose':True}, verbose=True)109 #above don't work110 121 domain = Domain(project.meshes_dir_name+'.msh', use_cache=False, verbose=True) 111 122 print 'memory usage before del domain',mem_usage() … … 168 179 print 'Available boundary tags', domain.get_boundary_tags() 169 180 print 'domain id', id(domain) 170 #print 'Reading Boundary file',project.boundaries_dir_namea + '.sww' 171 181 172 182 print'set_boundary' 173 183 184 boundary_urs_out=project.boundaries_dir_name 185 186 print 'Available boundary tags', domain.get_boundary_tags() 187 Bf = File_boundary(boundary_urs_out+'.sts', 188 domain, time_thinning=1, 189 use_cache=True, 190 verbose = True, 191 boundary_polygon=bounding_polygon) 192 174 193 Br = Reflective_boundary(domain) 175 194 Bd = Dirichlet_boundary([kwargs['tide'],0,0]) 176 Bw = Dirichlet_boundary([kwargs['tide']+10.0,0,0]) # To be deleted for FESA runs 177 178 Bf = Field_boundary(kwargs['boundary_file'], 179 domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'], 180 use_cache=True, verbose=True) 195 #Bw = Dirichlet_boundary([kwargs['tide']+10.0,0,0]) # To be deleted for FESA runs 196 181 197 print 'finished reading boundary file' 198 182 199 domain.set_boundary({'back': Bd, 183 184 'ocean': Bd}) #changed from Bf to Bd for large wave200 'side': Bd, 201 'ocean': Bf}) #changed from Bf to Bd for large wave 185 202 186 203 kwargs['input_start_time']=domain.starttime … … 198 215 domain.write_boundary_statistics(tags = 'ocean') 199 216 200 # To be deleted for FESA runs201 if allclose(t, 240):202 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bw})203 204 if allclose(t, 1440):205 domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd})217 ## # To be deleted for FESA runs 218 ## if allclose(t, 240): 219 ## domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bw}) 220 ## 221 ## if allclose(t, 1440): 222 ## domain.set_boundary({'back': Br, 'side': Bd, 'ocean': Bd}) 206 223 207 224
Note: See TracChangeset
for help on using the changeset viewer.