Changeset 3309


Ignore:
Timestamp:
Jul 11, 2006, 3:57:26 PM (18 years ago)
Author:
sexton
Message:

handling INF's

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/damage/inundation_damage.py

    r3307 r3309  
    1010from pyvolution.util import file_function
    1111from geospatial_data.geospatial_data import ensure_absolute
    12 
     12from utilities.numerical_tools import INF
    1313try: 
    1414    import kinds 
     
    8484        for time in callable_sww.get_time():
    8585            quantities = callable_sww(time,point_i)
     86            print "quantities", quantities
     87           
    8688            w = quantities[0]
    8789            z = quantities[1]
     
    8991            vh = quantities[3]
    9092            depth = w - z - ground_floor_height
    91             momentum = sqrt(uh*uh + vh*vh) 
     93             
    9294            if depth > max_depth[point_i]:
    9395                max_depth[point_i] = depth
     96            if w == INF or z == INF or uh == INF or vh == INF:
     97                continue
     98            momentum = sqrt(uh*uh + vh*vh)
    9499            if momentum > max_momentum[point_i]:
    95100                max_momentum[point_i] = momentum
Note: See TracChangeset for help on using the changeset viewer.