Changeset 5606
- Timestamp:
- Aug 5, 2008, 1:15:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/data_manager.py
r5602 r5606 5026 5026 basename_in=[basename_in] 5027 5027 5028 # This is the value used in the mux file format to indicate NAN data 5029 # FIXME (Ole): This should be changed everywhere to IEEE NAN when we upgrade to Numpy 5030 NODATA = 99 5031 5028 5032 # Check that basename is a list of strings 5029 5033 if not reduce(__and__, map(lambda z:isinstance(z,StringType), basename_in)): … … 5217 5221 for j in range(len(times)): 5218 5222 for i in range(number_of_points): 5219 w = zscale*mux['HA'][i,j] + mean_stage 5223 ha = mux['HA'][i,j] 5224 ua = mux['UA'][i,j] 5225 va = mux['VA'][i,j] 5226 if ha == NODATA: 5227 if verbose: 5228 msg = 'Setting nodata value %d to 0 at time = %f, point = %d'\ 5229 %(ha, times[j], i) 5230 print msg 5231 ha = 0.0 5232 ua = 0.0 5233 va = 0.0 5234 5235 w = zscale*ha + mean_stage 5220 5236 h=w-elevation[i] 5221 5237 stage[j,i] = w 5222 5238 5223 xmomentum[j,i] = mux['UA'][i,j]*h5224 ymomentum[j,i] = mux['VA'][i,j]*h5239 xmomentum[j,i] = ua*h 5240 ymomentum[j,i] = va*h 5225 5241 5226 5242 outfile.close()
Note: See TracChangeset
for help on using the changeset viewer.