Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

inoelloc
Copy link
Contributor

@inoelloc inoelloc commented Apr 12, 2024

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:

  • Different spatial resolution
  • Overlap missmatch
  • Mesh extent greater than data extent.

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

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:
- Different spatial resolution
- Overlap missmatch
- Mesh extent greater than data extent.
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
@inoelloc inoelloc requested a review from nghi-truyen April 12, 2024 13:38
Dedent assert in test
@inoelloc inoelloc merged commit b35f91d into maintenance/1.0.x Apr 15, 2024
18 checks passed
@inoelloc inoelloc deleted the enh-read-input-data branch April 15, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants