7. NetCDF Mesh
7.1 Loading¶
NetCDF mesh files can be loaded by dragging and dropping the .nc file into the QGIS Map Canvas from a file explorer or from the Browser Panel. The 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.
7.2 Coordinate Reference System¶
The NetCDF mesh format does not support storing coordinate reference system (CRS) information. If there is a projection.prj file in the same directory as the .nc 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....
7.3 Reference Time¶
The reference time determines the isodate values shown for the "Animation Range" in the Temporal Controller window. If the NetCDF mesh 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 NetCDF mesh 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.
7.4 Styling¶
NetCDF mesh 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.
7.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 "Salinity" is saved, then each time a NetCDF mesh file is loaded, the "salinity" result type (if it exists) will be styled using the saved default style.
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.
7.5 Depth Averaging¶
Different depth averaging methods can be used to represent the surface in the QGIS Map Canvas for 3D stacked mesh results. The method can be changed in the Layer Styling Panel. For more information on the different depth averaging methods, see the following TUFLOW FV Wiki page.
The TUFLOW Viewer Plot Window also supports plotting different depth averaging methods. By default, a 3D result will use the current 3D depth averaging method used in the QGIS Map Canvas. However, specific depth averaging methods can be selected in the "Data Types" menu in the plot window for both the
Time Series Plot and
Section Plot.
The depth averaging menu will only be available for 3D stacked mesh results.
7.6 Plotting¶
The NetCDF mesh result format is supported in the following plot types:
Time Series Plot
Section Plot
Profile Plot
Curtain Plot
The NetCDF mesh result supports plotting from drawn items and from
selected items. See the Plot Window documentation for more information on plotting.