source: anuga_work/production/exmouth_2006/get_timeseries.py @ 5409

Last change on this file since 5409 was 4581, checked in by sexton, 18 years ago

minor updates for model interrogation

File size: 3.5 KB
Line 
1"""
2Generate images of "gauges" for production run
3
4Inputs:
5
6production dirs: dictionary of production directories with a
7                 association to that simulation run, eg high tide,
8                 low tide and MSL.
9                   
10Outputs:
11
12* figures used for report stored in the report_figure directory
13
14"""
15from os import getcwd, sep, altsep, mkdir, access, F_OK
16import project
17from anuga.abstract_2d_finite_volumes.util import sww2timeseries
18
19# bulli event
20production_dirs = {'20070619_042043_run_final_1.4_onslow_nbartzis': ''}
21# 20070618_035101_run_final_1.4_dampier_nbartzis # HAT dampier
22# 20070618_035114_run_final_0_dampier_nbartzis # MSL dampier
23# 20070619_042542_run_final_1.4_exmouth_nbartzis # HAT exmouth parallel 4
24# 20070619_042417_run_final_0_exmouth_nbartzis # MSL exmouth parallel 4
25# 20070619_042043_run_final_1.4_onslow_nbartzis # HAT onslow
26# 20070619_042140_run_final_0_onslow_nbartzis # MSL onslow parallel 2
27
28is_parallel = True
29
30if is_parallel is True:
31    no_nodes = 4
32   
33if is_parallel is False:
34   
35    swwfiles = {}   
36    for label_id in production_dirs.keys():
37       
38        file_loc = project.output_dir + label_id + sep
39        swwfile = file_loc + project.scenario_name + '.sww'
40        swwfiles[swwfile] = label_id
41           
42        texname, elev_output = sww2timeseries(swwfiles,
43                                              project.beach_gauges,
44                                              production_dirs,
45                                              report = False,
46                                              plot_quantity = ['stage', 'speed'],
47                                              generate_fig = False,
48                                              surface = False,
49                                              time_min = None,
50                                              time_max = None,
51                                              time_unit = 'hours',
52                                              title_on = False,
53                                              use_cache = True,
54                                              verbose = True)
55
56if is_parallel is True:                                     
57
58    for count in range(no_nodes):
59        swwfiles = {} 
60        for label_id in production_dirs.keys():
61
62            file_loc = project.output_dir + label_id + sep
63            extra = '_P%i_%i' %(count,no_nodes)
64            swwfile = file_loc + project.scenario_name + extra + '.sww'
65            swwfiles[swwfile] = label_id
66
67            texname, elev_output = sww2timeseries(swwfiles,
68                                                  project.beach_gauges,
69                                                  production_dirs,
70                                                  report = False,
71                                                  plot_quantity = ['stage', 'speed'],
72                                                  generate_fig = False,
73                                                  surface = False,
74                                                  time_min = None,
75                                                  time_max = None,
76                                                  time_unit = 'hours',
77                                                  title_on = False,
78                                                  use_cache = True,
79                                                  verbose = True)
80                                     
Note: See TracBrowser for help on using the repository browser.