source: anuga_work/production/patong/get_timeseries.py @ 7613

Last change on this file since 7613 was 6388, checked in by kristy, 15 years ago

Add get_timeseries.py from perth

File size: 1.1 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
14import os
15from os import sep, rename, listdir, system
16from anuga.abstract_2d_finite_volumes.util import sww2csv_gauges,csv2timeseries_graphs
17import project
18
19directory = project.output_dir
20
21time_dir1 = '20090204_182313_run_final_0.8_buildings_dirichlet_onielsen'
22time_dir2 = '20090204_143421_run_final_0.8_buildings_transmissive_onielsen'
23
24time_dirs = [time_dir1, time_dir2]
25 
26for time_dir in time_dirs:
27    name = os.path.join(directory,time_dir,project.scenario_name)
28    gauge = project.gauges_dir_name
29    sww2csv_gauges(name+'.sww',gauge,
30                   quantities = ['stage','speed','depth','elevation'],
31                   verbose=True)
32
33   
Note: See TracBrowser for help on using the repository browser.