Welcome to PyTUFLOW’s documentation!

Welcome to PyTUFLOW’s documentation!#

_images/TUFLOW_light.png _images/TUFLOW_light.png

PyTUFLOW is a library that acts as an API for your TUFLOW model. It allows easy interaction with the model results, contains a number of useful utilities for building TUFLOW models, and contains some useful parsers for files within the TUFLOW eco-system.

Check out the Usage section for further information, including how to install the project.

Contents:

Changelog#

1.0.2#

Release date: 16 Dec 2025

  • Fixed a bug where a "timeseries" filter would return an empty list when using the data_types() or ids() methods on GPKG2D and GPKGRL classes.

  • Added a timezone to the NCGrid reference time.

  • Added a timezone to the NCMesh reference time.

  • Fixed a bug where outputs that had an uneven output times would result in the output time units being interpreted incorrectly e.g. a 300 second timestep would be output as a 300 hr timestep.

  • Fixed a bug when trying to load a TUFLOW cross-section database from a GPKG.

  • Fixed a bug for NCGrid where "3d" filters would cause a Python error.

  • CrossSections output class now handles file not found errors more gracefully, such that the output is still loaded even if a cross-section file is missing.

  • Fixed a bug for CrossSections outputs where the cross sections were being reloaded each time the section() method was called.

  • Fixed a bug where "na" types for CrossSections outputs were not returning any results when using the section() method.

  • Fixed a bug for ESTRY GPKG Time Series outputs where the "pipes" data type was incorrectly outputting a pipe at each channel.

  • Fixed a bug with the BCTablesCheck output class where it would return an empty list if filter_by was set to "timeseries".

  • Fixed a bug with the HydTablesCheck output class where it would return an empty list if filter_by was set to "section".

  • Fixed a bug where if there was a trailing or leading “/” in the filter_by argument in the data_types() ids(), and times() methods, then an empty return was almost guaranteed.

  • Fixed a bug in when asking for the "wetted perimeter" data type in the HydTablesCheck.section() output class would cause a python exception.

  • Added proper format checking for SMS DAT files.

  • Fixed a bug when loading a DAT file (not from the .sup) where the file path attribute fpath was being being set incorrectly.

  • Fixed time-series and section plotting for DAT files which was not working.

  • Added the missing format checker for the CATCHJson class.

  • Added fpath property to CATCHJson class to be consistent with other output classes.

  • Added a timezone to the CATCHJson reference_time.

  • Removed WARNING  Invalid data type: that was triggered incorrectly in CATCHJson if the data type was not in one of the result files but it was present in another.

  • Added timezone information to FVBCTide output class.

  • Fixed a bug where UK Hazard Formula == commands were seen as files and were then flagged as having missing files.

  • Fixed a bug where MI Projection == Coord ... commands were seen as files and were then flagged as having missing files.

  • Fixed a bug with GPKG1D.section() method when connecting two pipes and the "pits" data type was requested for ESTRY GPKG 1D outputs.

  • Fixed generic Python warnings that were being triggered in various places in the code, in particular warning regarding return statements in finally blocks.

1.0.1#

Release date: 10 Oct 2025

  • Fixed a bug that would incorrectly flag 1d_nwk Q channel curve references (the reference to the pit database name) as files and then flag the file as missing.

  • Fixed a bug for 1D results where if the "section/3d" filter was passed into the data_types() or ids() methods, the return value would incorrectly return populated lists. The return is now an empty list since 1D results do not have any 3D results.

1.0.0#

Release date: 6 Oct 2025

First full release of PyTUFLOW.

Indices and tables#