source: inundation/pyvolution/gauge_plot_sydney_2006.py @ 2202

Last change on this file since 2202 was 2202, checked in by sexton, 19 years ago

Script to read sww file and find stage heights at defined gauge points (set up for sydney tsunami scenario but can be changed easily)

File size: 1.7 KB
Line 
1"""This script allows the user to view the stage values of the scenario output
2sww file (for the sydney tsunami scenario 2006) at the gauge points defined.
3
4The gauge points are defined in the same directory which runs the scenario
5script and the output is written to that directory as well.
6
7The output file can then be read into Excel as a comma delimited file
8(deselect the tab delimiter).
9
10The user should follow these steps to view the output:
11
12* copy and transpose the given data and paste
13* select the first two points in the first column, insert cells and shift
14  cells down
15* delete first two rows
16* order the data by the first column (describes time)
17* plot (subsequent columns describe stage height at gauge points defined)
18
19NOTE - the directory structure is set up according to the structure
20on Jane's machine. Please update the outputhome and productionhome paths
21according to your setup.
22
23Duncan Gray, Jane Sexton and Adrian Hitchman, GA 2006 """
24   
25from interpolate_sww import interpolate_sww2xya
26from os import sep
27
28print '\n\
29The directory structure is set up according to the \n\
30structure on Jane\'s computer. \n\
31\n\
32Please update the outputhome and productionhome paths \n\
33according to your computer. '
34
35outputhome = '..\..\..\..\sydney_tsunami_scenario_2006\output'
36productionhome = '..\..\production\sydney_2006'
37
38swwfilename = outputhome + sep + 'sydney_2006_100.sww'
39gaugepointsfilename = productionhome + sep + 'harbour_gauge.xya'
40outputfilename = productionhome + sep + 'interpolate_output.xya'
41
42interpolate_sww2xya(swwfilename, 'stage', gaugepointsfilename, \
43                         outputfilename, display_errors = True)
Note: See TracBrowser for help on using the repository browser.