DassHydro / smash

An open source, Python library interfacing the Fortran Spatially distributed Modelling and ASsimilation for Hydrology platform.
https://smash.recover.inrae.fr/
GNU General Public License v3.0
12 stars 6 forks source link

MAINT: Switch from gdal to rasterio #167

Closed inoelloc closed 4 months ago

inoelloc commented 4 months ago

This commit addresses the problem of distributing smash with gdal. gdal doesn't provide binary wheels directly, so you need to install the gdal library on your system before you can install gdal bindings in Python. One way of working with gdal simply in Python is conda, but in order to facilitate the distribution of smash on different OS (linux, maxos and windows), it is simpler to use rasterio to read raster (rasterio provides a binary wheel directly which include gdal). This change is not neutral and leads to performance losses in terms of raster calculation time (rain, etp, descriptors, etc). Generally speaking, reading the input data is a relatively quick process compared with a calibration. However, if the calculation time for reading becomes too great a concern, it can be parallelized.

2 other minor changes have been made:

NOTE: A future commit will be made to integrate meson to manage the smash build system. A number of changes will be made to the way smash is installed.