top of page

Flood Modeller API | Quick and simple script for climate change uplift scenarios

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.

Although all-encompassing tools have their merits, their development process can be lengthy and so it is important to not underestimate the value of simple standalone scripts. These can typically be created and implemented quickly. Once developed they can be deployed robustly time and time again. An example such script is one developed to support the creation of event files (IED) for climate change uplift scenarios.

The problem

For a particular model, it was necessary to test a range of return periods and climate change epochs. Event files (IEDs) had been manually configured for six present day return periods. Additional event files for all return periods at three future climate change epochs still needed to be configured – a total of 18 additional event files.

Considering each event file included around 30 boundary nodes, comprising a mix of ReFEH and QTBDY units, configuring these additional simulations manually would be laboursome and prone to error. Furthermore, due to the desired number of configurations (and number of contained boundary nodes) robust quality assurance of the resulting IEDS would be challenging. Whilst existing Flood Modeller tools support with scaling inflow boundaries, an API solution was developed and implemented for efficiency.

The method

A simple script was developed in Python using the Flood Modeller API to programmatically take each IED (for each return period) and apply the necessary scalings to the associated ReFEH and QTBDY nodes. The code is shown below.

The code can also be found on the Flood Modeller API GitHub page.

Python code for climate change uplift

Benefits of using the API

Whilst the necessary event files could have been configured manually, in this case it was more efficient to develop a simple script. Furthermore, once developed the script is a tool that can be used many times over without significant time/cost, allowing for efficient re-configurations in the event of project change and deployment on other projects.

In summary the benefits of using the API in this instance are:

  • Increased efficiency

  • Improved auditability

  • Repeatability

  • Increased robustness

Want to know more about the API?

Read more about the Flood Modeller API or join our API experts for a live webinar where they will provide a comprehensive overview of Flood Modeller's Python API, and demonstrate how it can help you streamline processes and drive innovation for your business.


bottom of page