[6068] | 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, rename, listdir, system |
---|
| 15 | from anuga.abstract_2d_finite_volumes.util import sww2csv_gauges,csv2timeseries_graphs |
---|
| 16 | import project |
---|
| 17 | |
---|
| 18 | directory = project.output_dir |
---|
| 19 | |
---|
[6317] | 20 | ##time_dir1 = '20081202_084220_run_final_1_27283_alpha0.1_kvanputt' |
---|
[6491] | 21 | ##time_dir2 = '20081202_084202_run_final_1_27255_alpha0.1_kvanputt' |
---|
[6317] | 22 | ##time_dir3 = '20081202_084132_run_final_1_68693_alpha0.1_kvanputt' |
---|
| 23 | ##time_dir4 = '20081202_084025_run_final_0_68693_alpha0.1_kvanputt' |
---|
[6491] | 24 | time_dir5 = '20081202_083932_run_final_0_27255_alpha0.1_kvanputt' |
---|
[6317] | 25 | ##time_dir6 = '20081201_103449_run_final_0_27283_alpha0.1_kvanputt' |
---|
[6068] | 26 | |
---|
[6491] | 27 | time_dirs = [time_dir5] #1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6] |
---|
[6068] | 28 | |
---|
[6514] | 29 | print 'time directories', time_dirs |
---|
| 30 | |
---|
[6068] | 31 | for time_dir in time_dirs: |
---|
| 32 | name = directory+time_dir+sep+project.scenario_name |
---|
| 33 | gauge = project.gauges_dir_name |
---|
| 34 | sww2csv_gauges(name+'.sww',gauge, |
---|
| 35 | quantities = ['stage','speed','depth','elevation'], |
---|
| 36 | verbose=True) |
---|
| 37 | |
---|
| 38 | |
---|