Australian Government, Geoscience Australia  

Tsunami Inundation Models for the BATEMANS BAY region


Modifying a simulation

Here we talk about how to change a simulation. Why would you need to change a simulation? Well, you might have some better elevation data, you want to run the simulation on a finer mesh in certain areas, or maybe you want to see the result for different events.

First we describe the usage of the script files you might change, then we walk through a few examples of changes you might make.

The project scripts

In the project directory are the scripts that control the simulation. These scripts are:
project.pyDefines the input data used, where to place output, etc.
build_elevation.pyCombines the elevation data specified by project.py into one file; with the extension .PTS
setup_model.pyPrepares the simulation before actually running it
run_model.pyRuns the simulation

project.py

This file is the heart of the simulation. The project script introduces all files that are necessary to run all accompanying scripts. By changing one of the variables in this script the output could be completely different. For further details on changing parameters see Making changes to a simulation.

build_elevation.py

This script combines all input elevation files into a single elevation point file (PTS file). We have provided you with the PTS file used to create the outputs on this DVD. If you would like to change the elevation, see Making changes to a simulation.

setup_model.py

This script is used to transform data into a specific format for run_model.py, if required, and to generate warning messages if you are missing data.

run_model.py

This script runs a tsunami inundation scenario. It relies on the parameters set in project.py as well as the elevation and event input files (PTS and STS files respectively). An STS file has been generated for each event listed in the boundaries directory. For further details on events see Making changes to a simulation.

Making changes to a simulation

There are many parameters that you can change within the project.py script, but the following four parameters are those most commonly changed.

Output Folder Name

The output folder name should be unique between different runs on different data. The list of items below will be used to create the folder in your output directory. Your user name and time+date will be automatically added. For example,

  output_comments = [setup, tide, event_number]
will result in a folder name like

  20090212_091046_run_final_0_27283_rwilson
Where you (rwilson) ran a run script at 9:10.46 in the morning on the 2/12/09, setup = final,
tide = 0, event_number = 27283  - refer below for more information on these parameters 

You can also add strings to this list


  output_comments = [setup, tide, event_number, 'large']
will result in a folder name like

  20090212_091046_run_final_0_27283_large_rwilson

Setup

The setup parameter determines the type of run. This can be one of three values:

  'trial' - coarsest mesh, fast 
  'basic' - coarse mesh
  'final' - fine mesh, slowest
  
Note: 'final' must be used if determining the best estimate of inundation for your area of interest.

Tide

The tide parameter is used to change the mean inital water level of the simulation. When tide is set to 0 the initial water level will be at Mean Sea Level. If you increase the tide value the water level will become deeper. This setting will also increase non tidal lakes and rivers inside the model. To compensate a mask is used on land called initial conditions which brings the internal water bodies back to 0. Within ANUGA tide is modelled as a constant.

Events

The event_number variable contains the event number that initiates the tsunami we are modelling. You can change event_number to any event number in the boundaries directory. An STS file has been generated for all events listed in the boundaries directory.

The event numbers correspond to a quake ID from the Probabilistic Tsunami Hazard Map Assessment of Australia.


  event_number = 51436    # 1 in 10000 yr event from New Hebrides

Elevation

Elevation data can be changed in the project.py script under ELEVATION DATA. Elevation data can be read as either a point file, comma delimited, or as an ASCII grid file (ASC) with an accompanying projection file (PRJ). All elevation input should sit in topographies and must be projected in the correct UTM zone.

A header for a CSV file has the format:


  x,y,elevation

An ASC file header has the format:


  ncols         868
  nrows         856
  xllcorner     418933.86055096
  yllcorner     5151810.6668096
  cellsize      250
  NODATA_value  -9999

The header of a PRJ file has the format:


  Projection    UTM
  Zone          56
  Datum         D_GDA_1994
  Zunits        NO
  Units         METERS
  Spheroid      GRS_1980
  Xshift        500000
  Yshift        10000000
  Parameters

The elevation filenames in project.py must be listed in either point_filenames or ascii_grid_filenames depending on their format. Point files need to have their extension shown however the ascii grid files have the .asc extension assumed:


  point_filenames = ['point1.csv',
                     'point2.csv',
                     'point3.csv']

  ascii_grid_filenames = ['grid1',
                          'grid2',
                          'grid3']

For further information on ANUGA file formats please see the ANUGA User Manual, section 6.1.

Interior regions

The user can specify a number of internal polygons within each of which the resolution of the mesh can be specified. Mesh resolution is the maximum allowable area specified for each region, defining the largest area an indivdual triangular element of the mesh can take (and therefore the minimum mesh resolution). These polygons need to be nested within each other with no overlapping edges.

The interior regions can be changed in the project.py script under INTERIOR REGIONS. Interior regions can be read as either seperate CSV files for each polygon displayed as a listed paired with its resolution and/or one CSV file for all polygons, where its resolution is defined within the csv under 'id'. All file inputs should sit in polygons and must be projected in the correct UTM zone.

The format for a CSV file with ONE polygon has the format:


  easting,northing   Note: NO Header  
The header for a CSV file with MANY polygons has the format:

  easting,northing,id,value

Where id = polygon number and value = maximum allowable area.

The project.py script for this section looks like this:


  interior_regions_list = [['aos1.csv', 1500],
                           ['aos2.csv', 1500],
                           ['sw.csv', 30000]]
  interior_regions_multiple_csv = 'PriorityAreas.csv'

For further information on ANUGA file formats please see the ANUGA User Manual, section 5.1.