12.1 Skip to content

12. SMS DAT

12.1 Loading

DAT files can be loaded by dragging and dropping the .dat file into the QGIS Map Canvas from a file explorer or from the Browser Panel. It is also possible to drag the .ALL.sup file into the QGIS Map Canvas.

The temporal and maximum results for each data type can then be toggled on and off using the "scalar" and "vector" buttons in the Datasets tab within the Styling Panel. The Styling Panel can be opened/closed by pressing F7 or Ctrl+3 on the keyboard.

DAT files can be loaded separately and the results will automatically be loaded onto a common mesh if they share the same .2dm (determined based on the file name).

12.2 Coordinate Reference System

The DAT format does not support storing coordinate reference system (CRS) information. If there is a projection.prj file in the same directory as the .dat file, then TUFLOW Viewer will attempt to read the CRS information from this file. If there is no projection.prj file, then TUFLOW Viewer will default to using the CRS of the QGIS Project.

The CRS can be changed by right-clicking the layer in the Layers Panel and navigating to Layer CRS ► Set Layer CRS....

12.3 Reference Time

The reference time determines the isodate values shown for the "Animation Range" in the Temporal Controller window. If the DAT result does not have an inherent reference time, the following hierarchy is used to set the reference time:

  • If a result with an inherent reference time is added to the workspace, or exists in the workspace already, then the reference time of the DAT result will be updated to match the other reference time.
  • Given no other source, TUFLOW Viewer will default to '1990-01-01 00:00:00'.

The reference time can be changed in the Temporal tab in the Layer Properties.

The "Set to Full Range" button on the Temporal Controller window will update the animation range.

12.4 Styling

DAT results files can be styled in a very similar way as raster layers in QGIS. This can be done by pressing F7 or Ctrl+3 on the keyboard to open the Styling Panel for the active layer. The opacity and colour shading of the scalar outputs can be modified from the Contours tab of the Styling Panel.

The velocity vectors can be styled as arrows, streamlines, traces, or wind barbs. The most common way (and the default style) is as vector arrows. The size of the arrow can be scaled several different ways and there are also options to change features such as the line width, colour, arrow head size etc. All of these vector styling options can be found within the "Vectors tab" of the Styling Panel.

Detailed guidance on the contour and vector styling options for mesh data in the Styling Panel can be found in the QGIS User Manual.

12.4.1 Default Styling

The styling on the active result type can be set as the default for that result type. This can be done by right-clicking the layer in the Layers Panel and navigating to the TUFLOW Viewer menu. For example, if the default style for "Bed Elevation" is saved, then each time a DAT file is loaded, the "Bed Elevation" result type will be styled using the saved default style.

For DAT files, this may not work as expected for result types that are not the "Bed Elevation", as the name of the result is typically included in the name. For example, water level results are typically named h [result-name].

The options in the menu are:

  • Save Colour Ramp as Default: This will save the colour ramp for the active result type, but not the exact colour to value mapping. This means that the colour ramp will be applied to the new result type, but the stop values will not be changed.
  • Save Colour Map as Default: This will save the exact colour to value mapping for the active result type. This means that the colour ramp and the stops will be applied to the new result type.
  • Save Vector Settings as Default: This will save the vector settings for the active result type. This includes the symbology, colouring method, arrow length, and other arrow properties etc.
  • Load Default Style: Options to load the default scalar or vector styles are also available. This will apply the saved default style to the active result type. The load default style option may not update the Styling Panel to reflect the loaded default style.

12.5 Plotting

The DAT result format is supported in the following plot types:

  • Time Series Plot
  • Section Plot

The DAT result supports plotting from drawn items and from selected items. See the Plot Window documentation for more information on plotting.

Example: Plotting water level time series data from a DAT file by using the draw tool
Example: Plotting water level section/profile data from a DAT by using the selection tool on an existing vector layer