source: anuga_core/benchmarks/benchmark_sww2dem.py @ 7698

Last change on this file since 7698 was 7698, checked in by hudson, 13 years ago

Added profiling info to benchmark.

File size: 623 bytes
Line 
1"""Benchmark for sww2dem
2
3Creates and exports a dem from an sww file.
4"""
5
6from anuga.shallow_water.data_manager import sww2dem
7from create_test_sww import create_test_sww
8import os.path
9import cProfile
10
11
12def sww2dem_test():
13        sww_name = 'test.sww'
14
15        # use existing file
16        if not os.path.isfile(sww_name):
17                create_test_sww(sww_name)
18
19        # do export to DEM
20
21        sww2dem('test',
22                        basename_out='sww2dem_out',
23                        quantity='stage',
24                        cellsize=1,     
25                        easting_min=0,
26                        easting_max=100,
27                        northing_min=0,
28                        northing_max=100,       
29                        reduction=max, 
30                        verbose=True,
31                        format='asc')
32
33                       
34                       
35cProfile.run('sww2dem_test()')
Note: See TracBrowser for help on using the repository browser.