IAHS2022-48
https://doi.org/10.5194/iahs2022-48
IAHS-AISH Scientific Assembly 2022
© Author(s) 2022. This work is distributed under
the Creative Commons Attribution 4.0 License.

SMASH - Spatially distributed Modelling and ASsimilation for Hydrology: Python wrapping towards enhanced research-to-operations transfer

Maxime Jay-Allemand1, François Colleoni2, Pierre-André Garambois2, and Julie Demargne1
Maxime Jay-Allemand et al.
  • 1Hydris Hydrologie, Parc Scientifique Agropolis II, 2196 Boulevard de la Lironde, 34980 Montferrier Sur Lez (maxime.jay.allemand@hydris-hydrologie.fr)
  • 2INRAE, Aix-Marseille Univ., RECOVER, 3275 Rte Cézanne, 13100 Aix-en-Provence (pierre-andre.garambois@inrae.fr)

The prediction of extreme hydrological events at high resolution is a tough scientific challenge linked to major socio-economic issues. Accurate numerical models are crucially needed to perform reliable and meaningful operational predictions. In this context, modern and efficient modeling tools are required to integrate scientific progress and numerical advances, take advantage of the wealth of information provided by new generations of satellite and sensors in complement of in situ data, and meet the needs of diverse end users.
This contribution presents the tailoring of a computational hydrological modeling and data assimilation code, SMASH (Spatially distributed Modelling and ASsimilation for Hydrology), originally written in Fortran. This aims to facilitate scientific enhancements and their transfer to the operational French flash flood warning system, Vigicrues Flash. Thanks to the recent f90wrap library (Kermode J., 2020), the whole SMASH toolchain has been wrapped for use in a Python environment. The new wrapped SMASH is compiled as shared library, loaded in a Python environment and benefits from advanced Python libraries for pre- and post-processing, optimization and machine learning (Virtanen P., 2020 and Stančin I., 2019 and Sarkar D., 2018 and Lawhead J., 2019). The SMASH Python toolchain currently includes (i) a modular hydrological model, (ii) fortran solvers, (iii) the corresponding adjoint model obtained by automatic differentiation with the Tapenade engine (Hascoet L., 2013) and (iv) a Python class to simplify the Python-Fortran interface. The wrapped code features a revamped structure and gains in modularity. The validation of the wrapped SMASH toolchain is performed via comparisons, over several academic and real cases, against the reference results from the original SMASH Fortran code (Colleoni F., 2021 and Jay-Allemand M., 2020).
These Python wrappers offer several perspectives: SMASH will ease the transfer of scientific enhancements into operations, in particular for the national Vigicrues Flash service; coupling SMASH with probabilistic precipitation nowcasting could be facilitated with the Python libraries Pysteps (Pulkkinen S, 2019); future toolchain improvements will benefit from up-to-date numerical technologies, such as parallel computing, model couplings, hybrid solvers, web services and mapping, as well as uncertainty modeling and data assimilation algorithms.

How to cite: Jay-Allemand, M., Colleoni, F., Garambois, P.-A., and Demargne, J.: SMASH - Spatially distributed Modelling and ASsimilation for Hydrology: Python wrapping towards enhanced research-to-operations transfer, IAHS-AISH Scientific Assembly 2022, Montpellier, France, 29 May–3 Jun 2022, IAHS2022-48, https://doi.org/10.5194/iahs2022-48, 2022.