Changeset 8707
- Timestamp:
- Feb 19, 2013, 5:16:51 PM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga/file_conversion
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/file_conversion/dem2pts.py
r8706 r8707 202 202 elevation = outfile.variables['elevation'] 203 203 204 # Number of points 205 N = points.shape[0] 206 204 207 lenv = index2-index1+1 205 208 … … 240 243 241 244 if upper_index == lower_index + newcols: 245 242 246 # Seems to be an error with the windows version of 243 247 # Netcdf. The following gave errors 244 points[lower_index:upper_index, :] = tpoints 245 elevation[lower_index:upper_index] = telev 246 # so used the following 247 #for index in range(newcols): 248 # points[index+lower_index, :] = tpoints[index,:] 249 # elevation[index+lower_index] = telev[index] 248 try: 249 points[lower_index:upper_index, :] = tpoints 250 elevation[lower_index:upper_index] = telev 251 except: 252 # so used the following if an error occurs 253 for index in range(newcols): 254 points[index+lower_index, :] = tpoints[index,:] 255 elevation[index+lower_index] = telev[index] 250 256 251 257 assert global_index == nopoints, 'index not equal to number of points' -
trunk/anuga_core/source/anuga/file_conversion/test_dem2pts.py
r7841 r8707 139 139 140 140 #Write test asc file 141 root = 'demtest '141 root = 'demtest2' 142 142 143 143 filename = root+'.asc' … … 267 267 268 268 #Write test asc file 269 root = 'demtest '269 root = 'demtest3' 270 270 271 271 filename = root+'.asc'
Note: See TracChangeset
for help on using the changeset viewer.