Commit c1d3133
authored
feat: add
## Description
Adds an (optional) flag to allow `nearest_grid_points` to also return
the distances.
The default behaviour is to return only the indices, so this should not
break the existing use cases (the only instance that uses the distances
is `ComplementNearest` in `anemoi-datasets`, as far as I can tell).
Partially addresses ecmwf/anemoi-datasets#534
***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)return_distances option to nearest grid point lookup function (#237)1 parent 548e2fa commit c1d3133
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
| 595 | + | |
595 | 596 | | |
596 | 597 | | |
597 | 598 | | |
| |||
609 | 610 | | |
610 | 611 | | |
611 | 612 | | |
| 613 | + | |
| 614 | + | |
612 | 615 | | |
613 | 616 | | |
614 | | - | |
615 | | - | |
| 617 | + | |
| 618 | + | |
616 | 619 | | |
617 | 620 | | |
618 | 621 | | |
| |||
622 | 625 | | |
623 | 626 | | |
624 | 627 | | |
625 | | - | |
| 628 | + | |
626 | 629 | | |
627 | | - | |
| 630 | + | |
628 | 631 | | |
629 | 632 | | |
| 633 | + | |
| 634 | + | |
630 | 635 | | |
0 commit comments