source: anuga_work/production/dampier_2006/get_timeseries.py @ 4311

Last change on this file since 4311 was 4311, checked in by nick, 17 years ago

updates to dampier

File size: 2.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# Create report directory
20reportdir = getcwd()+sep+'report'+sep
21if access(reportdir,F_OK) == 0:
22    mkdir (reportdir)
23   
24# sww file created from URS boundary
25production_dirs = {'boundaries': '10000 yr wave height'
26                   #'20070307_224017_run': 'URS boundary normal'
27                   }
28>>>>>>> .r4304
29
30   
31is_parallel = False
32if is_parallel == True:
33    nodes = 2
34   
35# Generate figures
36swwfiles = {}
37
38#J:\inundation\data\western_australia\onslow_tsunami_scenario_2006\anuga\boundaries SU-AU_high_res1.sww
39
40#boundary_dir_filename= os.path.join(home,data,state,'onslow_tsunami_scenario_2006',an,bo,'SU-AU_high_res1.sww')
41#gauges_dir_name_simple =
42if is_parallel == True:
43    print 'buggur'
44   
45
46else:
47   
48    for label_id in production_dirs.keys():
49       
50        if label_id == 'boundaries':
51                print 'boundaries'
52                file_loc = project.boundaries_in_dir
53                swwfile = project.boundaries_dir_name3 + '.sww'
54#                swwfile = boundary_dir_filename
55        else:
56            file_loc = project.output_dir + label_id + sep
57            swwfile = file_loc + project.scenario_name + '.sww'
58        swwfiles[swwfile] = label_id
59       
60    texname, elev_output = sww2timeseries(swwfiles,
61                                          project.gauges_dir_name_simple,
62>>>>>>> .r4304
63                                          production_dirs,
64                                          report = False,
65                                          #reportname = report_name,
66#                                          plot_quantity = ['stage', 'momentum'],
67                                          plot_quantity = ['stage', 'xmomentum', 'ymomentum'],
68                                          surface = False,
69                                          time_min = None,
70                                          time_max = None,
71                                          title_on = False,
72                                          verbose = True)
73                                         
Note: See TracBrowser for help on using the repository browser.