source: trunk/anuga_core/benchmarks/benchmark_sww2dem.py @ 7810

Last change on this file since 7810 was 7810, checked in by hudson, 14 years ago

Added aggressive psyco optimisation, fixed benchmark app to work with new API.

File size: 757 bytes
Line 
1"""Benchmark for sww2dem
2
3Creates and exports a dem from an sww file.
4"""
5
6from anuga.file_conversion.sww2dem import sww2dem
7from create_test_sww import create_test_sww
8import os.path
9import cProfile
10import time
11
12
13sww_name = 'test.sww'
14
15def sww2dem_test():
16        # do export to DEM
17
18        sww2dem('test',
19                        basename_out='sww2dem_out',
20                        quantity='stage',
21                        cellsize=0.25,     
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 
30               
31# use existing file
32if not os.path.isfile(sww_name):
33        create_test_sww(sww_name)
34
35
36start_time = time.time()       
37#cProfile.run('sww2dem_test()')
38sww2dem_test()
39stop_time = time.time()
40print ('sww2dem took %.1fs\n\n\n' % (stop_time - start_time))
Note: See TracBrowser for help on using the repository browser.