Changeset 5645


Ignore:
Timestamp:
Aug 13, 2008, 8:21:21 AM (16 years ago)
Author:
kristy
Message:

Updated evolve in run file so that a tide wave takes over when the sts file finishes

Location:
anuga_work/production
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/busselton/run_busselton.py

    r5626 r5645  
    4242from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
    4343from anuga.geospatial_data.geospatial_data import find_optimal_smoothing_parameter
    44 
     44from Scientific.IO.NetCDF import NetCDFFile
    4545# Application specific imports
    4646import project                 # Definition of file names and polygons
     
    199199    Bd = Dirichlet_boundary([kwargs['tide'],0,0])
    200200
    201     print dir(Bf)
    202     print 'finished reading boundary file'
     201    fid = NetCDFFile(boundary_urs_out+'.sts', 'r')    #Open existing file for read
     202    sts_time=fid.variables['time'][:]+fid.starttime
     203    tmin=min(sts_time)
     204    tmax=max(sts_time)
     205    fid.close()
     206   
     207    print 'Boundary end time ', tmax-tmin
    203208
    204209    domain.set_boundary({'back': Bd,
     
    220225        domain.write_boundary_statistics(tags = 'ocean')
    221226
     227        if t >= tmax-tmin:
     228            print 'changed to tide boundary condition at ocean'
     229            domain.set_boundary({'ocean': Bd})
    222230
    223231    x, y = domain.get_maximum_inundation_location()
  • anuga_work/production/onslow_2008/run_onslow.py

    r5635 r5645  
    4242from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
    4343from anuga.geospatial_data.geospatial_data import find_optimal_smoothing_parameter
    44 
     44from Scientific.IO.NetCDF import NetCDFFile
    4545# Application specific imports
    4646import project                 # Definition of file names and polygons
     
    8383    # Reading the landward defined points, this incorporates the original clipping
    8484    # polygon minus the 100m contour
    85     landward_bounding_polygon = read_polygon(project.polygons_dir+'landward_bounding_polygon.txt')
     85    landward_bounding_polygon = read_polygon(project.boundaries_dir+'landward_bounding_polygon.txt')
    8686
    8787    # Combine sts polyline with landward points
     
    216216    Bd = Dirichlet_boundary([kwargs['tide'],0,0])
    217217
    218     print dir(Bf)
    219     print 'start reading boundary file'
    220    
    221 
     218    fid = NetCDFFile(boundary_urs_out+'.sts', 'r')    #Open existing file for read
     219    sts_time=fid.variables['time'][:]+fid.starttime
     220    tmin=min(sts_time)
     221    tmax=max(sts_time)
     222    fid.close()
     223
     224    print 'Boundary end time ', tmax-tmin
     225     
    222226##    Bf = Field_boundary(kwargs['boundary_file'],
    223227##                domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'],
     
    241245        domain.write_time()
    242246        domain.write_boundary_statistics(tags = 'ocean')
     247
     248        if t >= tmax-tmin:
     249            print 'changed to tide boundary condition at ocean'
     250            domain.set_boundary({'ocean': Bd})
    243251           
    244252    x, y = domain.get_maximum_inundation_location()
  • anuga_work/production/perth/run_perth.py

    r5626 r5645  
    4242from anuga.utilities.polygon import read_polygon, plot_polygons, polygon_area, is_inside_polygon
    4343from anuga.geospatial_data.geospatial_data import find_optimal_smoothing_parameter
     44from Scientific.IO.NetCDF import NetCDFFile
    4445
    4546# Application specific imports
     
    213214                   boundary_polygon=bounding_polygon)
    214215
     216   
    215217    Br = Reflective_boundary(domain)
    216218    Bd = Dirichlet_boundary([kwargs['tide'],0,0])
    217219
    218     print dir(Bf)
    219     print 'start reading boundary file'
    220    
    221 
     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   
    222228##    Bf = Field_boundary(kwargs['boundary_file'],
    223229##                domain, time_thinning=kwargs['time_thinning'], mean_stage=kwargs['tide'],
     
    241247        domain.write_time()
    242248        domain.write_boundary_statistics(tags = 'ocean')
     249
     250        if t >= tmax-tmin:
     251            print 'changed to tide boundary condition at ocean'
     252            domain.set_boundary({'ocean': Bd})
    243253           
    244254    x, y = domain.get_maximum_inundation_location()
Note: See TracChangeset for help on using the changeset viewer.