Last change
on this file since 7697 was
7697,
checked in by hudson, 14 years ago
|
Added benchmark for testing sww2dem speed.
|
File size:
591 bytes
|
Rev | Line | |
---|
[7697] | 1 | """Benchmark for sww2dem |
---|
| 2 | |
---|
| 3 | Creates and exports a dem from an sww file. |
---|
| 4 | """ |
---|
| 5 | |
---|
| 6 | from anuga.shallow_water.data_manager import sww2dem |
---|
| 7 | from create_test_sww import create_test_sww |
---|
| 8 | import os.path |
---|
| 9 | |
---|
| 10 | sww_name = 'test.sww' |
---|
| 11 | |
---|
| 12 | # use existing file |
---|
| 13 | if not os.path.isfile(sww_name): |
---|
| 14 | create_test_sww(sww_name) |
---|
| 15 | |
---|
| 16 | # do export to DEM |
---|
| 17 | |
---|
| 18 | sww2dem('test', |
---|
| 19 | basename_out='sww2dem_out', |
---|
| 20 | quantity='stage', |
---|
| 21 | cellsize=1, |
---|
| 22 | easting_min=0, |
---|
| 23 | easting_max=100, |
---|
| 24 | northing_min=0, |
---|
| 25 | northing_max=100, |
---|
| 26 | reduction=max, |
---|
| 27 | verbose=True, |
---|
| 28 | format='asc') |
---|
| 29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.