[7301] | 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 | |
---|
| 16 | </td> |
---|
| 17 | <td> |
---|
| 18 | <H1>Tsunami Inundation Models for the GOSFORD region</H1> |
---|
| 19 | </td> |
---|
| 20 | </tr> |
---|
| 21 | </table> |
---|
| 22 | <hr> |
---|
| 23 | |
---|
| 24 | <a name="modifications"><h2><b>Modifying a simulation</b></h2></a> |
---|
| 25 | |
---|
| 26 | Here we talk about how you change a simulation. Why would you need to change a simulation? Well, |
---|
| 27 | you might have some better elevation data, you want to run the simulation on a finer mesh in certain |
---|
| 28 | areas, or maybe you want to see the result for different events. |
---|
| 29 | <p> |
---|
| 30 | First we describe the uses of the script files you might change, then we walk through a few examples |
---|
| 31 | of changes you might make. |
---|
| 32 | <p> |
---|
| 33 | |
---|
| 34 | <a name="project_files"><h3><b>The project scripts</b></h3></a> |
---|
| 35 | |
---|
| 36 | In the <b>project</b> directory are the scripts that control the simulation. These scripts are: |
---|
| 37 | <table class="code"> |
---|
| 38 | <tr><td><font color="red">project.py</font></td><td>Defines the input data used, where to place output, etc.</td></tr> |
---|
| 39 | <tr><td><font color="red">build_elevation.py</font></td><td>Builds a PTS file of all elevation data specified by <font color="red">project.py</font></td></tr> |
---|
| 40 | <tr><td><font color="red">setup_model.py</font></td><td>Prepares the simulation before actually running it</td></tr> |
---|
| 41 | <tr><td><font color="red">run_model.py</font></td><td>Runs the simulation</td></tr> |
---|
| 42 | </table> |
---|
| 43 | |
---|
| 44 | <a name="project.py"><h4><b>project.py</b></h4></a> |
---|
| 45 | |
---|
| 46 | This file is the heart of the simulation. The project script introduces all files that are necessary to run all accompanying scripts. |
---|
| 47 | By changing one of the variables in this script the output could be completely different. |
---|
| 48 | For further details on changing parameters see <a href="#change">Making changes to a simulation</a>. |
---|
| 49 | |
---|
| 50 | <!-- This file is the heart of the simulation. Here we specify many things, including the tide level, the simulation |
---|
| 51 | start and stop times, input data files, and so on. Because we are using python as the programming language in |
---|
| 52 | these files, we can use the power of the language to speed up our development. We use this by <i>parameterising</i> |
---|
| 53 | data as much as possible. |
---|
| 54 | <p> |
---|
| 55 | Parameters that you might change |
---|
| 56 | As an example, let's look at the <b>scenario_name</b> variable we define in <font color="red">project.py</font>: |
---|
| 57 | <table class="code"> |
---|
| 58 | <tr><td>scenario_name = 'hobart' # name of the scenario</td></tr> |
---|
| 59 | </table> |
---|
| 60 | <p> |
---|
| 61 | We define this variable solely to quickly change other input filenames. Where we want a different input files for |
---|
| 62 | a different scenario, |
---|
| 63 | depending on whether we want a 'small' or 'large' model, we build the filenames using the <b>model</b> variable. |
---|
| 64 | Some examples are: |
---|
| 65 | <p> |
---|
| 66 | <table class="code"> |
---|
| 67 | <tr height="25"><td>bounding_polygon_filename = 'bounding_polygon_'+ model + '.csv'</td></tr> |
---|
| 68 | <tr height="25"><td>land_initial_conditions_filename = [['initial_conditions_' + model +'.csv', 0]]</td></tr> |
---|
| 69 | <tr height="25"><td>landward_boundary_filename = 'landward_boundary_'+ model +'.csv'</td></tr> |
---|
| 70 | </table> |
---|
| 71 | <p> |
---|
| 72 | We must, of course, ensure that there are input files <font color="red">bounding_polygon_small.csv</font> |
---|
| 73 | and <font color="red">bounding_polygon_large.csv</font>, and so on. |
---|
| 74 | <p> |
---|
| 75 | Now, if we need to change the simulation model from 'small' to 'large', we need only change the |
---|
| 76 | value of the <b>model</b> variable, and all the input files that depend on the model will change. |
---|
| 77 | This speeds up development and make errors less likely. If you want to add another model to the two |
---|
| 78 | we show above, just set <b>model</b> to 'medium' and create appropriate input files with the string |
---|
| 79 | 'medium' in the filename. --> |
---|
| 80 | |
---|
| 81 | <a name="build_elevation.py"><h4><b>build_elevation.py</b></h4></a> |
---|
| 82 | |
---|
| 83 | This script combines all input elevation files into one PTS file. |
---|
| 84 | We have provided you with the PTS file used to create the outputs on this DVD. |
---|
| 85 | If you would like to change the elevation see <a href="#change">Making changes to a simulation</a>. |
---|
| 86 | <p> |
---|
| 87 | |
---|
| 88 | <a name="setup_model.py"><h4><b>setup_model.py</b></h4></a> |
---|
| 89 | |
---|
| 90 | This script is used to transform data into a specific format for <font color="red">run_model.py</font>, |
---|
| 91 | if required, and to generate warning messages if you are missing data. |
---|
| 92 | <p> |
---|
| 93 | |
---|
| 94 | <a name="run_model.py"><h4><b>run_model.py</b></h4></a> |
---|
| 95 | |
---|
| 96 | This script runs a tsunami inundation scenario. It relies on the parameters set in <font color="red">project.py</font> |
---|
| 97 | as well as the PTS and STS files. |
---|
| 98 | An STS file has been generated for each event listed in the boundaries directory. For further details on events see |
---|
| 99 | <a href="#change">Making changes to a simulation</a>. |
---|
| 100 | <p> |
---|
| 101 | |
---|
| 102 | <a name="change"><h3><b>Making changes to a simulation</b></h3></a> |
---|
| 103 | |
---|
| 104 | There are many parameters that you can change within the <font color="red">project.py</font> script, |
---|
| 105 | but the following four parameters are those most commonly changed. |
---|
| 106 | <p> |
---|
| 107 | |
---|
| 108 | <a name="tide"><h4><b>Tide</b></h4></a> |
---|
| 109 | |
---|
| 110 | The <b>tide</b> parameter is used to change the mean stage of the simulation. When <b>tide</b> is set to 0 |
---|
| 111 | the initial water level will be at Mean Sea Level. If you increase the <b>tide</b> value the water level will become deeper. |
---|
| 112 | However land is masked out using initial conditions. Within ANUGA <b>tide</b> is modelled as a constant. |
---|
| 113 | <p> |
---|
| 114 | |
---|
| 115 | <a name="events"><h4><b>Events</b></h4></a> |
---|
| 116 | |
---|
| 117 | The <b>event_number</b> variable contains the event number that initiates the tsunami we are modelling. |
---|
| 118 | You can change <b>event_number</b> to any event number in the anuga/boundaries directory. |
---|
| 119 | As we said above, a new STS file must be generated for <font color="red">run_model.py</font> to work. |
---|
| 120 | <p> |
---|
| 121 | The event numbers correspond to a quake ID from the probabilistic tsunami hazard map of Australia. |
---|
| 122 | <table class="code"> |
---|
| 123 | <tr><td><pre>event_number = 51436 # 1 in 10000 yr event from New Hebrides</pre></td></tr> |
---|
| 124 | </table> |
---|
| 125 | <p> |
---|
| 126 | |
---|
| 127 | <a name="elevation"><h4><b>Elevation</b></h4></a> |
---|
| 128 | |
---|
| 129 | Elevation data can be changed in the <font color="red">project.py</font> elevation script. |
---|
| 130 | Elevation data can be read as either a point file, comma delimited, or as an ASCII grid file |
---|
| 131 | (ASC) with an accompanying projection file (PRJ). All elevation input must be projected in the correct UTM zone. |
---|
| 132 | <p> |
---|
| 133 | |
---|
| 134 | A header for a CSV file has the format: |
---|
| 135 | <table class="code"> |
---|
| 136 | <tr><td><pre>x,y,elevation</pre></td></tr> |
---|
| 137 | </table> |
---|
| 138 | <p> |
---|
| 139 | |
---|
| 140 | An ASC file header has the format: |
---|
| 141 | <table class="code"> |
---|
| 142 | <tr><td><pre>ncols 868 |
---|
| 143 | nrows 856 |
---|
| 144 | xllcorner 418933.86055096 |
---|
| 145 | yllcorner 5151810.6668096 |
---|
| 146 | cellsize 250 |
---|
| 147 | NODATA_value -9999</pre></td></tr> |
---|
| 148 | </table> |
---|
| 149 | <p> |
---|
| 150 | |
---|
| 151 | The header of a PRJ file has the format: |
---|
| 152 | <table class="code"> |
---|
| 153 | <tr><td><pre>Projection UTM |
---|
| 154 | Zone 55 |
---|
| 155 | Datum D_GDA_1994 |
---|
| 156 | Zunits NO |
---|
| 157 | Units METERS |
---|
| 158 | Spheroid GRS_1980 |
---|
| 159 | Xshift 500000 |
---|
| 160 | Yshift 10000000 |
---|
| 161 | Parameters</pre></td></tr> |
---|
| 162 | </table> |
---|
| 163 | <p> |
---|
| 164 | |
---|
| 165 | The elevation filenames must be listed in either <b>point_filenames</b> or <b>ascii_grid_filenames</b> |
---|
| 166 | depending on their format. Point files need to have their extension shown however the ascii grid files have the .asc extension assumed: |
---|
| 167 | <table class="code"> |
---|
| 168 | <tr><td><pre>point_filenames = ['SD100031996_jgriffin_clip.csv', |
---|
| 169 | 'tomaga_offshore_AHD_MGA_1997.csv', |
---|
| 170 | 'gosford_BBHD_MGA_1995.csv', |
---|
| 171 | 'gosford_AHD_MGA_2000.csv'] |
---|
| 172 | |
---|
| 173 | ascii_grid_filenames = ['sd100031996_p', |
---|
| 174 | 'sd100031996_p2', |
---|
| 175 | 'sd100031996_p3', |
---|
| 176 | 'sd100031996_p4']</pre></td></tr> |
---|
| 177 | </table> |
---|
| 178 | <p> |
---|
| 179 | |
---|
| 180 | For further information on ANUGA file formats please see the ANUGA User Manual, section 6.1. |
---|
| 181 | <p> |
---|
| 182 | |
---|
| 183 | <a name="interior_regions"><h4><b>Interior regions</b></h4></a> |
---|
| 184 | |
---|
| 185 | The <b>interior_regions</b> parameter allows you to change the mesh of the model. |
---|
| 186 | <p> |
---|
| 187 | </body> |
---|
| 188 | </html> |
---|