Juliacon 2024

Hydrological modelling in Julia with Wflow.jl and Ribasim.jl
07-12, 14:10–14:20 (Europe/Amsterdam), While Loop (4.2)

We introduce two hydrological numerical models in Julia, developed at Deltares. Wflow is a distributed hydrological modelling platform, including different vertical and lateral concepts. Ribasim is a water resources model, solving the water balance equation for regional surface waters, allowing users to solve water allocation questions. We explain why we (re)wrote Wflow and Ribasim, which were originally coded in respectively Python and Fortran and discuss why we keep most processing in Python.


At Deltares, an applied research institute in the Netherlands, we (re)developed two open-source hydrological numerical models. Wflow is Deltares’ solution for modelling hydrological processes, allowing users to account for precipitation, interception, snow accumulation and melt, evapotranspiration, soil water, surface water and groundwater recharge in a fully distributed environment. Ribasim is a water resources model. It allows users to model basins under current and changing conditions to evaluate and design the water system.

Julia solved the two-language problem for us. Wflow was originally written in Python, linked to an external C++ library (PCRaster). Rewriting in Julia yielded more freedom and performance. Ribasim was originally written in Fortran, and the move to Julia resulted in clearer, faster and less code, especially because we use the existing solvers from DifferentialEquations.jl and JuMP.jl.

However, while Julia solved the two-language problem for numerical simulation software for us, bridging hydrologists and software-engineers, we find that most end-users/modellers stick to Python for scripting. We therefore decided to write most of the pre- and post-processing code in Python for now. We discuss what’s still needed in the Julia ecosystem to also take this hurdle.

See also:

Martijn Visser is a hydrologist at Deltares, where he focuses on integrated water resources management, as well as building open source software to support it. As an early adopter of the Julia programming language he’s been active in the open source community, helping to set up and maintain JuliaGeo and its packages, which aim to make it easier to work with geospatial data in Julia.

I'm a researcher at Deltares and an external PhD candidate in the 3dgeoinfo research group at the Delft University of Technology. I have earned a Master of Science degree in Geomatics with honors.

My research concerns elevation modelling, especially in lowlands prone to coastal flooding. I aim to combine my interests in remote sensing and software engineering for societal impact. Currently, I'm working on applying data from ICESat-2—a lidar satellite—on global elevation models.

This speaker also appears in: