7. Output and Visualisation

7.1. Output files

7.1.1 Introduction

SPModel output flags in the xml input file determine the parameters that need to be dumped at regular intervals. The user has to specify the interval between successive dumps. The output formats available at the moment are text and binary. Please refer to section 3 (input files).

7.1.2 Important parameters

The SPModel routine for dumping data has been abstracted out into a plugin and this allows the user to modify the way data is being output and also add or remove parameters that the user wants dumped.>

The ouput plugin must therefore be loaded at runtime and has to be listed in the plugins-list in the input xml file. Once loaded, the output plugin will read the flags in the file-output section in the input xml file to determine which of parameters need to be dumped. Please refer to section 3 (input files) for further details.

The user also has to set the outputEvery parameter in the input xml file which is the interval between successive dumps.

7.1.3. Output file formats

Topography File

The topography file has 4 columns: x, y, z (= h) and boundary condition.

Erosion, Sedimentation, Isostacy and Uplift File

The erosion, sedimentation, isostacy and uplift files have a single column which lists the erosion and sedimentation accumulated up to the current time step. The column in each file is sorted by node ID, corresponding to the order in the Topography file.

daughterNodes File

The daughterNodes file has a single column and lists the receiver node for each node. A -1 flag denotes that the parent node is a boundary node. Please note that each node is only allowed to have one receiver node, which is its steepest neighbour.

7.2. Runtime SDL interface

7.2.1 Introduction

SPModel has an inbuilt visualisation plugin, SPModelFlowHierarchyViewer, which is conditionally compiled if the system it is being complied on has the necessary SDL libraries. SDL stands for “Simple DirectMedia Layer”, which is a cross-platform graphics library. The main aim of this visualisation plugin has been to help debug and visualise the landscape at runtime. However its capabilities are quite limited in terms of the size of the data set.

Important parameters

The user has to list the aforementioned plugin name in the plugins list of the xml input file for it to be loaded at runtime. The user also has to set the outputEvery parameter in the input xml file which is the interval between successive visualizations.

Key Bindings

The visualisation kicks in after outputEvery number of time steps and the user gets a chance to interactively view the terrain. To proceed the simulation the user has to press to give the control back to the solver loop. Once again after outputEvery number of time steps the visualisation plugin kicks in and the same process repeats so forth.


Rotation: Press LEFT Mouse button + Mouse Motion

Zoom: Press RIGHT Mouse Button + Vertical Mouse Motion

Erosion Profile: e

Sedimentation Profile: s

Flexural Isostacy Profile: f

Fault Model Profile:

Positive Vertial Exaggeration: ]

Negetive Vertial Exaggeration: [

Toggle River Network:

Toggle Catchments: c

Toggle Mesh Display Mode: m (surface/triangles/points)

7.3. Postprocessing with spmIDL

spmIDL is a potsprocessing and visualisation package for SPMODEL written in IDL. At present, spmIDL requires a licensed version of IDL to run. Future versions will allow execution via a freely available runtime version of IDL.

Using SpmIDL

SpmIDL comprises three files (download by clicking on the links):

With these three files placed on your IDL directory path, spmIDL can be started by typing "spm" at the IDL prompt:


Alternatively, the underlying routines can be directly accessed through the command line via :

IDL> model1= obj_new('spm')

where "model1" is an arbitrary name given to the mdoel object.

The following points should be noted :

An spmIDL object starts by parsing the relevant "*.xml" file and loading the last available output file from the SPMODEL run (in ascii-mode) or the full binary file (in binary-mode). In a typical spmIDL session several widows may be open at once as illustrated below.

An outline of the functionality of the spmIDL is provided below.


The main window comprises three panes: the TAB PANE (GENERAL, PROPS, SAVE), the BUTTON PANE and the GRAPHICS PANE. By default the last available output file in the output directory is loaded asnd displayed.


The Parameter window is opened automatically to provide editable access (including the ability to switch on/off) all parameters associated with the IDL object graphics rendering engine (ie., the Surface, Image, Network, Contour and Lights tab)


"River profiling" is activated by "right clicking" the mouse on the MAIN : GRAPHICS PANE. A River profile is generated by tracing the current flow route from the current mouse point to the nearest pit/water body/boundary. The flow route is highlighted by a red line in the MAIN : GRAPHICS PANE, while a RIVER PROFILING WINDOW is opened up to showing the longitudinal elevation profile of the flow route. This utility requires that the daughter nodes list is available as an output file.


Pressing the "Xobj" button in the MAIN : BUTTON PANE instatiates a interactive 3-D (or IDL xobjview) object and displays it in the 3-d VIEW WINDOW. MENU options allow this view to be saved in a range of standard image formats.


*IDL - interactive data language from Research Systems www.rsinc.com. IDL is a commercial product, however future releases will use a freely available IDL virtual machine to allow runing the GUI application spmIDL.