Skip to content

Commit 83ab848

Browse files
authored
Fix deprecation error in xarray 2024.10 (#395)
1 parent 7083733 commit 83ab848

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- python-version: "3.11"
3232
esmf-version: 8.6
3333
- python-version: "3.12"
34-
esmf-version: 8.6
34+
esmf-version: 8.7
3535
steps:
3636
- name: Cancel previous runs
3737
uses: styfle/[email protected]

CHANGES.rst

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ What's new
44
0.8.8 (unreleased)
55
------------------
66
* Fix ESMpy memory issues by explictly freeing the Grid memory upon garbage collection of ``Regridder`` objects. By `Pascal Bourgault <https://github.com/aulemahal>`_.
7+
* Address deprecation for xarray 2024.10 in the parallel weight generation. By `Pascal Bourgault <https://github.com/aulemahal>`_.
78

89
0.8.7 (2024-07-16)
910
------------------

xesmf/frontend.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,9 @@ def _init_para_regrid(self, ds_in, ds_out, kwargs):
10491049
{self.out_horiz_dims[0]: 'y_out', self.out_horiz_dims[1]: 'x_out'}
10501050
)
10511051

1052-
out_chunks = [ds_out.chunks.get(k) for k in ['y_out', 'x_out']]
1053-
in_chunks = [ds_in.chunks.get(k) for k in ['y_in', 'x_in']]
1054-
chunks = out_chunks + in_chunks
1052+
out_chunks = {k: ds_out.chunks.get(k) for k in ['y_out', 'x_out']}
1053+
in_chunks = {k: ds_in.chunks.get(k) for k in ['y_in', 'x_in']}
1054+
chunks = out_chunks | in_chunks
10551055

10561056
# Rename coords to avoid issues in xr.map_blocks
10571057
for coord in list(self.out_coords.keys()):

0 commit comments

Comments
 (0)