1 | """ |
---|
2 | Generate time series of nominated "gauges". |
---|
3 | Input: sww file from run_perth.py |
---|
4 | gauges project.gauge_filename |
---|
5 | Output: csv files stage,speed,depth,elevation over time |
---|
6 | Stored in the 'outputs_dir' folder for respective .sww file |
---|
7 | |
---|
8 | Note: |
---|
9 | Can run different sww files at the same time |
---|
10 | make sure if there is a second sww file that it is placed into a folder called sww2 |
---|
11 | Can run different gauges at the same time - ie testing boundary index point |
---|
12 | """ |
---|
13 | |
---|
14 | from os import sep |
---|
15 | from anuga.abstract_2d_finite_volumes.util import sww2csv_gauges,csv2timeseries_graphs |
---|
16 | import project |
---|
17 | |
---|
18 | timestamp1='20080815_103442_run_final_0.0_polyline_alpha0.1_kvanputt' |
---|
19 | timestamp2='20080815_103336_run_final_0.6_polyline_alpha0.1_kvanputt' |
---|
20 | |
---|
21 | timestamps = [timestamp1, timestamp2] |
---|
22 | for timestamp in timestamps: |
---|
23 | |
---|
24 | filename1=project.output_dir+timestamp+sep+project.scenario_name+'.sww' |
---|
25 | filename2=project.output_dir+timestamp+sep+'sww2'+sep+project.scenario_name+'_time_39900_0.sww' |
---|
26 | |
---|
27 | filenames = [filename1, filename2] |
---|
28 | for filename in filenames: |
---|
29 | |
---|
30 | gauges = [project.gauges_dir_name, project.gauges_dir_name2] |
---|
31 | for gauge in gauges: |
---|
32 | |
---|
33 | sww2csv_gauges(filename,gauge, |
---|
34 | quantities = ['stage','speed','depth','elevation'], |
---|
35 | verbose=True) |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | |
---|