source: anuga_work/development/reef_0708/GetTimeseries.py @ 5066

Last change on this file since 5066 was 5066, checked in by sexton, 16 years ago
File size: 1.9 KB
Line 
1"""
2Generate time series of nominated "gauges"
3Note, this script will only work if pylab is installed on the platform
4
5Inputs:
6
7production dirs: dictionary of production directories with a
8                 association to that simulation run, eg high tide,
9                 magnitude, etc.
10                   
11Outputs:
12
13* figures stored in same directory as sww file
14* time series data stored in csv files in same directory as sww file
15* elevation at nominated gauges (elev_output)
16"""
17
18from os import getcwd, sep, altsep, mkdir, access, F_OK, remove
19from anuga.abstract_2d_finite_volumes.util import sww2timeseries
20
21# nominate directory location of sww file with associated attribute
22production_dirs = {'': 'gradual_lgflat'}
23
24# Generate figures
25swwfiles = {}
26for label_id in production_dirs.keys():
27    file_loc = label_id
28    swwfile = file_loc + 'gradual_lgflat'+'.sww'
29    swwfiles[swwfile] = label_id
30    print 'hello', swwfile
31texname, elev_output = sww2timeseries(swwfiles,
32                                       sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'natural_hazard_impacts'+sep+'inundation'+sep+'sandpits'+sep+'jbrowning'+sep+'anuga'+sep+'anuga_work'+sep+'development'+sep+'idealised_bathymetry_study'+sep+'final_models'+sep+'general'+sep+'gauges_lgflat.csv',
33                                      production_dirs,
34                                      report = False,
35                                      reportname = '',
36                                      plot_quantity = ['stage', 'speed'],
37                                      generate_fig = False,
38                                      surface = False,
39                                      time_min = None,
40                                      time_max = None,
41                                      #time_unit = 'secs',
42                                      title_on = True,
43                                      verbose = True)
44
45
Note: See TracBrowser for help on using the repository browser.