Changeset 5669 for anuga_work/production/geraldton/run_geraldton.py
- Timestamp:
- Aug 20, 2008, 7:44:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/production/geraldton/run_geraldton.py
r5652 r5669 78 78 # Domain definitions 79 79 #----------------------------------------------------------------------- 80 81 # Read in boundary from ordered sts file 82 urs_bounding_polygon=create_sts_boundary(os.path.join(project.boundaries_dir,project.scenario_name)) 83 84 # Reading the landward defined points, this incorporates the original clipping 85 # polygon minus the 100m contour 86 landward_bounding_polygon = read_polygon(project.polygons_dir+'landward_boundary.txt') 87 88 # Combine sts polyline with landward points 89 bounding_polygon = urs_bounding_polygon + landward_bounding_polygon 90 91 # counting segments 92 N = len(urs_bounding_polygon)-1 93 boundary_tags={'back': [N+2,N+3], 'side': [N,N+1,N+4],'ocean': range(N)} 80 ## 81 ## # Read in boundary from ordered sts file 82 ## urs_bounding_polygon=create_sts_boundary(os.path.join(project.boundaries_dir,project.scenario_name)) 83 ## 84 ## # Reading the landward defined points, this incorporates the original clipping 85 ## # polygon minus the 100m contour 86 ## landward_bounding_polygon = read_polygon(project.boundaries_dir+'landward_boundary.txt') 87 ## 88 ## # Combine sts polyline with landward points 89 ## bounding_polygon = urs_bounding_polygon + landward_bounding_polygon 90 ## 91 ## # counting segments 92 ## N = len(urs_bounding_polygon)-1 93 ## boundary_tags={'back': [N+2,N+3], 'side': [N,N+1,N+4],'ocean': range(N)} 94 95 bounding_polygon = project.poly_all 96 94 97 95 98 … … 108 111 109 112 create_mesh_from_regions(bounding_polygon, 110 boundary_tags= boundary_tags,113 boundary_tags=project.boundary_tags, 111 114 maximum_triangle_area=project.res_poly_all, 112 115 interior_regions=project.interior_regions, … … 218 221 Bd = Dirichlet_boundary([kwargs['tide'],0,0]) 219 222 220 fid = NetCDFFile(boundary_urs_out+'.sts', 'r') #Open existing file for read221 sts_time=fid.variables['time'][:]+fid.starttime222 tmin=min(sts_time)223 tmax=max(sts_time)224 fid.close()225 226 print 'Boundary end time ', tmax-tmin227 228 223 ## Bf = Field_boundary(kwargs['boundary_file'], 229 224 ## domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'], … … 232 227 domain.set_boundary({'back': Br, 233 228 'side': Bd, 234 'ocean': B f})229 'ocean': Bd}) # change baxk to Bf when running properly 235 230 236 231 kwargs['input_start_time']=domain.starttime … … 248 243 domain.write_boundary_statistics(tags = 'ocean') 249 244 250 if t >= tmax-tmin:251 print 'changed to tide boundary condition at ocean'252 domain.set_boundary({'ocean': Bd})253 245 254 246 x, y = domain.get_maximum_inundation_location() … … 283 275 kwargs['output_dir']=project.output_run_time_dir 284 276 kwargs['elevation_file']=project.combined_dir_name+'.pts' 285 kwargs['boundary_file']=project.boundaries_in_dir_name + '.sww'286 277 kwargs['file_name']=project.home+'detail.csv' 287 278 kwargs['aa_scenario_name']=project.scenario_name
Note: See TracChangeset
for help on using the changeset viewer.