SMASH -SPATIALLY DISTRIBUTED MODELLING AND ASSIMILATION FOR HYDROLOGY: PYTHON WRAPPING TOWARDS ENHANCED RESEARCH-TO-OPERATIONS TRANSFER

Autor: Jay-Allemand, Maxime, François, Colleoni, Garambois, Pierre-André, Javelle, Pierre, Demargne, Julie
Přispěvatelé: Garambois, Pierre-André, HYDRIS hydrologie (HYDRIS), Institut National de Recherche pour l’Agriculture, l’Alimentation et l’Environnement (INRAE), Risques, Ecosystèmes, Vulnérabilité, Environnement, Résilience (RECOVER), Aix Marseille Université (AMU)-Institut National de Recherche pour l’Agriculture, l’Alimentation et l’Environnement (INRAE), Aix Marseille Université (AMU)
Jazyk: angličtina
Rok vydání: 2022
Předmět:
Zdroj: IAHS 2022-Montpellier
IAHS 2022-Montpellier, May 2022, Montpellier, France.
Popis: International audience; The distributed SMASH platform is based on a gridded mesh and on a modular design. On each cell, the model features different hydrological components. Each component offers different modeling options such as snow modules, surface interception, production, transfer and percolation functions. At the grid scale, different routing models are implemented via a cell-to-cell numerical routing scheme. S MASH comes with its numerical adjoint model which is obtained by automatic differentiation with Tapenade. A variational data assimilation algorithm is implemented and helps to calibrate the distributed parameters or evaluate the model states. This algorithm uses the quasi-Newton lbfgs-b descent algorithm and the gradient of the cost function relative to the model parameters and states. This gradient is computed by a run of the adjoint model. T he numerical SMASH platform is a Fortran code. To gain in modularity and facilitate the use of SMASH in the research and engineering communities, a Python interface has been created with the new F90Wrap software. The original Fortran code has been revamped. The new structure enables to 1) control any inputs and outputs with Python, 2) keep an automatically differentiable and computationally efficient numerical Fortran model, 3) call a binary from the shell to preserve a backward compatibility with old practices. T he key to achieve this Python interface is to use Fortran modules and derived types to store all inputs and outputs variables. These Fortran structures are stored in different modules. F 90Wrap automatically generates the fortran functions and wrappers to give access to every component of each derived type. A Python class is generated to facilitate the use of these wrappers inside a Python code. T he Python object "model" aggregates all inputs/outputs variables required by SMASH. The "model" object comes with built-in methods to allow end users to perform simulations, calibrations, plotting and hdf5 export. The Python binding facilitates all post-processing since it does not requires I/O into text files anymore.
Databáze: OpenAIRE