Skip to content

Commit

Permalink
Fix real_data test by allowing linear interp for dayofyear
Browse files Browse the repository at this point in the history
  • Loading branch information
saschahofmann committed Jan 27, 2025
1 parent 162bdf8 commit 4c8a468
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xclim/sdba/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}."
Expand Down

0 comments on commit 4c8a468

Please sign in to comment.