[8728] | 1 | """ |
---|
| 2 | Generate time series of nominated "gauges" read from project.gauge_filename. This |
---|
| 3 | is done by first running sww2csv_gauges on two different directories to make |
---|
| 4 | 'csv' files. Then running csv2timeseries_graphs detailing the two directories |
---|
| 5 | containing the csv file and produces one set of graphs in the 'output_dir' containing |
---|
| 6 | the details at the gauges for both these sww files. |
---|
| 7 | |
---|
| 8 | Note, this script will only work if pylab is installed on the platform |
---|
| 9 | """ |
---|
| 10 | |
---|
| 11 | from os import sep |
---|
| 12 | import project |
---|
| 13 | import anuga |
---|
| 14 | |
---|
| 15 | anuga.sww2csv_gauges('cairns_slide.sww', |
---|
| 16 | project.gauge_filename, |
---|
| 17 | quantities=['stage','speed','depth','elevation'], |
---|
| 18 | verbose=True) |
---|
| 19 | |
---|
| 20 | anuga.sww2csv_gauges('cairns_fixed_wave.sww', |
---|
| 21 | project.gauge_filename, |
---|
| 22 | quantities=['stage', 'speed','depth','elevation'], |
---|
| 23 | verbose=True) |
---|
| 24 | |
---|
| 25 | try: |
---|
| 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) |
---|
| 37 | except ImportError: |
---|
| 38 | #ANUGA does not rely on pylab to work |
---|
| 39 | print 'must have pylab installed to generate plots' |
---|