""" Generate time series of nominated "gauges". Input: sww file from run_perth.py gauges project.gauge_filename Output: csv files stage,speed,depth,elevation over time Stored in the 'outputs_dir' folder for respective .sww file Note: Can run different sww files at the same time make sure if there is a second sww file that it is placed into a folder called sww2 Can run different gauges at the same time - ie testing boundary index point """ from os import sep, rename, listdir, system from anuga.abstract_2d_finite_volumes.util import sww2csv_gauges,csv2timeseries_graphs import project directory = project.output_dir ##time_dir1 = '20081009_184721_run_final_0.6_68693_alpha0.1_kvanputt'+sep+'gauge' ##time_dir2 = '20081031_120316_run_final_0_68693_alpha0.1_kvanputt'+sep+'gauge' ##time_dir3 = '20081031_120515_run_final_0_27255_alpha0.1_kvanputt'+sep+'gauge' ##time_dir4 = '20081031_120642_run_final_0_27283_alpha0.1_kvanputt'+sep+'gauge' ##time_dir5 = '20081031_120753_run_final_0.6_27283_alpha0.1_kvanputt'+sep+'gauge' ##time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt'+sep+'gauge' ## ##time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6] ##time_dir1 = '20081217_115336_run_final_0_27283_250m_none_dp_kvanputt' time_dir6 = '20081111_113832_run_final_0.6_27255_alpha0.1_kvanputt' time_dirs = [time_dir6] for time_dir in time_dirs: name = directory+time_dir+sep+project.scenario_name gauge = project.gauges_dir_name sww2csv_gauges(name+'.sww',gauge, quantities = ['stage','speed','depth','elevation'], verbose=True)