Ignore:
Timestamp:
Jan 10, 2007, 4:47:39 PM (17 years ago)
Author:
sexton
Message:

update Dampier script to incorporate setting stage to 0 onshore and tide offshore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/dampier_2006/run_dampier.py

    r4151 r4164  
    129129
    130130    print 'Setup initial conditions'
    131 
    132     domain.set_quantity('stage', tide)
     131   
     132    def IC(x,y):
     133       
     134        from anuga.utilities.polygon import is_inside_polygon
     135        from Numeric import zeros, Float
     136
     137        w = zeros(len(x), Float)
     138        for i, xi in enumerate(x):
     139            yi = y[i]
     140            if is_inside_polygon([xi,yi],project.poly_bathy,verbose=False) == True:
     141                w[i] = tide
     142            else:
     143                w[i] = 0.
     144
     145        return w
     146
     147    domain.set_quantity('stage', IC)
    133148    domain.set_quantity('friction', 0.01)
    134149    print 'Start Set quantity'
Note: See TracChangeset for help on using the changeset viewer.