Commit d8b7b23
Implement new "most common" regridder. (#46)
* Implement new "most common" regridder.
* Add 'regrid.stat' for statistical reductions other than the mode
* Add fill_value & ensure monotonic sorts only when not sorted
* Move from list[str] to list[Hashable]
* Refactor reduction methods w/ format_for_regrid, remove duplicate sortbys
* Rename expected_groups -> values
* Remove second sortby
* Add basic tests for regrid.stats
* Disable lat/lon coord formatting for stats-based methods
* Update demo notebooks
* Update docs, changelog
* test statistical padding, add extra longitude monotonicity
* fix dtype comparison
---------
Co-authored-by: Sam Levang <[email protected]>1 parent bc7be5b commit d8b7b23
File tree
14 files changed
+1891
-335
lines changed- docs
- notebooks
- demos
- src/xarray_regrid
- methods
- tests
14 files changed
+1891
-335
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | | - | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
0 commit comments