Difference between revisions of "TUFLOW SWMM Troubleshooting"
Chris Huxley (talk | contribs) |
Chris Huxley (talk | contribs) |
||
Line 72: | Line 72: | ||
To fix the reference: | To fix the reference: | ||
<ol> | <ol> | ||
− | <li> | + | <li>In this example, the layer that cannot by found is '''2d_bc_M03_culverts_001_P.shp'''. Go to the folder where the file should be (the '''TUFLOW\model\gis''' folder). |
<li>The layer has a spelling mistake 'culvets'. | <li>The layer has a spelling mistake 'culvets'. | ||
<li>In QGIS use the 'Increment Selected Layer' tool to save the file with the correct name.<br> | <li>In QGIS use the 'Increment Selected Layer' tool to save the file with the correct name.<br> |
Revision as of 11:01, 18 January 2024
Introduction
This troubleshooting page contains useful information outlining some common modeling mistakes, including how to troubleshoot them.
Common Modeling Mistakes
Unsaved Control Files
When changes are made in the control files and the files are not saved, errors occur.
- Check all simulation control files and batch files are saved (). A red icon indicates that there are unsaved changes in the file:
- Use the 'Save All' tool to save all unsaved control files:
Unsaved GIS Layers
When changes are made in GIS layers and the layers are not saved, errors occur.
- Check all GIS input layers are saved. If the 'Save Layer Edits' icon is available (), there are unsaved edits in the layer.
- A pencil icon on the layer () indicates that the layer is still editable and may contain unsaved edits. It is recommended to always turn off editing for all input layers.
Unsaved SWMM INP file
After edits are complete and saved to the SWMM GeoPackage database, a copy of the information needs to be exported to an INP format for reading into TUFLOW. Two mistakes can occurin relation to INP files:
- No INP file has been exported. If no INP file exists, though one is referenced in the SWMM Control file, a 'does not exist' pop up message will display.
If this error occurs, check the INP fle has been exported and also check the spelling of the file reference in the SWMM Control file (TSCF) does not contain any spelling mistakes. - The save date of the INP must be later than the associated Geopackage file. If this is not the case, TUFLOW will exit with an error message written to the TLF. Fix the error by exporting the INP file, ensuring it is newer than the Geopackage file.
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:
Spelling Mistakes in Control Files
Spelling mistakes in control files are a common mistake, resulting in a 'does not exist' pop up message:
To fix the reference:
- In this example, the file that cannot by found is M01_01.tgc. Go to the folder where the file should be (TUFLOW\model folder).
- The file referenced should be M01_001.tgc.
- Update the reference in the TCF and confirm the file can now be found by right clicking on the file and selecting open.
Spelling Mistakes in Input Layers
Spelling mistakes in input layers are also a common mistake, resulting in a 'does not exist' pop up message:
To fix the reference:
- In this example, the layer that cannot by found is 2d_bc_M03_culverts_001_P.shp. Go to the folder where the file should be (the TUFLOW\model\gis folder).
- The layer has a spelling mistake 'culvets'.
- 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.
TCF does not exist
Typos or spaces in the TCF name result in a 'does not exist' message in the DOS window:
- Check the name of the TCF is referenced correctly in the batch file.
- Right click on the TCF in the batch file, select 'Open File' to make sure it can be opened.
- Example of incorrect TCF name missing an underscore:
- Example of using space in the TCF name causing TUFLOW to look for a TCF name ending with the first space:
Ambiguous Command
TUFLOW control files are command driven text files. The commands must be in the format and location TUFLOW is expecting. The 2018 TUFLOW Manual lists all the available commands and specifies which TUFLOW control file each command belongs to.
- Example of a typo in the 'BC Control File ==' command:
- Example of 'Map Output Data Types ==' command entered into TGC instead of TCF:
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:
- Check the TUFLOW executable can be found with the specified filepath (absolute or relative).
- 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.
- 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.
- If using environment variable 'set exe', confirm there are no spaces surrounding the equals sign (e.g. set exe="..\..\..\exe\2023-03-AA\TUFLOW_iSP_w64.exe").
- 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:
_ TUFLOW Simulations (*.log)
The log file contains brief overview of the simulation:
- Navigate to the TUFLOW\runs folder and open the _ TUFLOW Simulations.log in a text editor.
- Confirm if the simulation has 'Started' and 'Finished' line.
- If there is no log file, see the Simulation DOS Window Flashes and Disappears advice above.
TUFLOW Log File (*.tlf)
The .tlf file contains information on the model run status and any error messages:
- Navigate to the TUFLOW\runs\log folder and open the .tlf file in a text editor.
- Scroll to the bottom to confirm the model run finished successfully by observing "Simulation FINISHED".
- If not, search from the bottom up for any error, warning or check messages.
- Review the error number, open the link provided in a web browser and read through the description and suggestions:
- Open the .qgs workspace in QGIS from the TUFLOW\runs\log folder.
- Click 'Apply TUFLOW Styles to All Layers'.
- Zoom in to the location of any error messages, turn on labelling to view the error.
- In this example the 2d_bc SX point isn't snapped to the 1d_nwk culvert.
- If no error messages appear in the .tlf and the last line shows 'Sending initialisation data to HPC...' see HPC TUFLOW Log File below.
SWMM Report File (*rpt)
If the error relates to SWMM, the TLF will state:
"NoXY: ERROR during Preparing and starting SWMM simulation
For SWMM Model Errors see: <<path to rpt file>>
Open the SWMM RPT file to review the SWMM initialization error message. The file is saved in the Results folder, not the log folder.
HPC TUFLOW Log File (*.hpc.tlf)
The .hpc.tlf file contains error messages not recorded in the .tlf file:
- Navigate to the TUFLOW\runs\log folder and open the .hpc.tlf file in a text editor. If the last lines shows:
- The model is set up to run on GPU and there is no GPU available, or
- 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 |
---|
Back to TUFLOW SWMM Tutorial Introduction Main Page |