Ignore:
Timestamp:
Aug 20, 2008, 7:44:49 AM (16 years ago)
Author:
kristy
Message:

Updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/geraldton/run_geraldton.py

    r5652 r5669  
    7878    # Domain definitions
    7979    #-----------------------------------------------------------------------
    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   
    9497
    9598   
     
    108111
    109112        create_mesh_from_regions(bounding_polygon,
    110                              boundary_tags=boundary_tags,
     113                             boundary_tags=project.boundary_tags,
    111114                             maximum_triangle_area=project.res_poly_all,
    112115                             interior_regions=project.interior_regions,
     
    218221    Bd = Dirichlet_boundary([kwargs['tide'],0,0])
    219222
    220     fid = NetCDFFile(boundary_urs_out+'.sts', 'r')    #Open existing file for read
    221     sts_time=fid.variables['time'][:]+fid.starttime
    222     tmin=min(sts_time)
    223     tmax=max(sts_time)
    224     fid.close()
    225 
    226     print 'Boundary end time ', tmax-tmin
    227    
    228223##    Bf = Field_boundary(kwargs['boundary_file'],
    229224##                domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'],
     
    232227    domain.set_boundary({'back': Br,
    233228                         'side': Bd,
    234                          'ocean': Bf})
     229                         'ocean': Bd}) # change baxk to Bf when running properly
    235230
    236231    kwargs['input_start_time']=domain.starttime
     
    248243        domain.write_boundary_statistics(tags = 'ocean')
    249244
    250         if t >= tmax-tmin:
    251             print 'changed to tide boundary condition at ocean'
    252             domain.set_boundary({'ocean': Bd})
    253245           
    254246    x, y = domain.get_maximum_inundation_location()
     
    283275    kwargs['output_dir']=project.output_run_time_dir
    284276    kwargs['elevation_file']=project.combined_dir_name+'.pts'
    285     kwargs['boundary_file']=project.boundaries_in_dir_name + '.sww'
    286277    kwargs['file_name']=project.home+'detail.csv'
    287278    kwargs['aa_scenario_name']=project.scenario_name
Note: See TracChangeset for help on using the changeset viewer.