From 4c8a4688afcc42569ba6f05123a459e822b4eb76 Mon Sep 17 00:00:00 2001 From: saschahofmann Date: Mon, 27 Jan 2025 10:59:44 +0100 Subject: [PATCH] Fix real_data test by allowing linear interp for dayofyear --- src/xclim/sdba/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xclim/sdba/base.py b/src/xclim/sdba/base.py index 0c2d3f626..4baa9edf0 100644 --- a/src/xclim/sdba/base.py +++ b/src/xclim/sdba/base.py @@ -311,6 +311,8 @@ def get_index( # the first season is shifted by 1 month the but the middle of the season is shifted in the other direction # by half a month so -(1/12-1/24)*4 = -1/6 i = ind.dayofyear / length_year * 4 - 1 / 6 + elif self.prop == "dayofyear": + i = ind.dayofyear else: raise ValueError( f"Interpolation is not supported for {self.dim}.{self.prop}."