Welcome to PyTUFLOW’s documentation!#
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.
Changelog#
1.0.2#
Release date: 16 Dec 2025
Fixed a bug where a
"timeseries"filter would return an empty list when using thedata_types()orids()methods onGPKG2DandGPKGRLclasses.Added a timezone to the
NCGridreference time.Added a timezone to the
NCMeshreference 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
NCGridwhere"3d"filters would cause a Python error.CrossSectionsoutput 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
CrossSectionsoutputs where the cross sections were being reloaded each time thesection()method was called.Fixed a bug where
"na"types forCrossSectionsoutputs were not returning any results when using thesection()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
BCTablesCheckoutput class where it would return an empty list iffilter_bywas set to"timeseries".Fixed a bug with the
HydTablesCheckoutput class where it would return an empty list iffilter_bywas set to"section".Fixed a bug where if there was a trailing or leading “/” in the
filter_byargument in thedata_types()ids(), andtimes()methods, then an empty return was almost guaranteed.Fixed a bug in when asking for the
"wetted perimeter"data type in theHydTablesCheck.section()output class would cause a python exception.Added proper format checking for SMS
DATfiles.Fixed a bug when loading a
DATfile (not from the.sup) where the file path attributefpathwas being being set incorrectly.Fixed time-series and section plotting for
DATfiles which was not working.Added the missing format checker for the
CATCHJsonclass.Added
fpathproperty toCATCHJsonclass to be consistent with other output classes.Added a timezone to the
CATCHJsonreference_time.Removed
WARNING Invalid data type:that was triggered incorrectly inCATCHJsonif the data type was not in one of the result files but it was present in another.Added timezone information to
FVBCTideoutput 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
returnstatements infinallyblocks.
1.0.1#
Release date: 10 Oct 2025
Fixed a bug that would incorrectly flag
1d_nwkQchannel 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 thedata_types()orids()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.