source: anuga_work/production/perth/get_timeseries.py @ 5761

Last change on this file since 5761 was 5761, checked in by kristy, 16 years ago

Headers updated to link inputs and outputs

File size: 1.3 KB
Line 
1"""
2Generate time series of nominated "gauges".
3Input: sww file from run_perth.py
4       gauges project.gauge_filename
5Output: csv files stage,speed,depth,elevation over time
6Stored in the 'outputs_dir' folder for respective .sww file
7
8Note:
9Can run different sww files at the same time
10make sure if there is a second sww file that it is placed into a folder called sww2
11Can run different gauges at the same time - ie testing boundary index point
12"""
13
14from os import sep
15from anuga.abstract_2d_finite_volumes.util import sww2csv_gauges,csv2timeseries_graphs
16import project
17
18timestamp1='20080815_103442_run_final_0.0_polyline_alpha0.1_kvanputt'
19timestamp2='20080815_103336_run_final_0.6_polyline_alpha0.1_kvanputt'
20
21timestamps = [timestamp1, timestamp2]
22for 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
Note: See TracBrowser for help on using the repository browser.