TUFLOW Viewer: Difference between revisions
Content deleted Content added
Chris Huxley (talk | contribs) |
|||
(48 intermediate revisions by 9 users not shown) | |||
Line 2:
<br>
__TOC__
<br>▼
{{Tips Navigation▼
|uplink=[[TUFLOW_QGIS_Plugin#Usage| Back to TUFLOW QGIS Plugin Main Page]]▼
}}▼
<br>▼
<br>▼
=Getting Started=
Line 24 ⟶ 17:
* QGIS 3.14, TUFLOW Viewer tried to mimic the behaviour of previous versions but the reference time could also be altered natively in the mesh layer '''Properties'''. Note on this version, this is the first QGIS release with the '''temporal controller''' and as a consequence some of the functionality matured and changed in subsequent versions. Users may experience strange behaviour when using TUFLOW Viewer with the QGIS 3.14 if using date-time format. It is recommended to upgrade to later versions of QGIS if date-time format is required.
* Post QGIS 3.14 TUFLOW Viewer stores all results internally as absolute time and the user must change the reference time in the native properties of the mesh layer to alter the dates being displayed. '''Zero Date''' now only changes how the relative time is displayed in TUFLOW Viewer and doesn't change the mesh layer reference time.
* Please follow the link below on how to use isodate (date-time) format in TUFLOW Viewer in QGIS 3.16+ (recommended minimum version if using date-time format): <u>[[
</ol
'''Other Known Issues'''<Br>
* QGIS 3.24 uses Matplotlib v3.5.1 which contains the following known bug which may affect users when re-labelling datasets within the TUFLOW Viewer plot window:<Br>
: [[TUFLOW_Viewer_Matplotlib_v3.5.1_Bug | TUFLOW Viewer - Matplotlib v3.5.1 bug]]<br>
* "ValueError: Failed to find font DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0, and fallback to the default font was disabled"
: [[TUFLOW_Viewer_Matplotlib_Font_Error | TUFLOW Viewer - Matplotlib Font Error]]<br>
==Installation or Version Upgrade==
===Installation===
TUFLOW Viewer is a free tool that comes as part of the TUFLOW plugin in QGIS. For instructions on how to install the plugin, please follow these steps: <u>[[TUFLOW_QGIS_Plugin#Installation_of_Plugin |
There are also instructions on installing plugins in the QGIS documentation - if you choose to follow the QGIS documentation, the plugin is called "TUFLOW" in the repository: <u> [https://docs.qgis.org/3.16/en/docs/training_manual/qgis_plugins/fetching_plugins.html Link to QGIS Documentation - Installing and Managing Plugins]</u>.<br>
===Plugin Upgrades===
It's recommended to upgrade the plugin whenever a new version is released. The upgrade process is typically done via the Plugin Manager ('''QGIS Drop Menu: Plugins >> Manage and Install Plugins''').<br>
▲<br>
[[File: TUFLOW_Plugin_Update_01.png]]<br><br>
If you encounter an error while upgrading the plugin please follow these steps: <u>[[ TUFLOW_QGIS_Plugin#Error_While_Upgrading_Plugin |
<br><br>▼
==Development Version==
It's possible to test out the latest development version of the plugin and TUFLOW Viewer by following the instructions here: <u>[[Installing_the_Latest_Development_Version_of_the_TUFLOW_Plugin | Installing the Latest Development Version of the TUFLOW Plugin]]</u>.
=Using TUFLOW Viewer=
==Opening the TUFLOW Viewer==
After installing the QGIS TUFLOW plugin, the TUFLOW Viewer tool can be opened by clicking the following icon in the plugin toolbar:<br>
▲<br>
[[File: TUFLOW_Plugin_Toolbar_TUFLOW_Viewer_01.png]]<br>
==Loading Results==
TUFLOW simulation results can be loaded
<ol>
<li> Select '''File >> Load Results''' from the TUFLOW Viewer drop down menu.<br>
▲<br>
[[File:TUFLOW_Viewer_Load_Results_01a.png]]<br>
<li> Right Click in the '''Open Results''' panel and select '''Load Results'''.<br>
<br>
[[File: TUFLOW_Viewer_Load_Results_02a.png]]<br>
<br>
</ol>
Using either of the above methods, the following result load options are available:
<ol>
<li> <u>'''[[TUFLOW_Viewer_-_Load_Results | Load All Results]]'''</u> --> This is done via a TCF
<li> <u>'''[[TUFLOW_Viewer_-_Load_Results_-_Map_Outputs | Load Results - Map Outputs]]'''</u> --> Select map output mesh results file ('''*.xmdf, *.dat, *.2dm, *.xmdf.sup, *.dat.sup, *.nc''' ''(supports netCDF format from TUFLOW FV output only)'').
<li> <u>'''[[TUFLOW_Viewer_-_Load_Results_-_Time_Series | Load Results - Time Series]]'''</u> --> Select ESTRY / SWMM time series output results ('''*.tpc *.gpkg''').
<li> <u>'''[[TUFLOW_Viewer_-_Load_Results_-_Time_Series_FM | Load Results - Flood Modeller Time Series]]'''</u> --> Load Flood Modeller results. This requires a '''*.gxy''' and result '''*.csv''' file to be exported from Flood Modeller.
<li> <u>'''[[TUFLOW_Viewer_-_Load_Results_-_Particles | Load Results - Particle Tracking Module]]'''</u> --> Select output from particle module ('''*.nc''') which will typically be suffixed with '''_ptm'''.
<li> <u>'''[[TUFLOW_Viewer_-_Load_Results_-_NetCDF_Grid | Load Results - NetCDF Grid]]'''</u> --> Load TUFLOW NC or HRNC map output results.
<li> <u>'''[[TUFLOW_Viewer_-_Import_1D_Hydraulic_Tables | Import 1D Hydraulic Tables]]'''</u> --> Select a '''_1d_ta_tables_check.csv''' check file.
<li> <u>'''[[TUFLOW_Viewer_-_Import_2D_BC_Tables | Import 2D BC Tables]]'''</u> --> Select a '''_2d_bc_tables_check.csv''' check file.
<li> <u>'''[[TUFLOW_Viewer_-_Import_1D_ESTRY_Cross_-_Sections | Import 1D ESTRY Cross-Sections]]'''</u> --> This will automatically happen if an appropriate TUFLOW input is opened in QGIS while TUFLOW Viewer is open (e.g. 1d_xs).
<li> <u>'''[[TUFLOW_Viewer_-_Importing_a_User_Defined_Time_Series_To_Display_On_The_Plot | Importing a User Defined Time Series Dataset To Display In The Plot Window]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Import_FV_Tide_BC_NetCDF | Import FV Tide BC NetCDF]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Loading_Results_While_TUFLOW_is_Running | Loading Results While TUFLOW is Running]]'''</u>
</ol>
If you receive an error similar to that shown below when attempting to load results from a TCF you will need to fix the encoding of your TUFLOW control files:<br>
<pre>
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 626: invalid start byte
</pre>
This error is caused by incompatible encoding of the TUFLOW control files. You can resolve this issue by changing the encoding of all your TUFLOW control files to a single type (typically UTF-8). You can do this using Notepad++. Please see the following link for instructions on how to do this (refer last image): <u>[[TUFLOW_Message_0060 | TUFLOW Message 0060]]</u>.<br>
== TUFLOW-SWMM Results ==
Results from a linked TUFLOW-SWMM model can be loaded via the standard menu options (available from the TUFLOW plugin version 3.10):
* <u>'''[[TUFLOW_Viewer_-_Load_Results_-_Time_Series | Load Results - Time Series]]'''</u> To load the GPKG time series format (_swmm_ts.gpkg) by itself. The GPKG time series format is a new format similar to the .tpc with some additional functionality. More information can be found in the <b><u>[[#GPKG_Time_Series_Format | GPKG Time Series Format]]</u></b> section.
* <u>'''[[TUFLOW_Viewer_-_Load_Results_-_Map_Outputs | Load Results - Map Outputs]]'''</u> To load in 2D map output results
* <u>'''[[TUFLOW_Viewer_-_Load_Results | Load Results]]'''</u> To load all available results from the model. This includes .xmdf, .tpc, and .gpkg results which could all be available for a given model run. Note that .tpc and .gpkg are both time series type results and will load separate GIS _PLOT_ layers.
== GPKG Time Series Format ==
The GPKG time series format is a new format similar to the .tpc with enhanced temporal functionality. Currently the GPKG time series format is only supported as an output from SWMM in TUFLOW-SWMM linked models and only supported in TUFLOW Plugin version 3.10+ and QGIS 3.16+.<Br>
<br>
The GPKG format is different from the TPC format as it supports temporal styling in QGIS. As an example, the line width of the channels can be varied by both time and flow, with wider lines showing higher flow than thinner lines at a particular timestep. The format is fully compatible with the QGIS temporal controller and reacts dynamically as the temporal controller is updated. This results in a dynamic, and intuitive, method of showing the user the flood progression in the 1D system. Another benefit of being compatible with the core QGIS temporal capabilities is that the styling will also be dynamically updated if included in an animation export. TUFLOW Viewer's animation export tool has been updated to enable GPKG results to be exported with 2D results or even by itself.<br>
<br>
The layer's styling can be automatically set using the TUFLOW Plugin via the layer's right-click context menu (under the TUFLOW submenu) or will automatically by styled if the results are loaded via TUFLOW Viewer. Examples of this format in QGIS are linked below:
* <b><u>[[Automatically_Styling_GPKG_Time_Series | Styling layers from the GPKG time series output]]</u></b>
* <b><u>[[TUFLOW_Viewer_-_Load_Results_-_GPKG_Time_Series | Loading results via TUFLOW Viewer]]</u></b>
The GPKG time series format is an open format and the specification is detailed at the below link:
* <b><u>[[GPKG_Time_Series_Format_Specification | GPKG Time Series Format Specification]]</u></b>
== Data Selection, Display and Styling==
===Map Output===
Map
<ol>
<li> Load Map Output results either via:
Line 79 ⟶ 107:
<li> <u>'''[[TUFLOW_Viewer_-_Load_Results_-_Map_Outputs | Load Results - Map Outputs]]'''</u>
</ol>
<li> <u>'''[[TUFLOW_Viewer_-_Reload_Results | Reload Results]]'''</u> --> Reload and update results
<li> <u>'''[[TUFLOW_Viewer_-_Map_Outputs_-_Change_Result_Selection | Change Simulation Result Selection]]'''</u> --> Changing between different simulation results is done by selecting the result name(s) in the 'Open Results' widget.
<li> <u>'''[[TUFLOW_Viewer_-_Map_Outputs_-_Changing_Result_Type | Change Result Type Selection]]'''</u> --> Changing between different result types is done using the 'Result Type' widget.
Line 89 ⟶ 118:
<li> <u>'''[[TUFLOW_Viewer_-_Map_Outputs_-_3D_to_2D_Depth_Averaging_Method | 3D to 2D Depth Averaging]]'''</u> --> For 3D map output results, the 3D to 2D depth averaging method can be changed in the layer properties.
<li> <u>'''[[TUFLOW_Viewer_-_Toggling_Between_Output_Timesteps | Lock/Unlock Output Time Steps from Different Result Datasets]]'''</u> --> Locking Plot Output Timesteps to the Map Output Interval.
<li> <u>'''[[TUFLOW_Viewer_-_Isodate_(Date-Time)_Format | Working With Isodate (Date-Time) Format]]'''</u> --> View results using absolute time format (dd/mm/yyyy hh:mm:ss) instead of relative time format (hh:mm:ss).
<li> <u>'''[[TUFLOW_Viewer_-_Map_Outputs_-_Plotting_Time_Series | Map Output Plot - Plotting Time Series]]'''</u> --> Plotting Map Output results.
<li> <u>'''[[TUFLOW_Viewer_-_Map_Outputs_-_Plotting_Cross-Sections_And_Longitudinal_Profiles | Map Output Plot - Plotting Cross-Sections and Longitudinal Profiles]]'''</u> --> Plotting Map Output results.
Line 121 ⟶ 150:
<li> <u>'''[[TUFLOW_Viewer_-_Extracting_Median_And_Mean_Time_Series | Extracting Median and Mean Time Series - Australian Rainfall and Runoff]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Plotting_1D_Flow_Regime | Plotting 1D Flow Regime]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Import_2D_BC_Tables | Plotting 2D Boundary Condition Tables]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Toggling_Between_Output_Timesteps | Lock/Unlock Output Time Steps from Different Result Datasets]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Isodate_(Date-Time)_Format | Working With Isodate (Date-Time) Format]]'''</u>
Line 153 ⟶ 183:
<li> <u>'''[[TUFLOW_Viewer_-_Setting_The_Plot_Default_Font_Size | Setting the Default Font Size For the Plot]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Toggling_Between_Output_Timesteps | Lock/Unlock Output Time Steps from Different Result Datasets]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Changing_Icon_Size | Changing the Icon Size]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Summary_Of_Options | Settings Options]]'''</u>
</ol>
Line 159 ⟶ 190:
<br>
==Exporting Animations, Data, Plots
TUFLOW Viewer offers the ability to export animations, data interegation points/lines, maps
<ol>
<li> <u>'''[[TUFLOW_Viewer_-_Exporting_An_Animation | Exporting An Animation]]'''</u><br>
: [[File: Animation_cover.gif]]<br>
<li> <u>'''[[TUFLOW_Viewer_-_Exporting_And_Copying_A_Plot | Exporting and Copying
<li> <u>'''[[TUFLOW_Viewer_-_Exporting_The_Drawn_GIS_Plot_Features | Exporting The Drawn GIS Plot Points / Lines]]'''</u>
<li> <u>'''[[TUFLOW_Viewer_-_Batch_Exporting_Maps | Batch Exporting Maps]]'''</u>
Line 187 ⟶ 218:
</ol>
</ol>
<br>
▲{{Tips Navigation
▲|uplink=[[TUFLOW_QGIS_Plugin#Usage| Back to TUFLOW QGIS Plugin Main Page]]
▲}}
<br>
<br>
<br>
{{Tips Navigation
|uplink=[[Main_Page| Back to Wiki Main Page]]
}}
|