Ignore:
Timestamp:
Jul 11, 2006, 11:30:36 AM (18 years ago)
Author:
sexton
Message:

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • production/onslow_2006/get_building_inundation.py

    r3285 r3300  
    3030# Inputs
    3131#timestampdir = '20060704_063005' # HAT
    32 #timestampdir = '20060704_063112' # LAT
     32#timestampdir = '20060706_235246' # LAT
    3333timestampdir = '20060704_063234' # MSL
     34#timestampdir = '20060515_001733' # MSL DTED
    3435file_loc = project.outputdir + timestampdir + sep
    3536swwfile = file_loc + project.basename + '.sww'
     
    101102    zero_depth = 0.0
    102103    zero_momentum = 0.0
    103     if inside_polygon(g,project.polyAll) == True:   
    104         for i, t in enumerate(T):
    105             w = f(t, point_id = k)[0]
    106             z = f(t, point_id = k)[1]
    107             uh = f(t, point_id = k)[2]
    108             vh = f(t, point_id = k)[3]
    109             depth = w-z
    110             m = sqrt(uh*uh + vh*vh)   
    111             #vel = m / (depth + 1.e-30)
    112             if depth > max_depth: max_depth = depth
    113             if m > max_momentum: max_momentum = m
    114     else:
    115         max_depth = 0.0
    116         max_momentum = 0.0
    117 
     104    #if inside_polygon(g,project.polyAll) == True:   
     105    for i, t in enumerate(T):
     106        w = f(t, point_id = k)[0]
     107        z = f(t, point_id = k)[1]
     108        uh = f(t, point_id = k)[2]
     109        vh = f(t, point_id = k)[3]
     110        depth = w-z
     111        m = sqrt(uh*uh + vh*vh)   
     112        #vel = m / (depth + 1.e-30)
     113        if depth > max_depth: max_depth = depth
     114        if m > max_momentum: max_momentum = m
     115    #else:
     116    #    max_depth = 0.0
     117    #    max_momentum = 0.0
     118    print 'gauge ', g
     119    print 'max depth', max_depth
    118120    lines[k+1] = lines[k+1].strip() +\
    119121                 ',%f' %max_depth +\
Note: See TracChangeset for help on using the changeset viewer.