- Timestamp:
- Nov 15, 2011, 11:37:36 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/damage_modelling/inundation_damage.py
r8125 r8249 141 141 in the specified directory. 142 142 """ 143 143 144 quantities = ['stage', 'elevation', 'xmomentum', 'ymomentum'] 144 145 points = ensure_absolute(points) … … 161 162 raise IOError, msg 162 163 from os import sep 164 163 165 for this_sww_file in interate_over: 164 166 callable_sww = file_function(dir+sep+this_sww_file, … … 167 169 verbose=verbose, 168 170 use_cache=use_cache) 169 171 170 172 for point_i, point in enumerate(points): 171 173 for time in callable_sww.get_time(): 172 174 quantity_values = callable_sww(time,point_i) 173 174 175 w = quantity_values[0] 175 176 z = quantity_values[1] 176 177 uh = quantity_values[2] 177 178 vh = quantity_values[3] 178 179 180 #print w,z,uh,vh 181 if w == NAN or z == NAN or uh == NAN or vh == NAN: 182 continue 183 179 184 # -ground_floor_height is the minimum value. 180 185 depth = w - z - ground_floor_height … … 182 187 if depth > max_depths[point_i]: 183 188 max_depths[point_i] = depth 184 if w == NAN or z == NAN or uh == NAN or vh == NAN: 185 continue 189 186 190 momentum = sqrt(uh*uh + vh*vh) 187 191 if momentum > max_momentums[point_i]: 188 192 max_momentums[point_i] = momentum 193 194 189 195 return max_depths, max_momentums 190 196
Note: See TracChangeset
for help on using the changeset viewer.