Changeset 7363


Ignore:
Timestamp:
Aug 14, 2009, 9:03:48 AM (15 years ago)
Author:
Leharne
Message:

changes to gold coast html files

Location:
DVD_images/extra_files/GoldCoast
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • DVD_images/extra_files/GoldCoast/analysis.html

    r7301 r7363  
    1616      </td>
    1717      <td>
    18         <H1>Tsunami Inundation Models for the GOLD COAST region</H1>
     18        <H1>Tsunami Inundation Models for the Gold Coast region</H1>
    1919      </td>
    2020    </tr>
     
    2727  from SWW files, but are offered as an example of one way to do it.
    2828  <p>
    29   This page describes the scripts and shows how to use them.  Note that due to the ad-hoc nature of the scripts, 
     29  This page describes the scripts and shows how to use them.  Note that due to the ad-hoc nature of the scripts,
    3030  you <b>must</b> modify these scripts before they can be used to extract information from any SWW files you
    3131  generate.
     
    3333  <a name="export_results_max.py scripts"><h3><b>export_results_max.py</b></h3></a>
    3434  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 raster on the simulation region.
     35  of an ANUGA variable or expression for each point in a user-defined ArcGIS grid on the simulation region.
    3636  <p>
    3737  You must change certain values within the <font color="red">export_results_max.py</font> file to get what you want:
    3838  <ul>
    39     <li> You must determine how many SWW files your simulation produced and create as many lines like this:
    40 <pre><font color="brown">    time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt'
    41     time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt'</font></pre>
    42          as necessary.  Then modify the line:
     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:
    4344<pre><font color="brown">    time_dirs = [time_dir1, time_dir2]</font></pre>
    4445         to include each of the variables you defined above.
    45          <p>   
    46     <li> Your SWW output will have a name like <font color="red">gold_coast.sww</font>. For a large model you 
    47          may have more than one output file with extra filenames like <font color="red">gold_coast_37860_0.sww</font>,
    48          where the <b>37860</b> tells us that the timestep at the start of this file is 37860 sec. The 
     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
    4950         <font color="red">export_results_max.py</font> script needs to examine all SWW output files, so we specify
    5051         all the files produced by the model run to create a maximum over the entire time.
    51          We do this by specifying the start times of all the extra SWW files:
    52          <p>   
    53 <pre><font color="brown">    times = [37860]</font></pre>
     52         We do this by specifying the start times of all the extra SWW files:
    5453         <p>
    55          Note we do not have to specify the first SWW file, only the extra file start times. If there are no extra SWW files,
    56          just do:
    57          <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>
    5859<pre><font color="brown">    times = []</font></pre>
    5960         <p>
    60     <li> Modify the <b>cellsize</b> value to set the size of the raster you require.  For example:
    61 <pre><font color="brown">    cellsize = 20              # raster cell size in metres</font></pre>
    62          <p>   
    63     <li> You can get the maximum of a variable or expression over the entire model time, or for a single time in the simulation.
     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.
    6468         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
    65          the maximum values in the raster over all timesteps:
     69         the maximum values over all timesteps:
    6670<pre><font color="brown">    timestep = None  # over all timesteps
    6771    #timestep = 0</font></pre>
    68          <p>         
    69          Note that if you want the elevation use <b>timestep = 0</b>. Elevation does not change over time and you only need the
    70          first SWW file.               
    7172         <p>
    72     <li> If you want to clip the raster to one or more small regions then put the names of the regions of interest
     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
    7377         into the <b>area</b> list:
    74 <pre><font color="brown">    area = ['Gold_Coast', 'NW', 'South']</font></pre>
    75          Note that the name strings you put into the <b>area</b> list must match the names used in the
    76          <font color="red">project.py</font> file.  That is, if you use a name such as 'NW', then the
    77          <font color="red">project.py</font> file must have lines like:
    78 <pre><font color="brown">    xminNW = 548000
    79     xmaxNW = 561000
    80     yminNW = 5250000
    81     ymaxNW = 5258000</font></pre>
     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>
    8287         which set the maximum and minimum eastings and northings that define a rectangular region.
    8388         <p>
     
    8590<pre><font color="brown">    area = ['All']             # no region of interest</font></pre>
    8691         <p>
    87     <li> Finally you must decide which variable or expression values you want sampled on your raster.
     92    <li> Finally you must decide which variable or expression values you want sampled on your ArcGIS grid.
    8893         Define a list <b>var</b> that contains strings defining the required variable or expression:
    8994<pre><font color="brown">    var = ['depth', 'speed']</font></pre>
    90          Note that the strings you supply must be defined in the <b>var_equations</b> dictionary
    91          prior to your definition of <b>var</b>:
     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>
    9297<pre><font color="brown">    var_equations = {'stage':     'stage',
    9398                     'momentum':  '(xmomentum**2 + ymomentum**2)**0.5',
     
    100105  <a name="get_timeseries.py"><h3><b>get_timeseries.py</b></h3></a>
    101106  The <font color="red">get_timeseries.py</font> script is used to get timeseries data for a selection of variable
    102   data at one or more gauge points in a simulation.
     107  data at one or more timeseries gauge points in a simulation.
    103108  <p>
    104109  You must change certain values within the <font color="red">get_timeseries.py</font> file to get what you want:
    105110  <ul>
    106     <li> You must determine how many SWW files your simulation produced and create as many lines like this:
    107 <pre><font color="brown">    time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt'
    108     time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt'</font></pre>
     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>
    109114         as necessary.  Then modify the line:
    110115<pre><font color="brown">    time_dirs = [time_dir1, time_dir2]</font></pre>
    111116         to include each of the variables you defined above.
    112117         <p>
    113     <li> Make sure that the <b>gauges</b> list in <font color="red">projects.py</font> contains one or more CSV files
     118    <li> Make sure that the <b>gauges</b> list specified in <font color="red">projects.py</font> contains one or more CSV files
    114119         defining the gauges within the simulation that you want the timeseries data for.
    115120         The gauge file must have this format:
    116121<pre><font color="brown">    easting,northing,name,elevation
    117     559134.8963,5251176.875,Connelly,2
    118     532441.5164,5239639.686,Opossum,2</font></pre>
     122    550154.557,6885684.489,Coolangatta,-5
     123    546917.144,6889565.504,PalmBeach,-5</font></pre>
    119124  </ul>
    120125</body>
  • DVD_images/extra_files/GoldCoast/index.html

    r7357 r7363  
    2323
    2424  <a name="introduction"><h3><b>Introduction</b></h3></a>
    25 
    26   The information on this DVD and the associated report is intended to assist emergency managers in developing preparation and
    27   response plans that can be used during a tsunami threat or emergency.
    2825  <p>
    2926  The Attorney General's Department (AGD) has supported Geoscience Australia (GA) in developing a range of products to support
     
    3229  <p>
    3330  While the associated report provides background, model results and interpretations, the DVD contains all data, scripts and
    34   software necessary to reproduce and potentially augment the models underpinning the report. This will allow the Jurisdiction
    3531  to rerun the models with minor modifications or new elevation data as needed and also potentially replicate the methodology
    3632  to other locations within the model extent, if desired.
     
    5147  </ul>
    5248  <p>
    53   The tsunami wave data on this disk are all derived from events available in the Australian Tsunami
    54   Hazard Map. As this dataset is very large, this DVD only contains the events
    5549  described in the report.
    5650
  • DVD_images/extra_files/GoldCoast/installation.html

    r7301 r7363  
    1616      </td>
    1717      <td>
    18         <H1>Tsunami Inundation Models for the GOLD COAST region</H1>
     18        <H1>Tsunami Inundation Models for the Gold Coast region</H1>
    1919      </td>
    2020    </tr>
     
    3131
    3232  The tsunami inundation simulations are based on the Open Source software package called ANUGA.
    33   For more information about ANUGA visit <a href="https://datamining.anu.edu.au/anuga">https://datamining.anu.edu.au/anuga</a>. 
     33  For more information about ANUGA visit <a href="https://datamining.anu.edu.au/anuga">https://datamining.anu.edu.au/anuga</a>.
    3434  <p>
    35   ANUGA has been developed and tested under the Windows XP and Linux (Ubuntu, Mint and Red Hat) operating systems. 
     35  ANUGA has been developed and tested under the Windows XP and Linux (Ubuntu, Mint and Red Hat) operating systems.
    3636  ANUGA may also be installed on a Windows Vista system and Debian Linux, but these have not been extensively tested.
    3737  <p>
     
    4040
    4141  <a name="installing"><h3><b>Installing ANUGA</b></h3></a>
    42 
     42  <a href="http://sourceforge.net/projects/anuga/">Download Software</a><i>: please note Internet Explorer has the habit of renaming the
     43  .tgz file to .gz - the remedy is to rename them back or use another browser such as Firefox.</i>
     44  <p>
    4345  You must install ANUGA according to the <a href="documents/anuga_installation_guide.pdf">Installation Guide</a>.
    4446  As the installation procedure comprises a number of steps we suggest that it is carried out by someone with a
    45   basic understanding of how to install software packages on the operating system of choice. 
     47  basic understanding of how to install software packages on the operating system of choice.
    4648
    4749  <a name="simulating"><h3><b>How to run a simulation</b></h3></a>
     
    5254  can be used to get help.
    5355  <p>
    54  
     56
    5557  <p>
    5658  <hr align="left" width="100">
     
    6163  <hr align="left" width="100">
    6264  <p>
    63   Next, you must copy the entire contents of the DVD to a place in your filesystem. Let's assume
    64   that you want to put the data into <b>C:\ANUGA</b>. You would do this in a Command Prompt window:
    65   <table class="code"><tr><td>
    66     C:<br>
    67     cd \<br>
    68     mkdir ANUGA<br>
     65  Next, you must copy the entire contents of the DVD to a place in your file system. Let's assume
     66  that you want to put the data into <b>C:\ANUGA</b>. You could drag all files from the DVD into this folder with Explorer.
     67  Or through the Command Prompt window:
     68  <pre><font color="brown">
     69    C:
     70    cd
     71    mkdir ANUGA
    6972    xcopy /e X:\ ANUGA
    70   </td></tr></table>
    71   <p>
    72   Of course, you could just drag all files on the DVD (X:\ is the assumed drive letter) to the desired target directory with Explorer.
     73  </font></pre>
     74  X:\ is the assumed to be the CD drive letter.
    7375  <p>
    7476  <hr align="left" width="100">
    7577  <p>
    7678  Now you must create an environment variable <b>ANUGADATA</b> that points to the directory you just created:
    77   <table class="code"><tr><td>
     79  <pre><font color="brown">
    7880    set ANUGADATA=C:\ANUGA
    79   </td></tr></table>
    80   <p>
     81  </font></pre>
    8182  Doing the above in a Command Prompt window is temporary - if you open another
    8283  window you will not have the ANUGADATA environment variable defined. To make
     
    8485  tool (<b>Advanced</b> tab).  See the <a href="documents/anuga_installation_guide.pdf">Installation Guide</a>
    8586  if you don't know how to do this.
    86   <p>
    8787  <hr align="left" width="100">
    88   <p>
    8988  Next, you prepare and execute the model:
    90   <table class="code"><tr><td>
    91     cd C:\ANUGA<br>
    92     cd project<br>
    93     python setup_model.py<br >
     89  <pre><font color="brown">
     90    cd C:\ANUGA
     91    cd project
     92    python setup_model.py
    9493    python run_model.py
    95   </td></tr></table>
    96   <p>
     94  </font></pre>
    9795  <hr align="left" width="100">
    98   <p>
    9996  This should all run to completion though it may take several days, depending on
    10097  the hardware used.
     
    105102  drilling down from that point until you find a directory called <b>outputs</b>.
    106103  The latest directory in <b>outputs</b> should contain a file called <font color="red">screen_error.txt</font>
    107   with an explanation of the error at the end. 
     104  with an explanation of the error at the end.
    108105  <p>
    109106  Once the simulation has completed you may view the results using the ANUGA
    110   viewer as described in the <a href="documents/anuga_installation_guide.pdf">Installation Guide</a> 
     107  viewer as described in the <a href="documents/anuga_installation_guide.pdf">Installation Guide</a>
    111108  and <a href="documents/anuga_user_manual.pdf">User Manual</a>.  You may also
    112109  generate rasters suitable for GIS mapping or write dedicated scripts extracting timeseries at selected
     
    120117  After you have run a simulation you may wish to extract information from the generated SWW file.
    121118  On this disk there are a selection of example analysis scripts that you can use or modify.
    122   The <a href="analysis.html">analysis scripts</a> page explains how to use the scripts.
     119  The <a href="analysis.html">analysis</a> page explains how to use the scripts.
    123120
    124121  <a name="modifications"><h3><b>How to modify a simulation</b></h3></a>
     
    138135  <a name="FAQ"><h3><b>Frequently Asked Questions</b></h3></a>
    139136
    140   There is a <b>Frequently Asked Questions</b> (FAQ) page at
    141   <a href="https://datamining.anu.edu.au/anuga/wiki/FrequentlyAskedQuestions">https://datamining.anu.edu.au/anuga/wiki/FrequentlyAskedQuestions</a>.
    142   Look in there and search the mailing list archives before asking questions on the ANUGA user's mailing list.
    143   Someone may already have asked your question!
     137  Look in <b><a href="https://datamining.anu.edu.au/anuga/wiki/FrequentlyAskedQuestions">Frequently Asked Questions</a></b> (FAQ) and search the mailing list archives before asking questions on the ANUGA user's mailing list.
     138  Someone may already have asked and answered your question!
    144139  <p>
    145140  Note that you can edit the FAQ pages, so it is helpful if you can update the FAQ with your question and its answer if you feel
  • DVD_images/extra_files/GoldCoast/modifications.html

    r7301 r7363  
    1616      </td>
    1717      <td>
    18         <H1>Tsunami Inundation Models for the GOLD COAST region</H1>
     18        <H1>Tsunami Inundation Models for the Gold Coast region</H1>
    1919      </td>
    2020    </tr>
     
    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,
    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.
     26  Here we talk about how to 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 usage of the model script files you might change, then we walk through a few examples
     31  of changes you might make within these.
    3232  <p>
    3333
     
    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
     
    8958
    9059  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.
     60  if required, and to generate warning messages if you are missing required types of data (though not it will not alert you if you have data gaps e.g. missing data in your elevation grid).
    9261  <p>
    9362
     
    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 throughout the duration of the simulation.
    113114  <p>
    114115
     
    116117
    117118  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>
     119  You can change <b>event_number</b> to any event number in the <u>boundaries</u> directory.
     120  <a href="data/queensland/gold_coast_tsunami_scenario_2009/anuga/boundaries/events_chosen.xls">Click here</a> for more information on the events.
     121  An STS file has been generated for all events listed in the <u>boundaries</u> directory.
     122  <p>
     123  The event numbers correspond to a quake ID from the Probabilistic Tsunami Hazard Map Assessment of Australia.
     124
     125  <pre><font color="brown">
     126  event_number = 51469    # 1 in 10000 yr event from New Hebrides Trench</font></pre>
     127
    125128  <p>
    126129
    127130  <a name="elevation"><h4><b>Elevation</b></h4></a>
    128131
    129   Elevation data can be changed in the <font color="red">project.py</font> elevation script.
     132  Elevation data can be changed in the <font color="red">project.py</font> script under ELEVATION DATA.
    130133  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.
     134  (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.
    132135  <p>
    133136
    134137  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
     139    <pre><font color="brown">
     140  x,y,elevation</font></pre>
     141
    138142  <p>
    139143
    140144  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>
     145
     146    <pre><font color="brown">
     147  ncols         868
     148  nrows         856
     149  xllcorner     418933.86055096
     150  yllcorner     5151810.6668096
     151  cellsize      250
     152  NODATA_value  -9999</font></pre>
     153
    149154  <p>
    150155
    151156  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>
     157
     158    <pre><font color="brown">
     159  Projection    UTM
     160  Zone          55
     161  Datum         D_GDA_1994
     162  Zunits        NO
     163  Units         METERS
     164  Spheroid      GRS_1980
     165  Xshift        500000
     166  Yshift        10000000
     167  Parameters</font></pre>
     168
     169  <p>
     170
     171  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>
    166172  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>
     173
     174    <pre><font color="brown">
     175  point_filenames = ['point1.csv',
     176                     'point2.csv',
     177                     'point3.csv']
     178
     179  ascii_grid_filenames = ['grid1',
     180                          'grid2',
     181                          'grid3']</font></pre>
     182
    178183  <p>
    179184
     
    183188  <a name="interior_regions"><h4><b>Interior regions</b></h4></a>
    184189
    185   The <b>interior_regions</b> parameter allows you to change the mesh of the model.
     190  The user can specify a number of internal polygons within each of which the resolution of the mesh can be specified.
     191  Mesh resolution is the maximum allowable area specified for each region, defining the largest area an indivdual
     192  triangular element of the mesh can take (and therefore the minimum mesh resolution).
     193  These polygons need to be nested within each other with no overlapping edges.
     194  <p>
     195  The <b>interior regions</b> can be changed in the <font color="red">project.py</font> script under INTERIOR REGIONS.
     196  Interior regions can be read as either seperate CSV files for each polygon displayed as a listed paired with its
     197  resolution and/or one CSV file for all polygons, where its resolution is defined within the csv under 'id'.
     198  All file inputs should sit in <u>polygons</u> and must be projected in the correct UTM zone.
     199  <p>
     200  The format for a CSV file with ONE polygon has the format:
     201  <pre><font color="brown">
     202  easting,northing  </font><font color="black"> Note: NO Header  </font></pre>
     203
     204
     205  The header for a CSV file with MANY polygons has the format:
     206  <pre><font color="brown">
     207  easting,northing,id,value</font></pre>
     208  <p>
     209  Where id = polygon number and value = maximum allowable area.
     210  <p>
     211  The <font color="red">project.py</font> script for this section looks like this:
     212
     213
     214  <pre><font color="brown">
     215  interior_regions_list = [['aos1.csv', 1500],
     216                           ['aos2.csv', 1500],
     217                           ['sw.csv', 30000]]
     218  </font></pre>
     219
     220  <p>
     221
     222  For further information on ANUGA file formats please see the ANUGA User Manual, section 5.1.
    186223  <p>
    187224</body>
    188225</html>
     226
  • DVD_images/extra_files/GoldCoast/project/project.py

    r7300 r7363  
    2626# Model specific parameters.
    2727# One or all can be changed each time the run_model script is executed
    28 
    29                # difference between MSL and HAT in metres
    30 central_meridian = None # Central meridian for projection (optional)
    31 zone = 56
    32 import sys
    33 if len(sys.argv) > 1:
    34     event_number = int(sys.argv[1])
    35 else:   
    36     event_number = 51469    # the event number or the mux file name
    37 
    38 event_number_list = [51469, 51392, 50863] # To piggy back multiple events
    39 
     28tide = 0                # Mean Sea Level = 0,
     29                        # Highest Astronomical Tide = 1.1 m for Gold Coast
     30zone = 56               # Specify UTM zone of model
     31event_number = 51469    # See details below
     32alpha = 0.1             # smoothing parameter for mesh
     33friction = 0.01         # manning's friction coefficient
     34starttime = 0           # start time for simulation
     35finaltime = 80000       # final time for simulation
     36
     37setup = 'final'         # This can be one of three values
     38                        #    trial - coarsest mesh, fast
     39                        #    basic - coarse mesh
     40                        #    final - fine mesh, slowest
    4041# Event Details:
    4142# Event 1 (51469)
     
    5455# Wave height at 100 m = 0.3 m
    5556
    56 tide = 0                # Mean Sea Level = 0,
    57                         # Highest Astronomical Tide = 1.1 m for Gold Coast                       
    58 alpha = 0.1             # smoothing parameter for mesh
    59 friction = 0.01           # manning's friction coefficient
    60 starttime = 0             # start time for simulation
    61 finaltime = 80000         # final time for simulation
    62 
    63 setup = 'final'         # This can be one of three values
    64                         #    trial - coarsest mesh, fast
    65                         #    basic - coarse mesh
    66                         #    final - fine mesh, slowest
    67 
    6857#-------------------------------------------------------------------------------
    6958# Output filename
     
    10291interior_regions_data = [['area_of_interest.csv', 500],
    10392                         ['intermediate.csv', 25000]]
     93# If there are several priority areas of interest these can be defined
     94# in a single .csv file with headers 'easting, northing, id, value' where
     95# id defines each polygon, and the value is the mesh resolution
     96PriorityArea_filename = None
    10497
    10598# LAND - used to set the initial stage/water to be offcoast only
     
    112105gauges_filename = 'gauges.csv'
    113106
    114 # BUILDINGS EXPOSURE - for identifying inundated houses
    115 # Used in run_building_inundation.py
    116 # Format latitude,longitude etc (geographic)
    117 building_exposure_filename = '' # from NEXIS
    118 
    119 # AREA OF IMAGES - Extent of each image to find out highest runup
    120 # Headerr: easting, northing, id, value
    121 # Used in get_runup.py
    122 images_filename = 'images.csv'
    123 
    124107# BOUNDING POLYGON - used in build_boundary.py and run_model.py respectively
    125108# NOTE: when files are put together the points must be in sequence
     
    127110# Check the run_model.py for boundary_tags
    128111
    129 
    130112# Thinned ordering file from Hazard Map (geographic)
    131113# Format is index,latitude,longitude (with header)
     
    135117# Format easting,northing (no header)
    136118landward_boundary_filename = 'landward_boundary.csv'
    137 
    138 # MUX input filename.
    139 # If a meta-file from EventSelection is used, set 'multi-mux' to True.
    140 # If a single MUX stem filename (*.grd) is used, set 'multi-mux' to False.
    141 ##mux_input_filename = event_number # to be found in event_folder
    142                                     # (ie boundaries/event_number/)
    143 ##multi_mux = False
    144 mux_input_filename = 'event.list'
    145 multi_mux = True
    146119
    147120#-------------------------------------------------------------------------------
     
    250223
    251224
     225
  • DVD_images/extra_files/GoldCoast/project/run_model.py

    r7205 r7363  
    1 """Run a tsunami inundation scenario for Busselton, WA, Australia.
     1"""Run a tsunami inundation scenario for Gold Coast, Queensland, Australia.
    22
    33The scenario is defined by a triangular mesh created from project.polygon, the
     
    6868# Create the STS file
    6969if not os.path.exists(project.event_sts + '.sts'):
    70     bub.build_urs_boundary(project.mux_input_filename, project.event_sts)
     70    print 'sts file has not been generated'
    7171
    7272# Read in boundary from ordered sts file
  • DVD_images/extra_files/GoldCoast/project/setup_model.py

    r7300 r7363  
    1111from os.path import join, exists
    1212from anuga.utilities.polygon import read_polygon, number_mesh_triangles
    13 
     13from anuga.shallow_water.data_manager import csv2polygons
    1414import project
    1515
     
    4848if not exists(project.home):
    4949    print "Sorry, data directory '%s' doesn't exist" % project.home
    50     sanity_error = True
    51    
     50    sanity_error = True 
     51 
    5252if not exists(project.anuga_folder):
    5353    print "Sorry, ANUGA directory '%s' doesn't exist" % project.anuga_folder
     
    7878
    7979#-----
    80 # If this directory don't exist, EventSelection hasn't been run.
     80# If this directory doesn't exist, EventSelection hasn't been run.
    8181#-----
    8282
     
    128128# Create list of land polygons with initial conditions
    129129project.land_initial_conditions = []
    130 for filename, MSL in project.land_initial_conditions_filename:
    131     polygon = read_polygon(join(project.polygons_folder, filename))
    132     project.land_initial_conditions.append([polygon, MSL])
    133 
     130# if it's a list, then it's a list of land condition filenames
     131# else it's a string - a single file, multiple land conditions
     132if isinstance(project.land_initial_conditions_filename, list):
     133    for filename, MSL in project.land_initial_conditions_filename:
     134        polygon = read_polygon(join(project.polygons_folder, filename))
     135        project.land_initial_conditions.append([polygon, MSL])
     136elif isinstance(project.land_initial_conditions_filename, basestring):
     137    polygons, MSL = csv2polygons(join(project.polygons_folder,
     138                                          project.land_initial_conditions_filename))
     139    for i, key in enumerate(polygons):
     140        if i%100==0: print i
     141        poly = polygons[key]
     142        land = float(MSL[key])
     143        project.land_initial_conditions.append([poly, land])
     144else:
     145    msg = ('project.land_initial_conditions_filename must be a list or '
     146           'string, got %s'
     147           % type(project.land_initial_conditions_filename))
     148    raise Exception, msg
     149   
    134150# Create list of interior polygons with scaling factor
    135151project.interior_regions = []
     152
     153if project.PriorityArea_filename is not None:
     154    polygons, maxareas = csv2polygons(project.PriorityAreas)
     155    print 'Creating %d internal polygons' % len(polygons)
     156    #def create_polygon_function(polygons, geo_reference=None):
     157    project.interior_regions = []
     158    for i, key in enumerate(polygons):
     159        if i%100==0: print i
     160        poly = polygons[key]
     161        maxarea = float(maxareas[key])
     162        project.interior_regions.append([poly,
     163                                         maxarea*project.scale_factor])
     164
    136165for filename, maxarea in project.interior_regions_data:
    137166    polygon = read_polygon(join(project.polygons_folder, filename))
Note: See TracChangeset for help on using the changeset viewer.