From 835ee1658efadbf99af41ca65bebeb9ee26a7c9b Mon Sep 17 00:00:00 2001 From: saschahofmann Date: Thu, 16 Jan 2025 13:14:00 +0100 Subject: [PATCH] Enable seasonal scaling --- src/xclim/sdba/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xclim/sdba/utils.py b/src/xclim/sdba/utils.py index 3a40a4858..81f56f8a9 100644 --- a/src/xclim/sdba/utils.py +++ b/src/xclim/sdba/utils.py @@ -219,6 +219,8 @@ def broadcast( sel.update({group.prop: group.get_index(x, interp=interp != "nearest")}) if sel: + if group.prop == "season": + grouped = grouped.assign_coords(season=map_season_to_int(grouped.season)) # Extract the correct mean factor for each time step. if interp == "nearest": # Interpolate both the time group and the quantile. grouped = grouped.sel(sel, method="nearest")