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

ENH: Update the reading of geo-referenced input data #162

Closed inoelloc closed 5 months ago

inoelloc commented 5 months ago

The aim of this commit is to address the problems associated with reading geo-referenced data (atmospheric and physiographic data). In particular, certain specific cases were not fully handled by smash:

This commit improves these 3 aspects by returning a warning if one of these cases occurs on one of the files read. For the resolution, the file is resampled using nearest neighbour algorithm. For overlap missmatch, the reading window is shifted to overlap on the nearest cell. And, if the mesh extension is too large, the code no longer returns an error but fills the array with no data in the part whose extent is not covered by the data.

In addition, when generating a mesh with a bounding box, if the given bounding box does not overlap with the flow directions, it is padded.

Finally, a series of tests on the various possible warnings and some documentation has been added