Changeset 4616
- Timestamp:
- Jul 9, 2007, 3:24:23 PM (17 years ago)
- Location:
- anuga_work/production/shark_bay_2007
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/shark_bay_2007/build_shark_bay.py
r4577 r4616 114 114 print 'project.boundary_name', project.boundary_name 115 115 116 urs_ungridded2sww(project.boundary_name, verbose=True );117 #verbose=True, mint=5000, maxt=35000, zscale=1)116 urs_ungridded2sww(project.boundary_name, verbose=True, 117 mint=0, maxt=40000, zscale=1) 118 118 119 119 -
anuga_work/production/shark_bay_2007/project.py
r4601 r4616 31 31 run_time = time+'_run' 32 32 33 #tide = -3.9 34 tide = 0.0 35 #tide = 3.6 33 #tide = 0.0 # MSL 34 tide = 0.85 # HAT average between Denham and Canarvon 36 35 37 36 #Maybe will try to make project a class to allow these parameters to be passed in. 38 37 alpha = 0.1 39 38 friction=0.01 40 finaltime= 2500041 starttime= 360039 finaltime=40000 40 starttime=6000 # Action starts at 9000 42 41 setup='final' 43 42 #setup='trial' 44 43 source='shark_bay' 45 44 46 boundary_event = 'july2006'47 #boundary_event = '10000'45 #boundary_event = 'july2006' 46 boundary_event = '10000' 48 47 49 48 if setup =='trial': … … 59 58 if setup =='final': 60 59 print'final' 61 res_factor=1. 160 res_factor=1.0 62 61 time_thinning=4 63 62 yieldstep=60 64 63 65 64 65 66 66 dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+\ 67 str(user)+'_'+boundary_event 67 str(user)+'_'+boundary_event+'_'+'tide'+str(tide)+'_coastpolys' 68 69 #dir_comment='_'+setup+'_'+str(tide)+'_'+str(source)+'_'+\ 70 # str(user)+'_'+boundary_event 68 71 69 72 # elevation data filenames … … 160 163 161 164 165 166 #FIXME (Ole): It is bad to read in polygons in project.py. If a file does not exist 167 #project.py cannot be imported 168 162 169 # Bounding polygon 163 170 bounding_polygon = read_polygon(join(polygons_dir, 'boundary_extent_small.csv')) 164 res_bounding_polygon = 350000*res_factor171 res_bounding_polygon = 500000*res_factor 165 172 166 173 #Interior regions 167 poly_inundated_area = read_polygon(join(polygons_dir, 'inundated_area.csv')) 168 res_inundated_area = 10*res_factor 169 170 poly_tsunami_approach_area = read_polygon(join(polygons_dir, 'tsunami_approach_area.csv')) 171 res_tsunami_approach_area = 50*res_factor 172 173 poly_bay_area = read_polygon(join(polygons_dir, 'bay_area.csv')) 174 res_bay_area = 1000*res_factor 175 176 poly_map_area = read_polygon(join(polygons_dir, 'map_area.csv')) 177 res_map_area = 5000*res_factor 178 179 poly_model_area = read_polygon(join(polygons_dir, 'model_area.csv')) 180 res_model_area = 200000*res_factor 181 182 poly_exclusion_area1 = read_polygon(join(polygons_dir, 'exclusion_area1.csv')) 183 res_exclusion_area1 = 2000000*res_factor 184 185 interior_regions = [[poly_inundated_area, res_inundated_area], 186 [poly_tsunami_approach_area, res_tsunami_approach_area], 187 [poly_bay_area, res_bay_area], 188 [poly_map_area, res_map_area]] 174 interior_regions_and_resolutions = { 175 'study_area': 300000, 176 'bernier_dorre_islands': 250000, 177 'map_area': 10000, 178 'bay_area': 4000, 179 'south_bank_buffer': 2000, 180 'south_coast_polygon_1': 1000, 181 'south_coast_polygon_2': 1000, 182 'north_bay_coastline': 1000, 183 'tsunami_approach_area': 50, 184 'inundated_area': 10, 185 'exclusion_1': 10000000, 186 'exclusion_2': 10000000, 187 'exclusion_3': 10000000} 188 189 190 #poly_exclusion_area1 = read_polygon(join(polygons_dir, 'exclusion_area1.csv')) 191 #res_exclusion_area1 = 2000000*res_factor 192 # 193 #interior_regions = [[poly_inundated_area, res_inundated_area], 194 # [poly_tsunami_approach_area, res_tsunami_approach_area], 195 # [poly_bay_area, res_bay_area], 196 # [poly_map_area, res_map_area]] 189 197 #[poly_model_area, res_model_area], 190 198 #[poly_exclusion_area1, res_exclusion_area1]] … … 204 212 205 213 214 215 # Read filenames etc (FIXME: move this to new file: read_structures) 216 217 interior_regions = [] # Consider using dictionary for mesh interface. 218 for area_name in interior_regions_and_resolutions.keys(): 219 file_name = join(polygons_dir, area_name + '.csv') 220 221 print 'Reading polygon from', file_name 222 polygon = read_polygon(file_name) 223 base_resolution = interior_regions_and_resolutions[area_name] 224 225 interior_regions.append([polygon, base_resolution*res_factor]) 226 227 228 206 229 trigs_min = number_mesh_triangles(interior_regions, 207 230 bounding_polygon, -
anuga_work/production/shark_bay_2007/run_shark_bay.py
r4601 r4616 93 93 #IMPORTANT don't cache create_mesh_from_region and Domain(mesh....) as it 94 94 # causes problems with the ability to cache set quantity which takes alot of times 95 96 # FIXME (Ole): Move to build_shark_bay.py 95 97 if myid == 0: 96 98 … … 125 127 if myid == 0: 126 128 127 if project.tide == 0.0: 128 print 'Tide is MSL' 129 IC = 0.0 130 else: 131 print 'Create onshore polygon' 132 from polygon import Polygon_function 133 #following sets the stage/water to be offcoast only 134 IC = Polygon_function([(project.onshore_polygon, -1.0)], 135 default = tide, 136 geo_reference = domain.geo_reference) 129 IC = project.tide 130 #if project.tide == 0.0: 131 # print 'Tide is MSL' 132 # IC = 0.0 133 #else: 134 # print 'Create onshore polygon' 135 # from polygon import Polygon_function 136 # #following sets the stage/water to be offcoast only 137 # IC = Polygon_function([(project.onshore_polygon, -1.0)], 138 # default = tide, 139 # geo_reference = domain.geo_reference) 137 140 138 141 … … 214 217 # Reset stage in study area 215 218 print 'Reset initial condition in study area' 216 domain.set_quantity('stage', 0.0,219 domain.set_quantity('stage', project.tide, 217 220 polygon=project.poly_tsunami_approach_area) 218 221
Note: See TracChangeset
for help on using the changeset viewer.