feat(filter): add irregular_to_grid#298
Conversation
anaprietonem
left a comment
There was a problem hiding this comment.
Left some comments! thanks a lot for implementing this Aaron!
|
(Converting to draft while I address some issues that have been spotted - thanks @neill-b) |
| Notes | ||
| ----- | ||
| - Grid points with no observations in the window are filled with ``NaN`` | ||
| - ``spatial_index`` must be a valid integer index into the named grid. |
There was a problem hiding this comment.
@pwlean, @pinnstorm - was this provided by the assign_to_grid code?
If so, should we:
a) not require it and calculate on demand;
b) require it but make it a configurable column name;
c) other?
(I think a); or maybe b) but if None then a))
There was a problem hiding this comment.
Although it could be argued to be a slightly worse user experience to not calculate this automatically, I think requiring the column to already exist is in line with what we do with the rest of the filters, so in the spirit of the principle of least surprise, I think we should require this to already exist. So I'll go ahead and add a config option for the name of the column (as I could be renamed differently) - with the name that is outputted from assign_to_grid/superob as the default value.
This comment was marked as resolved.
This comment was marked as resolved.
## Description As discussed on email - use an additional column to extract the unique date-time elements for this dataset. It is assumed that this will have been set up when the sources was read. ## What problem does this change solve? Tested, with and without incremental initialisation, and appears to choose the correct set of dates for the data. ***As a contributor to the Anemoi framework, please ensure that your changes include unit tests, updates to any affected dependencies and documentation, and have been tested in a parallel setting (i.e., with multiple GPUs). As a reviewer, you are also responsible for verifying these aspects and requesting changes if they are not adequately addressed. For guidelines about those please refer to https://anemoi.readthedocs.io/en/latest/*** By opening this pull request, I affirm that all authors agree to the [Contributor License Agreement.](https://github.com/ecmwf/codex/blob/main/Legal/contributor_license_agreement.md)
Description
Adds a filter
irregular_to_grid(migrated from AI-DOP project @ 0058299) to support building gridded anemoi-datasets from tabular sources.As a contributor to the Anemoi framework, please ensure that your changes include unit tests, updates to any affected dependencies and documentation, and have been tested in a parallel setting (i.e., with multiple GPUs). As a reviewer, you are also responsible for verifying these aspects and requesting changes if they are not adequately addressed. For guidelines about those please refer to https://anemoi.readthedocs.io/en/latest/
By opening this pull request, I affirm that all authors agree to the Contributor License Agreement.