Line | |
---|
1 | """ |
---|
2 | Generate time series of nominated "gauges" |
---|
3 | Note, this script will only work if pylab is installed on the platform |
---|
4 | |
---|
5 | Inputs: |
---|
6 | |
---|
7 | production dirs: dictionary of production directories with a |
---|
8 | association to that simulation run, eg high tide, |
---|
9 | magnitude, etc. |
---|
10 | |
---|
11 | Outputs: |
---|
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 | |
---|
18 | from os import getcwd, sep, altsep, mkdir, access, F_OK, remove |
---|
19 | from anuga.abstract_2d_finite_volumes.util import sww2timeseries |
---|
20 | |
---|
21 | # nominate directory location of sww file with associated attribute |
---|
22 | production_dirs = {'': 'gradual_lgflat'} |
---|
23 | |
---|
24 | # Generate figures |
---|
25 | swwfiles = {} |
---|
26 | for 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 |
---|
31 | texname, 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.