Usage#

Installation#

To use pytuflow, first install it using pip:

$ pip install pytuflow

Dependencies#

Most dependencies are automatically installed when you install pytuflow. There are a few additional dependencies that are not automatically installed, but are very useful as they will extend the functionality of pytuflow. These are:

  • netCDF4: This is required for reading any netCDF files, for example, the NC time-series output format, or the NC map output format. It also allows for reading of the XMDF header information.

  • GDAL: This is required for reading GIS files, which extends the GisInput class and allows the use of GIS files as locations to extract data from map outputs.

  • shapely: Needed for extracting section data from map output formats.

  • QGIS: Currently QGIS is required for extracting data from XMDF, NCMesh, and CATCHJson output formats. We hope to remove this dependency in the future, but for now, it is required for these particular output formats. It isn’t required for using pytuflow in general.

One of the trickiest libraries to install is GDAL. For Windows, you can download pre-compiled binaries from here: cgohlke/geospatial-wheels.

For QGIS, there are some broad instructions on how to set up a QGIS Python environment in the output examples.

Quickstart#

The best place to get started is the Load and Run a TUFLOW Model example, or to browse through the other Examples.