top of page

Python API | Bridge Flood Modeller and python at no extra cost

Python API | Unlock new ways of working

Available at no cost, Flood Modeller's Python API provides a bridge between Flood Modeller and the python programming language, by allowing you to integrate your own custom tools and workflows. This added flexibility allows you to significantly boost your productivity and deliver innovative solutions to your clients by automating different tasks.

Key facts

Available at no cost

Supports model build functionality for 1D and 2D models

Increases flexibility by allowing you to integrate your own custom tools

Develop custom workflows and streamline project delivery

Boost your productivity with custom automations

Develop innovative solutions for your clients

Undertake faster result analysis

Flood Modeller's open data file format and data structure has always allowed you to incorporate bespoke tools, meaning you were free to develop scripts to create or edit selected Flood Modeller files and even combine these with command lines to run single or large batches of simulations.

However, the Flood Modeller Python API unlocks even more benefits, including the ability to undertake global edits, analyse results even faster and automate the simulation process. Within just a few minutes and several lines of Python code you can reduce tasks that would have previously taken hours or days to seconds.

View the full Flood Modeller Python API documentation


Here are just a few examples of what you might want to do with Flood Modeller’s API…

Global edits

Flood Modeller already allows you to undertake various global edits, however it’s not currently possible to update the IED and DAT files using the existing interface tools. Using the new API, you can apply updates to climate change peak flows in ReFH boundary units, make edits to changing river section bed profiles, or even edit custom or logical rules detailing which units to update, allowing Manning's values based on resultant velocities from ZZN results.

Rapid results analysis


Flood Modeller provides a range of tools, such as the Results Extractor and Flood Viewer, which allow you to analyse results quickly and efficiently. Using the new API, results can be extracted and analysed directly in Python which is even faster than extracting to .csv and using Excel. It enables custom analysis scripts to be applied multiple times across different models and/or projects, allowing you to report custom result metrics in a standardised format. Results analysis in Python also benefit from having access to other files, such as incorporating the channel profile into results analysis.

Python API GitHub site


In addition to viewing and contributing to the source code, the Flood Modeller API GitHub site is a great place to raise issues or ask questions in the ‘Discussions’ section. In the spirit of open source, we also encourage you to share any interesting scripts or tools you have developed using the Python API. To do this, please contribute to the Show and Tell section. This is also a great place to explore different ways that people have used the API.

Automated simulation process


Flood Modeller includes various tools such as the Batch Runner which can automate the running of simulations directly within the software. The API provides added flexibility to run simulations directly from a script, allowing the results to be accessed directly. This allows users to 'close the loop' and edit simulation files, run simulations, access results, make any edits and re-run their simulations - all in an automated way.

bottom of page