ENH: Update the reading of geo-referenced input data #162
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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