From bb2dadb50578bbdf3622ae497ab1caa718cd27b0 Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Wed, 21 Feb 2024 16:36:42 +0000 Subject: [PATCH] fix _map_complete_blocks --- esmf_regrid/schemes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmf_regrid/schemes.py b/esmf_regrid/schemes.py index c49d1b91..c8dba492 100644 --- a/esmf_regrid/schemes.py +++ b/esmf_regrid/schemes.py @@ -327,7 +327,7 @@ def _map_complete_blocks(src, func, active_dims, out_sizes, *args, **kwargs): if num_out == 1: out_chunks[sorted_dims[0]] = out_sizes[0] else: - for dim, size in zip(dims, out_sizes): + for dim, size in zip(active_dims, out_sizes): # Note: when mapping 2D to 2D, this will be the only alteration to # out_chunks, the same as iris._lazy_data.map_complete_blocks out_chunks[dim] = size