source: anuga_work/production/broome_2006/get_timeseries.py @ 4631

Last change on this file since 4631 was 4581, checked in by sexton, 17 years ago

minor updates for model interrogation

File size: 3.4 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 = {'20070702_050939_run_final_4.9_exmouth_nbartzis': ''}
21
22# 20070702_050939_run_final_4.9_exmouth_nbartzis HAT exmouth
23# 20070615_062730_run_final_0_exmouth_nbartzis # MSL exmouth
24# 20070618_064014_run_final_4.9_onslow_nbartzis # HAT onslow
25# 20070622_004008_run_final_0_onslow_nbartzis # MSL onslow
26# 20070615_063137_run_final_4.9_dampier_nbartzis # HAT dampier
27# 20070621_002922_run_final_0_dampier_nbartzis # MSL dampier
28
29is_parallel = True
30
31if is_parallel is True:
32    no_nodes = 4
33   
34if is_parallel is False:
35   
36    swwfiles = {}   
37    for label_id in production_dirs.keys():
38       
39        file_loc = project.output_dir + label_id + sep
40        swwfile = file_loc + project.scenario_name + '.sww'
41        swwfiles[swwfile] = label_id
42           
43        texname, elev_output = sww2timeseries(swwfiles,
44                                              project.beach_gauges,
45                                              production_dirs,
46                                              report = False,
47                                              plot_quantity = ['stage', 'speed'],
48                                              generate_fig = False,
49                                              surface = False,
50                                              time_min = None,
51                                              time_max = None,
52                                              time_unit = 'hours',
53                                              title_on = False,
54                                              use_cache = True,
55                                              verbose = True)
56
57if is_parallel is True:                                     
58
59    for count in range(no_nodes):
60        swwfiles = {} 
61        for label_id in production_dirs.keys():
62
63            file_loc = project.output_dir + label_id + sep
64            extra = '_P%i_%i' %(count,no_nodes)
65            swwfile = file_loc + project.scenario_name + extra + '.sww'
66            swwfiles[swwfile] = label_id
67
68            texname, elev_output = sww2timeseries(swwfiles,
69                                                  project.beach_gauges,
70                                                  production_dirs,
71                                                  report = False,
72                                                  plot_quantity = ['stage', 'speed'],
73                                                  generate_fig = False,
74                                                  surface = False,
75                                                  time_min = None,
76                                                  time_max = None,
77                                                  time_unit = 'hours',
78                                                  title_on = False,
79                                                  use_cache = True,
80                                                  verbose = True)
81                                     
Note: See TracBrowser for help on using the repository browser.