Changeset 5569
- Timestamp:
- Jul 25, 2008, 8:53:51 AM (17 years ago)
- Location:
- anuga_work/production/perth
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/perth/build_boundary.py
r5551 r5569 34 34 urs_filenames = [os.path.join(dir, basename) for basename in urs_filenames.keys()] 35 35 36 # Reduce this list slightly37 urs_filenames = urs_filenames[:30] 38 for name in urs_filenames: 39 print name 36 # AS per David Burbidge email on friday 4th July the mag 9.3 event 37 # has 1m worth of slip on each sub fault therefore mutliple each unit 38 # soucre by the slip (10.4544) and sum the 44 time series together to 39 # get the time series for this event at the points on your boundary. 40 40 41 41 weights=10.4544*ones(len(urs_filenames),Float) 42 42 43 base_name=project.scenario_name44 order_filename=os.path.join(project.boundaries_dir, ' boundary_ordering.txt')43 scenario_name=project.scenario_name 44 order_filename=os.path.join(project.boundaries_dir, 'thinned_bound_order.txt') 45 45 46 46 print 'reading', order_filename 47 47 # Create ordered sts file 48 48 print 'creating sts file' 49 urs2sts(urs_filenames,basename_out=base_name, 49 50 urs2sts(urs_filenames,basename_out=scenario_name, 50 51 ordering_filename=order_filename, 51 52 weights=weights, … … 54 55 55 56 # Read in boundary from ordered sts file 56 urs_boundary =create_sts_boundary(base_name)57 urs_boundary_polygon=create_sts_boundary(scenario_name) 57 58 59 60 61 62 63 64 -
anuga_work/production/perth/export_results.py
r5498 r5569 8 8 #time_dir = '20080530_170833_run_final_0.6_exmouth_kvanputt' 9 9 #time_dir = '20080619_115643_run_trial_0.6_exmouth_kvanputt' 10 time_dir = '20080714_095738_run_final_0.6_exmouth_kvanputt' 11 10 #time_dir = '20080714_095738_run_final_0.6_exmouth_kvanputt' 11 #time_dir = '20080714_134935_run_final_0_exmouth_kvanputt' 12 time_dir = '20080718_112228_run_final_0_exmouth_kvanputt' 12 13 13 14 cellsize = 25 -
anuga_work/production/perth/get_timeseries.py
r5431 r5569 16 16 17 17 18 timestamp='20080 619_115643_run_trial_0.6_exmouth_kvanputt'18 timestamp='20080724_121200_run_trial_0.6_polyline_alpha0.1_kvanputt' 19 19 20 20 filename=project.output_dir+timestamp+sep+project.scenario_name+'.sww' -
anuga_work/production/perth/project.py
r5558 r5569 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.shallow_water.data_manager import urs2sts,create_sts_boundary 13 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon 12 14 13 15 # file and system info … … 36 38 tide = 0.6 37 39 38 alpha = 0. 240 alpha = 0.1 39 41 friction=0.01 40 42 starttime=0 41 43 finaltime=80000 42 44 export_cellsize=25 43 setup=' trial'45 setup='final' 44 46 source='polyline' 45 47 … … 160 162 buildings_filename_out = 'Perth_res_Project_modified.csv' 161 163 162 ############################### 163 # Domain definitions 164 ############################### 165 from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon 166 167 poly_all = read_polygon(polygons_dir+'poly_all.csv') 168 res_poly_all = 100000*res_factor 169 170 #refzone = 50 164 171 165 172 166 ############################### 173 167 # Interior region definitions 174 168 ############################### 169 170 #Initial bounding polygon for data clipping 171 poly_all = read_polygon(polygons_dir+'poly_all.csv') 172 res_poly_all = 100000*res_factor 175 173 176 174 #Polygon designed by 20m contours, or 3km from the coastline … … 217 215 ,[poly_rottnest_ex, res_rottnest_ex], [poly_garden, res_garden]] 218 216 219 boundary_tags={'back': [0,1,2], 'side': [3,7],'ocean': [4, 5, 6]} 220 217 221 218 trigs_min = number_mesh_triangles(interior_regions, poly_all, res_poly_all) 222 223 219 print 'min number triangles', trigs_min 220 224 221 225 222 poly_mainland = read_polygon(polygons_dir+'initial_condition.csv') -
anuga_work/production/perth/run_perth.py
r5557 r5569 30 30 from anuga.shallow_water import Field_boundary 31 31 from Numeric import allclose 32 from anuga.shallow_water.data_manager import export_grid 32 from anuga.shallow_water.data_manager import export_grid, create_sts_boundary 33 33 34 34 from anuga.pmesh.mesh_interface import create_mesh_from_regions … … 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 … … 70 71 print "Processor Name:",get_processor_name() 71 72 72 # filenames 73 # meshes_dir_name = project.meshes_dir_name+'.msh' 74 75 # creates copy of code in output dir 76 print 'min triangles', project.trigs_min, 77 print 'Note: This is generally about 20% less than the final amount' 78 73 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], 'side': [N,N+4],'ocean': range(N)} 91 92 79 93 #-------------------------------------------------------------------------- 80 94 # Create the triangular mesh based on overall clipping polygon with a … … 90 104 print 'start create mesh from regions' 91 105 92 create_mesh_from_regions( project.poly_all,93 boundary_tags= project.boundary_tags,106 create_mesh_from_regions(bounding_polygon, 107 boundary_tags=boundary_tags, 94 108 maximum_triangle_area=project.res_poly_all, 95 109 interior_regions=project.interior_regions, … … 168 182 print 'domain id', id(domain) 169 183 170 184 boundary_urs_out=project.boundaries_dir_name 185 171 186 print 'Available boundary tags', domain.get_boundary_tags() 172 187 Bf = File_boundary(boundary_urs_out+'.sts', … … 174 189 use_cache=True, 175 190 verbose = True, 176 boundary_polygon= project.bounding_polygon)191 boundary_polygon=bounding_polygon) 177 192 178 193 Br = Reflective_boundary(domain)
Note: See TracChangeset
for help on using the changeset viewer.