diff --git a/xclim/sdba/_adjustment.py b/xclim/sdba/_adjustment.py index 0beb581fd..9d784a260 100644 --- a/xclim/sdba/_adjustment.py +++ b/xclim/sdba/_adjustment.py @@ -1049,10 +1049,10 @@ def _otc_adjust( out += np.random.uniform(low=-bin_width / 2, high=bin_width / 2, size=out.shape) # reintroduce nans - Xadj = X_og - Xadj[mask] = out - Xadj[~mask] = np.nan - return Xadj + Z = X_og + Z[mask] = out + Z[~mask] = np.nan + return Z @map_groups(scen=[Grouper.DIM])