Changeset 7841 for trunk/anuga_core/source/anuga/file_conversion/sww2dem.py
- Timestamp:
- Jun 15, 2010, 12:06:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/file_conversion/sww2dem.py
r7814 r7841 124 124 if block_size is None: 125 125 block_size = DEFAULT_BLOCK_SIZE 126 127 assert(isinstance(block_size, (int, long, float))) 126 128 127 129 # Read sww file … … 217 219 result = num.zeros(number_of_points, num.float) 218 220 221 if verbose: 222 msg = 'Slicing sww file, num points: ' + str(number_of_points) 223 msg += ', block size: ' + str(block_size) 224 log.critical(msg) 225 219 226 for start_slice in xrange(0, number_of_points, block_size): 220 227 # Limit slice size to array end if at last block … … 357 364 358 365 #Write 359 if verbose: log.critical('Writing %s' % demfile) 366 if verbose: 367 log.critical('Writing %s' % name_out) 360 368 361 369 import ermapper_grids … … 437 445 format='ers'): 438 446 """Wrapper for sww2dem. 439 See sww2dem to find out what most of the parameters do. 447 See sww2dem to find out what most of the parameters do. Note that since this 448 is a batch command, the normal filename naming conventions do not apply. 440 449 441 450 basename_in is a path to sww file/s, without the .sww extension. 451 extra_name_out is a postfix to add to the output filename. 442 452 443 453 Quantities is a list of quantities. Each quantity will be … … 474 484 basename_out = sww_file + '_' + quantity + '_' + extra_name_out 475 485 476 file_out = sww2dem(dir+os.sep+sww_file+'.sww', 477 dir+os.sep+basename_out, 486 swwin = dir+os.sep+sww_file+'.sww' 487 demout = dir+os.sep+basename_out+'.'+format 488 489 if verbose: 490 log.critical('sww2dem: %s => %s' % (swwin, demout)) 491 492 file_out = sww2dem(swwin, 493 demout, 478 494 quantity, 479 495 reduction, … … 487 503 verbose, 488 504 origin, 489 datum ,490 format)505 datum) 506 491 507 files_out.append(file_out) 492 508 return files_out
Note: See TracChangeset
for help on using the changeset viewer.