"""This script allows the user to view the stage values of the scenario output sww file (for the sydney tsunami scenario 2006) at the gauge points defined. The gauge points are defined in the same directory which runs the scenario script and the output is written to that directory as well. The output file can then be read into Excel as a comma delimited file (deselect the tab delimiter). The user should follow these steps to view the output: * copy and transpose the given data and paste * select the first two points in the first column, insert cells and shift cells down * delete first two rows * order the data by the first column (describes time) * plot (subsequent columns describe stage height at gauge points defined) NOTE - the directory structure is set according to that on Jane's machine. Please update the outputhome and productionhome paths according to your setup. Duncan Gray, Jane Sexton and Adrian Hitchman, GA 2006 """ from interpolate_sww import interpolate_sww2xya from os import sep print '\n\ The directory structure is set up according to that on Jane\'s machine. \n\ \n\ Please update the outputhome and productionhome paths according \n\ to your computer. ' #outputhome = '..\..\..\..\sydney_tsunami_scenario_2006\output' outputhome = '..\..\..\..\sydney_tsunami_scenario_2006\output' productionhome = '..\..\production\sydney_2006' #swwfilename = outputhome + sep + 'sydney_2006_100.sww' #swwfilename = outputhome + sep + 'bathyland100.sww' swwfilename = outputhome + sep + 'slump.sww' gaugepointsfilename = productionhome + sep + 'harbour_gauge.xya' #gaugepointsfilename = productionhome + sep + 'bay_gauge.xya' outputfilename1 = productionhome + sep + 'interpolate_output1.xya' outputfilename2 = productionhome + sep + 'interpolate_output2.xya' interpolate_sww2xya(swwfilename, 'stage', gaugepointsfilename, \ outputfilename1, display_errors = True) #interpolate_sww2xya(swwfilename, 'depth', gaugepointsfilename, \ # outputfilename2, display_errors = True)