[5610] | 1 | """ |
---|
[6017] | 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 |
---|
[5610] | 7 | |
---|
[6017] | 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 |
---|
[5610] | 12 | """ |
---|
| 13 | |
---|
[6017] | 14 | from os import sep, rename, listdir, system |
---|
[5610] | 15 | from anuga.abstract_2d_finite_volumes.util import sww2csv_gauges,csv2timeseries_graphs |
---|
| 16 | import project |
---|
| 17 | |
---|
[6017] | 18 | directory = project.output_dir |
---|
[5610] | 19 | |
---|
[6201] | 20 | ##time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'+sep+'gauge' |
---|
| 21 | ##time_dir2 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'+sep+'gauge' |
---|
| 22 | ##time_dir3 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'+sep+'gauge' |
---|
| 23 | ##time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'+sep+'gauge' |
---|
| 24 | ##time_dir5 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'+sep+'gauge' |
---|
| 25 | ##time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'+sep+'gauge' |
---|
| 26 | ## |
---|
| 27 | ##time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6] |
---|
[5610] | 28 | |
---|
[6342] | 29 | ##time_dir1 = '20081217_115336_run_final_0_27283_250m_none_dp_kvanputt' |
---|
| 30 | time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt' |
---|
[5669] | 31 | |
---|
[6342] | 32 | time_dirs = [time_dir6] |
---|
[6201] | 33 | |
---|
[6017] | 34 | for time_dir in time_dirs: |
---|
[6063] | 35 | name = directory+time_dir+sep+project.scenario_name |
---|
| 36 | gauge = project.gauges_dir_name |
---|
| 37 | sww2csv_gauges(name+'.sww',gauge, |
---|
| 38 | quantities = ['stage','speed','depth','elevation'], |
---|
| 39 | verbose=True) |
---|
| 40 | |
---|
[5610] | 41 | |
---|