[7614] | 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 os.path import join |
---|
| 16 | from anuga.abstract_2d_finite_volumes.util import sww2csv_gauges,csv2timeseries_graphs |
---|
| 17 | import project |
---|
| 18 | |
---|
| 19 | directory = project.output_folder |
---|
| 20 | |
---|
| 21 | time_dir1 = '20090508_150215_run_final_0_51469_lfountai' |
---|
| 22 | time_dir2 = '20090511_161526_run_final_1.1_51469_kvanputt' |
---|
| 23 | time_dir3 = '20090511_165539_run_final_0_50863_lfountai' |
---|
| 24 | time_dir4 = '20090521_220101_run_final_1.1_50863_kvanputt' |
---|
| 25 | time_dir5 = '20090522_164526_run_final_0_51392_lfountai' |
---|
| 26 | time_dir6 = '20090522_164640_run_final_1.1_51392_lfountai' |
---|
| 27 | time_dir7 = '20090518_154710_run_final_0_50994_lfountai' |
---|
| 28 | time_dir8 = '20090519_160510_run_final_1.1_50994_lfountai' |
---|
| 29 | time_dir9 = '20090522_164948_run_final_0_51423_lfountai' |
---|
| 30 | time_dir10 = '20090522_165600_run_final_1.1_51423_lfountai' |
---|
| 31 | |
---|
| 32 | time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, |
---|
| 33 | time_dir6, time_dir7, time_dir8, time_dir9, time_dir10] |
---|
| 34 | |
---|
| 35 | for time_dir in time_dirs: |
---|
| 36 | name = join(directory,time_dir,project.scenario_name) |
---|
| 37 | gauge = project.gauges |
---|
| 38 | sww2csv_gauges(name+'.sww',gauge, |
---|
| 39 | quantities = ['stage','speed','depth','elevation'], |
---|
| 40 | verbose=True) |
---|
| 41 | |
---|