1 | """This script allows the user to view the stage values of the scenario output |
---|
2 | sww file (for the sydney tsunami scenario 2006) at the gauge points defined. |
---|
3 | |
---|
4 | The gauge points are defined in the same directory which runs the scenario |
---|
5 | script and the output is written to that directory as well. |
---|
6 | |
---|
7 | The output file can then be read into Excel as a comma delimited file |
---|
8 | (deselect the tab delimiter). |
---|
9 | |
---|
10 | The 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 | |
---|
19 | NOTE - the directory structure is set up according to the structure |
---|
20 | on Jane's machine. Please update the outputhome and productionhome paths |
---|
21 | according to your setup. |
---|
22 | |
---|
23 | Duncan Gray, Jane Sexton and Adrian Hitchman, GA 2006 """ |
---|
24 | |
---|
25 | from interpolate_sww import interpolate_sww2xya |
---|
26 | from os import sep |
---|
27 | |
---|
28 | print '\n\ |
---|
29 | The directory structure is set up according to the \n\ |
---|
30 | structure on Jane\'s computer. \n\ |
---|
31 | \n\ |
---|
32 | Please update the outputhome and productionhome paths \n\ |
---|
33 | according to your computer. ' |
---|
34 | |
---|
35 | outputhome = '..\..\..\..\sydney_tsunami_scenario_2006\output' |
---|
36 | productionhome = '..\..\production\sydney_2006' |
---|
37 | |
---|
38 | swwfilename = outputhome + sep + 'sydney_2006_100.sww' |
---|
39 | gaugepointsfilename = productionhome + sep + 'harbour_gauge.xya' |
---|
40 | outputfilename = productionhome + sep + 'interpolate_output.xya' |
---|
41 | |
---|
42 | interpolate_sww2xya(swwfilename, 'stage', gaugepointsfilename, \ |
---|
43 | outputfilename, display_errors = True) |
---|