source: DVD_images/extra_files/GoldCoast/analysis.html @ 7363

Last change on this file since 7363 was 7363, checked in by Leharne, 15 years ago

changes to gold coast html files

File size: 7.2 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html>
3<head>
4  <title>Geoscience Australia</title>
5  <link rel="stylesheet" href="browser_files/style.css">
6  <link REL="SHORTCUT ICON" HREF="browser_files/favicon.ico">
7</head>
8<body>
9  <table cellspacing="10" border="0">
10    <tr>
11      <td>
12        <img src="browser_files/logo.jpg" alt="Australian Government, Geoscience Australia" width="327" height="80" border="0"/>
13      </td>
14      <td width="50">
15        &nbsp;
16      </td>
17      <td>
18        <H1>Tsunami Inundation Models for the Gold Coast region</H1>
19      </td>
20    </tr>
21  </table>
22  <hr>
23
24  <a name="analysis scripts"><h2><b>Analysis Scripts</b></h2></a>
25  There are number of analysis scripts on this disk that you can use to extract information from the SWW files
26  produced by a simulation run.  These scripts are not meant to be the definitive answer on how to get information
27  from SWW files, but are offered as an example of one way to do it.
28  <p>
29  This page describes the scripts and shows how to use them.  Note that due to the ad-hoc nature of the scripts,
30  you <b>must</b> modify these scripts before they can be used to extract information from any SWW files you
31  generate.
32
33  <a name="export_results_max.py scripts"><h3><b>export_results_max.py</b></h3></a>
34  The <font color="red">export_results_max.py</font> script can be used to create an ASC file that contains the maximum
35  of an ANUGA variable or expression for each point in a user-defined ArcGIS grid on the simulation region.
36  <p>
37  You must change certain values within the <font color="red">export_results_max.py</font> file to get what you want:
38  <ul>
39    <li> List the output folder names here, with one for each simulation you have run:
40<pre><font color="brown">    time_dir1 = '20090522_165600_run_final_1.1_51423_lfountai'
41    time_dir2 = '20090522_164640_run_final_1.1_51392_lfountai'</font></pre>
42         For information on  <a href="modifications.html#output">output_folder_name</a>.
43  <p>Then modify the line:
44<pre><font color="brown">    time_dirs = [time_dir1, time_dir2]</font></pre>
45         to include each of the variables you defined above.
46         <p>
47    <li> Your SWW output will have a name like <font color="red">gold_coast.sww</font>. For a large model you
48         may have more than one output file with extra filenames like <font color="red">gold_coast_28860_0.sww</font>,
49         where the <b>28860</b> tells us that the timestep at the start of this file is 28860 sec. The
50         <font color="red">export_results_max.py</font> script needs to examine all SWW output files, so we specify
51         all the files produced by the model run to create a maximum over the entire time.
52         We do this by specifying the start times of all the extra SWW files:
53         <p>
54<pre><font color="brown">    times = [28860, 57720] </font></pre>
55         <p>
56         <i>Note we do not have to specify the first SWW file, only the extra file start times. If there are no extra SWW files,
57         just do:</i>
58         <p>
59<pre><font color="brown">    times = []</font></pre>
60         <p>
61    <li> Modify the <b>cellsize</b> value to set the size of the ArcGIS grid you require.  For example:
62<pre><font color="brown">    cellsize = 20              # ArcGIS grid cell size in metres</font></pre>
63         <p>
64         <i>Note: That this value should not go beyond the most refined part of the mesh
65         i.e. if mesh resolution is 500m<sup>2</sup>, cellsize = (500 </i>x<i> 2)<sup>1/2</sup> = 32m</i>
66         <p>
67    <li> You can get the maximum of a variable or expression over the entire model time, or for a single time in the simulation.
68         Set <b>timestep</b> to the required time you want the maximum for, or set it to <b>None</b> to indicate that you want
69         the maximum values over all timesteps:
70<pre><font color="brown">    timestep = None  # over all timesteps
71    #timestep = 0</font></pre>
72         <p>
73         <i>Note that if you want the elevation use <b>timestep = 0</b>. Elevation does not change over time and you only need the
74         first SWW file.</i>
75         <p>
76    <li> If you want to clip the ArcGIS grid to one or more small regions then put the names of the regions of interest
77         into the <b>area</b> list:
78<pre><font color="brown">    area = ['PalmBeach', 'MainBeach', 'CBD']</font></pre>
79         <p>
80         <i>Note that the name strings you put into the <b>area</b> list must match the names used in the
81         <font color="red">project.py</font> file.  That is, if you use a name such as 'PalmBeach', then the
82         <font color="red">project.py</font> file must have lines like:</i>
83<pre><font color="brown">    xminPalmBeach = 548000
84    xmaxPalmBeach = 561000
85    yminPalmBeach = 5250000
86    ymaxPalmBeach = 5258000</font></pre>
87         which set the maximum and minimum eastings and northings that define a rectangular region.
88         <p>
89         If you don't want to clip to a region of interest, then do this:
90<pre><font color="brown">    area = ['All']             # no region of interest</font></pre>
91         <p>
92    <li> Finally you must decide which variable or expression values you want sampled on your ArcGIS grid.
93         Define a list <b>var</b> that contains strings defining the required variable or expression:
94<pre><font color="brown">    var = ['depth', 'speed']</font></pre>
95         <i>Note that the strings you supply must be defined in the <b>var_equations</b> dictionary
96         prior to your definition of <b>var</b>:</i>
97<pre><font color="brown">    var_equations = {'stage':     'stage',
98                     'momentum':  '(xmomentum**2 + ymomentum**2)**0.5',
99                     'depth':     'stage-elevation',
100                     'speed':     '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6)',
101                     'elevation': 'elevation' }</font></pre>
102         This dictionary maps your <b>var</b> strings to a variable or expression.
103  </ul>
104
105  <a name="get_timeseries.py"><h3><b>get_timeseries.py</b></h3></a>
106  The <font color="red">get_timeseries.py</font> script is used to get timeseries data for a selection of variable
107  data at one or more timeseries gauge points in a simulation.
108  <p>
109  You must change certain values within the <font color="red">get_timeseries.py</font> file to get what you want:
110  <ul>
111    <li> Depending on how many simulations you have run will determine the number of output folder names you insert here:
112<pre><font color="brown">    time_dir1 = '20090522_165600_run_final_1.1_51423_lfountai'
113    time_dir2 = '20090522_164640_run_final_1.1_51392_lfountai'</font></pre>
114         as necessary.  Then modify the line:
115<pre><font color="brown">    time_dirs = [time_dir1, time_dir2]</font></pre>
116         to include each of the variables you defined above.
117         <p>
118    <li> Make sure that the <b>gauges</b> list specified in <font color="red">projects.py</font> contains one or more CSV files
119         defining the gauges within the simulation that you want the timeseries data for.
120         The gauge file must have this format:
121<pre><font color="brown">    easting,northing,name,elevation
122    550154.557,6885684.489,Coolangatta,-5
123    546917.144,6889565.504,PalmBeach,-5</font></pre>
124  </ul>
125</body>
126</html>
Note: See TracBrowser for help on using the repository browser.