Changeset 3300 for production/onslow_2006/get_building_inundation.py
- Timestamp:
- Jul 11, 2006, 11:30:36 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
production/onslow_2006/get_building_inundation.py
r3285 r3300 30 30 # Inputs 31 31 #timestampdir = '20060704_063005' # HAT 32 #timestampdir = '2006070 4_063112' # LAT32 #timestampdir = '20060706_235246' # LAT 33 33 timestampdir = '20060704_063234' # MSL 34 #timestampdir = '20060515_001733' # MSL DTED 34 35 file_loc = project.outputdir + timestampdir + sep 35 36 swwfile = file_loc + project.basename + '.sww' … … 101 102 zero_depth = 0.0 102 103 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 118 120 lines[k+1] = lines[k+1].strip() +\ 119 121 ',%f' %max_depth +\
Note: See TracChangeset
for help on using the changeset viewer.