Australian Government, Geoscience Australia  

Tsunami Modelling Methodology Validation: GERALDTON


Modifying a simulation

Here we talk about how to change the simulation. Reasons for modifying the simulation include the availability of better elevation data, or a desire to run the simulation on a finer mesh in certain areas.

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. Please note that within ANUGA the tide is modelled as a constant change in sea level and does not vary with time.

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 individual 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.

Obtaining time series of the offshore tsunami wave for other locations

Mux files containing time series of the tsunami wave at points along the 100 m depth contour around Western Australia were obtained from the URSGA model. These time series form the seaward boundary condition for the ANUGA inundation model. To run an ANUGA simulation for a different area, tsunami time series for points offshore the location of interest must be extracted and reformatted into netCDF (.sts) format from the mux files. This is handled by the build_urs_boundary.py script, which is called from within run_model.py. The points for which the time series are extracted are defined within the file urs_order.csv. This file must be modified as follows to run a model for a different area.

The file USRGA_gauges_all_WA.csv contains a list of all the points for which timeseries exist within the mux files. This file can be loaded into a GIS environment and the points within the model selected. Note that you should only choose approximately every fifth point, keeping the points in as close to a straight line as possible. Choosing points too close to each other can cause problems with fitting the mesh to the model domain. These points should be written into a .csv file in the following format (including header):


  index, longitude, latitude

If the name of this .csv file is changed from urs_order, then this must be updated in project.py


Creative Commons License
© Commonwealth of Australia (Geoscience Australia, Department of Transport Western Australia and Landgate) 2010. This material is licensed under a Creative Commons Attribution-Noncommercial 3.0 Australia License.