Ignore:
Timestamp:
Aug 7, 2009, 12:49:39 PM (15 years ago)
Author:
kristy
Message:

updated htmls to reflect editing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DVD_images/extra_files/BatemansBay/modifications.html

    r7300 r7329  
    2424  <a name="modifications"><h2><b>Modifying a simulation</b></h2></a>
    2525
    26   Here we talk about how you change a simulation.  Why would you need to change a simulation?  Well,
     26  Here we talk about how to change a simulation.  Why would you need to change a simulation?  Well,
    2727  you might have some better elevation data, you want to run the simulation on a finer mesh in certain
    2828  areas, or maybe you want to see the result for different events.
    2929  <p>
    30   First we describe the uses of the script files you might change, then we walk through a few examples
     30  First we describe the usage of the script files you might change, then we walk through a few examples
    3131  of changes you might make.
    3232  <p>
     
    3737  <table class="code">
    3838    <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>
     39    <tr><td><font color="red">build_elevation.py</font></td><td>Combines the elevation data specified by <font color="red">project.py</font> into one file; with the extension .PTS</td></tr>
    4040    <tr><td><font color="red">setup_model.py</font></td><td>Prepares the simulation before actually running it</td></tr>
    4141    <tr><td><font color="red">run_model.py</font></td><td>Runs the simulation</td></tr>
     
    4848    For further details on changing parameters see <a href="#change">Making changes to a simulation</a>.
    4949
    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'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# 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 
    8150  <a name="build_elevation.py"><h4><b>build_elevation.py</b></h4></a>
    8251
    83   This script combines all input elevation files into one PTS file.
     52  This script combines all input elevation files into a single elevation point file (PTS file).
    8453  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>.
     54  If you would like to change the elevation, see <a href="#change">Making changes to a simulation</a>.
    8655  <p>
    8756
     
    9564
    9665  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
     66  as well as the elevation and event input files (PTS and STS files respectively).
     67  An STS file has been generated for each event listed in the <u>boundaries</u> directory. For further details on events see
    9968  <a href="#change">Making changes to a simulation</a>.
    10069  <p>
     
    10675  <p>
    10776
     77  <a name="output"><h4><b>Output Folder Name</b></h4></a>
     78
     79  The <b>output folder name</b> should be unique between different runs on different data.
     80  The list of items below will be used to create the folder in your <u>output</u> directory.
     81  Your user name and time+date will be automatically added.  For example,
     82  <pre><font color="brown">
     83  output_comments = [setup, tide, event_number]</font></pre>
     84  will result in a folder name like
     85  <pre><font color="brown">
     86  20090212_091046_run_final_0_27283_rwilson</font>
     87Where you (<u>rwilson</u>) ran a <u>run</u> script at <u>9:10.46</u> in the morning on the <u>2/12/09</u>, <b>setup</b> = <u>final</u>,
     88<b>tide</b> = <u>0</u>, <b>event_number</b> = <u>27283</u>  - refer below for more information on these parameters </pre>
     89  <p>
     90  You can also add strings to this list
     91  <pre><font color="brown">
     92  output_comments = [setup, tide, event_number, 'large']</font></pre>
     93  will result in a folder name like
     94  <pre><font color="brown">
     95  20090212_091046_run_final_0_27283_large_rwilson</font></pre>
     96  <p>
     97  <p>
     98    <a name="setup"><h4><b>Setup</b></h4></a>
     99
     100  The <b>setup</b> parameter determines the type of run. This can be one of three values:
     101  <pre><font color="brown">
     102  'trial' <font color="black">- coarsest mesh, fast </font>
     103  'basic' <font color="black">- coarse mesh</font>
     104  'final' <font color="black">- fine mesh, slowest</font>
     105  </pre></font>
     106  Note: <b>'final'</b> must be used if determining the best estimate of inundation for your area of interest.
     107  <p>
    108108  <a name="tide"><h4><b>Tide</b></h4></a>
    109109
    110   The <b>tide</b> parameter is used to change the mean stage of the simulation.  When <b>tide</b> is set to 0
     110  The <b>tide</b> parameter is used to change the mean inital water level of the simulation.  When <b>tide</b> is set to 0
    111111  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.
     112  This setting will also increase non tidal lakes and rivers inside the model.  To compensate a mask is used on land called
     113  <b>initial conditions</b> which brings the internal water bodies back to 0.  Within ANUGA <b>tide</b> is modelled as a constant.
    113114  <p>
    114115
     
    119120  As we said above, a new STS file must be generated for <font color="red">run_model.py</font> to work.
    120121  <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>
     122  The event numbers correspond to a quake ID from the Probabilistic Tsunami Hazard Map Assessment of Australia.
     123
     124  <pre><font color="brown">
     125  event_number = 51436    # 1 in 10000 yr event from New Hebrides</font></pre>
     126
    125127  <p>
    126128
    127129  <a name="elevation"><h4><b>Elevation</b></h4></a>
    128130
    129   Elevation data can be changed in the <font color="red">project.py</font> elevation script.
     131  Elevation data can be changed in the <font color="red">project.py</font> script under ELEVATION DATA.
    130132  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.
     133  (ASC) with an accompanying projection file (PRJ). All elevation input should sit in <u>topographies</u> and must be projected in the correct UTM zone.
    132134  <p>
    133135
    134136  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>
     137
     138    <pre><font color="brown">
     139  x,y,elevation</font></pre>
     140
    138141  <p>
    139142
    140143  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>
     144
     145    <pre><font color="brown">
     146  ncols         868
     147  nrows         856
     148  xllcorner     418933.86055096
     149  yllcorner     5151810.6668096
     150  cellsize      250
     151  NODATA_value  -9999</font></pre>
     152
    149153  <p>
    150154
    151155  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>
     156
     157    <pre><font color="brown">
     158  Projection    UTM
     159  Zone          56
     160  Datum         D_GDA_1994
     161  Zunits        NO
     162  Units         METERS
     163  Spheroid      GRS_1980
     164  Xshift        500000
     165  Yshift        10000000
     166  Parameters</font></pre>
     167
     168  <p>
     169
     170  The elevation filenames in <font color="red">project.py</font> must be listed in either <b>point_filenames</b> or <b>ascii_grid_filenames</b>
    166171  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                    'Batemans_BBHD_MGA_1995.csv',
    171                    'moruya_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>
     172
     173    <pre><font color="brown">
     174  point_filenames = ['point1.csv',
     175                     'point2.csv',
     176                     'point3.csv']
     177
     178  ascii_grid_filenames = ['grid1',
     179                          'grid2',
     180                          'grid3']</font></pre>
     181
    178182  <p>
    179183
     
    183187  <a name="interior_regions"><h4><b>Interior regions</b></h4></a>
    184188
    185   The <b>interior_regions</b> parameter allows you to change the mesh of the model.
     189  The user can specify a number of internal polygons within each of which the resolution of the mesh can be specified.
     190  Mesh resolution is the maximum allowable area specified for each region, defining the largest area an indivdual
     191  triangular element of the mesh can take (and therefore the minimum mesh resolution).
     192  These polygons need to be nested within each other with no overlapping edges.
     193  <p>
     194  The <b>interior regions</b> can be changed in the <font color="red">project.py</font> script under INTERIOR REGIONS.
     195  Interior regions can be read as either seperate CSV files for each polygon displayed as a listed paired with its
     196  resolution and/or one CSV file for all polygons, where its resolution is defined within the csv under 'id'.
     197  All file inputs should sit in <u>polygons</u> and must be projected in the correct UTM zone.
     198  <p>
     199  The format for a CSV file with ONE polygon has the format:
     200  <pre><font color="brown">
     201  easting,northing  </font><font color="black"> Note: NO Header  </font></pre>
     202
     203
     204  The header for a CSV file with MANY polygons has the format:
     205  <pre><font color="brown">
     206  easting,northing,id,value</font></pre>
     207  <p>
     208  Where id = polygon number and value = maximum allowable area.
     209  <p>
     210  The <font color="red">project.py</font> script for this section looks like this:
     211
     212
     213  <pre><font color="brown">
     214  interior_regions_list = [['aos1.csv', 1500],
     215                           ['aos2.csv', 1500],
     216                           ['sw.csv', 30000]]
     217  interior_regions_multiple_csv = 'PriorityAreas.csv'</font></pre>
     218
     219  <p>
     220
     221  For further information on ANUGA file formats please see the ANUGA User Manual, section 5.1.
    186222  <p>
    187223</body>
    188224</html>
     225
Note: See TracChangeset for help on using the changeset viewer.