source: trunk/anuga_core/demos/cairns/GetTimeseries.py @ 9067

Last change on this file since 9067 was 8728, checked in by steve, 12 years ago

Adding in usermanual and demos

File size: 1.6 KB
RevLine 
[8728]1"""
2Generate time series of nominated "gauges" read from project.gauge_filename. This
3is done by first running sww2csv_gauges on two different directories to make
4'csv' files. Then running csv2timeseries_graphs detailing the two directories
5containing the csv file and produces one set of graphs in the 'output_dir' containing
6the details at the gauges for both these sww files.
7
8Note, this script will only work if pylab is installed on the platform
9"""
10
11from os import sep
12import project
13import anuga
14
15anuga.sww2csv_gauges('cairns_slide.sww',
16                project.gauge_filename,
17                quantities=['stage','speed','depth','elevation'],
18                verbose=True)
19               
20anuga.sww2csv_gauges('cairns_fixed_wave.sww',
21               project.gauge_filename,
22               quantities=['stage', 'speed','depth','elevation'],
23               verbose=True)
24
25try: 
26    import pylab
27    anuga.csv2timeseries_graphs(directories_dic={'slide'+sep: ['Slide',0, 0],
28                                           'fixed_wave'+sep: ['Fixed Wave',0,0]},
29                          output_dir='fixed_wave'+sep,
30                          base_name='gauge_',
31                          plot_numbers='',
32                          quantities=['stage','speed','depth'],
33                          extra_plot_name='',
34                          assess_all_csv_files=True,                           
35                          create_latex=False,
36                          verbose=True)
37except ImportError:
38    #ANUGA does not rely on pylab to work
39    print 'must have pylab installed to generate plots'
Note: See TracBrowser for help on using the repository browser.