diff --git a/AUTHORS.rst b/AUTHORS.rst index 2f2e29442..b8fd617c7 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -41,3 +41,4 @@ Contributors * Maliko Tanguy `@malngu `_ * Christopher Whelan `@qwhelan `_ * Dante Castro `@profesorpaiche `_ +* Sascha Hofmann `@saschahofmann `_ diff --git a/CHANGES.rst b/CHANGES.rst index 869d33a4f..fd17a8049 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,7 @@ Announcements Bug fixes ^^^^^^^^^ * Fixed an bug in sdba's ``map_groups`` that prevented passing DataArrays with cftime coordinates if the ``sdba_encode_cf`` option was True. (:issue:`1673`, :pull:`1674`). +* Fixed bug (:issue:`1678`, :pull:`1679`) in sdba where a loaded training dataset could not be used for adjustment Internal changes ^^^^^^^^^^^^^^^^ diff --git a/xclim/sdba/base.py b/xclim/sdba/base.py index 2a1eabf90..0d40e716e 100644 --- a/xclim/sdba/base.py +++ b/xclim/sdba/base.py @@ -611,7 +611,7 @@ def _map_blocks(ds, **kwargs): # noqa: C901 { dim: chunks.get(dim) for dim in reduced_dims - if len(chunks.get(dim)) > 1 + if len(chunks.get(dim, [])) > 1 } ) if badchunks: