Difference between revisions of "Tutorial Troubleshooting QGIS"

From Tuflow
Jump to navigation Jump to search
Line 74: Line 74:
  
 
===TCF does not exist===
 
===TCF does not exist===
Typos in the batch file result in a 'does not exist' message in the DOS window, in this example underscores were missing from the TCF reference in the batch file:<br>
+
Typos in the batch file result in a 'does not exist' message in the DOS window, in this example underscores were missing from the TCF reference in the batch file:
 +
<ol>
 +
<li>Check the name of the TCF is referenced correctly in the batch file.
 +
<li>Right click on the TCF in the batch file and make sure it can be opened.<br>
 
<br>
 
<br>
 
[[File:Troubleshooting CommonErrors 17.png]]<br>
 
[[File:Troubleshooting CommonErrors 17.png]]<br>
 
<br>
 
<br>
 +
</ol>
  
 
=Troubleshooting Steps=
 
=Troubleshooting Steps=

Revision as of 19:14, 13 May 2022

Introduction

This troubleshooting page contains common errors and steps to follow when investigating models.

Common Errors

Unsaved Control Files

When changes are made in the control files and the files are not saved, errors occur.

  1. Check all simulation control files and batch files are saved (Notepad Saved Icon.png). A red icon indicates that there are unsaved changes in the file:

    Troubleshooting CommonErrors 01.png

  2. Use the 'Save All' tool to save all unsaved control files:

    Animation Troubleshooting CommonErrors 12.gif

Unsaved GIS Layers

When changes are made in GIS layers and the layers are not saved, errors occur.

  1. Check all GIS input layers are saved. If the 'Save Layer Edits' icon is available (QGIS UnsavedEdits.png), there are unsaved edits in the layer.
  2. A pencil icon on the layer (QGIS ToggleEditing.png) indicates that the layer is still editable and may contain unsaved edits. It is recommended to always turn off editing for all input layers.

    Animation Troubleshooting CommonErrors 02a.gif

TUFLOW Syntax Rules

Control files use a double equal sign (==). When a single equal sign is used, the simulation stops with and error at the end of the .tlf file:

    Troubleshooting CommonErrors 16.png

    Troubleshooting CommonErrors 15.png


Typos in Control Files

Typos in control files are common, with the majority resulting in a 'does not exist' pop up message:

    Troubleshooting CommonErrors 03.png


To fix the reference:

  1. The file that cannot by found is M02_01.tgc. Go to the folder where the file should be (in this example the TUFLOW\model folder).
  2. The file referenced should be M02_001.tgc.
  3. Update the reference in the TCF and confirm the file can now be found by right clicking on the file and selecting open.

    Animation Troubleshooting CommonErrors 04.gif

Typos in Input Layers

Typos in input layers are common, resulting in a 'does not exist' pop up message:

    Troubleshooting CommonErrors 13.png


To fix the reference:

  1. The layer that cannot by found is 1d_nwk_M03_culverts_001_L.shp. Go to the folder where the file should be (in this example the TUFLOW\model\gis folder).
  2. The layer has a spelling mistake 'culvrts'.
  3. In QGIS use the 'Increment Selected Layer' tool to save the file with the correct name.
    Note: The tool automatically increments a number if it is at the end of the file name.

    Animation Troubleshooting CommonErrors 14.gif


TCF does not exist

Typos in the batch file result in a 'does not exist' message in the DOS window, in this example underscores were missing from the TCF reference in the batch file:

  1. Check the name of the TCF is referenced correctly in the batch file.
  2. Right click on the TCF in the batch file and make sure it can be opened.

    Troubleshooting CommonErrors 17.png

Troubleshooting Steps

Simulation DOS Window Flashes and Disappears

When batch file is double clicked and the simulation DOW window flashes and disappears the problem might be in the filepath of the TUFLOW executable or incorrect syntax:

  1. Check the TUFLOW executable can be found with the specified filepath (absolute or relative).
  2. Double click the executable, this performs a licence check and DOS window appears. If it doesn't, move the executable to a location where it is permitted to run. Some locations on C drive might be restricted for some users preventing to execute the simulation.
  3. TUFLOW doesn't run from a batch file if the filepaths are specified as UNC paths. The folder with both, the executable and the model, must be opened with a mapped drive. Type "net use <drive>: \\server_name\share_name" in the command line to map the drives.
  4. If using environment variable 'set exe', confirm there are no spaces surrounding the equals sign (e.g. set exe="..\..\..\..\exe\2020-10-AD\TUFLOW_iSP_w64.exe").
  5. Write 'pause' at the end of the script, rerun the batch file and the DOS window should remain open providing more information. In the below example, the file path to the TUFLOW exe is incorrect:

    Animation Troubleshooting CommonErrors 05a.gif

_ TUFLOW Simulations (*.log)

The log file contains brief overview of the simulation:

  1. Navigate to the TUFLOW\runs folder and open the _ TUFLOW Simulations.log in a text editor.
  2. Confirm if the simulation has 'Started' and 'Finished' line.
  3. If there is no log file, see here.

TUFLOW Log File (*.tlf)

The .tlf file contains information on the model run status and any error messages:

  1. Navigate to the TUFLOW\runs\log folder and open the .tlf file in a text editor.
  2. Scroll to the bottom to confirm the model run finished successfully by observing "Simulation FINISHED".
  3. If not, search from the bottom up for any error, warning or check messages.
  4. Review the error number, open the link provided in a web browser and read through the description and suggestions:

    Animation Troubleshooting CommonErrors 07a.gif

  5. Open the .qgs workspace in QGIS from the TUFLOW\runs\log folder.
  6. Click 'Apply TUFLOW Styles to All Layers'.
  7. Zoom in to the location of any error messages, turn on labelling to view the error.
  8. In this example the 2d_bc SX point isn't snapped to the 1d_nwk culvert.

    Animation Troubleshooting CommonErrors 08a.gif

  9. If no error messages appear in the .tlf and the last line shows 'Sending initialisation data to HPC...' see HPC TUFLOW Log File below.

HPC TUFLOW Log File (*.hpc.tlf)

The .hpc.tlf file contains error messages not recorded in the .tlf file:

  1. Navigate to the TUFLOW\runs\log folder and open the .hpc.tlf file in a text editor. If the last lines shows:

    Troubleshooting CommonErrors 11.png

  2. The model is set up to run on GPU and there is no GPU available, or
  3. The GPU needs a driver update, for more information see Update GPU Driver.


Conclusion

If the above tips do not assist in fixing the error, email support@tuflow.com.


Up
Go-up.png Back to Tutorial Introduction Main Page