From bc415ab106518d578d1067038c8e354c1dc9494e Mon Sep 17 00:00:00 2001 From: Pascal Bourgault Date: Wed, 8 Jan 2025 12:27:11 -0500 Subject: [PATCH 1/2] Remove obsolete xarray call --- src/xclim/sdba/base.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/xclim/sdba/base.py b/src/xclim/sdba/base.py index c060a054b..ca5f93d02 100644 --- a/src/xclim/sdba/base.py +++ b/src/xclim/sdba/base.py @@ -15,7 +15,7 @@ import xarray as xr from boltons.funcutils import wraps -from xclim.core.calendar import get_calendar +from xclim.core.calendar import get_calendar, max_doy from xclim.core.options import OPTIONS, SDBA_ENCODE_CF from xclim.core.utils import uses_dask @@ -195,10 +195,8 @@ def get_coordinate(self, ds: xr.Dataset | None = None) -> xr.DataArray: if self.prop == "dayofyear": if ds is not None: cal = get_calendar(ds, dim=self.dim) - mdoy = max( - xr.coding.calendar_ops._days_in_year(yr, cal) - for yr in np.unique(ds[self.dim].dt.year) - ) + # TODO : Change this to `ds[self.dim].dt.days_in_year.max().item()` when minimum xarray is 2024.09 + mdoy = max_doy[cal] else: mdoy = 365 return xr.DataArray( From 71026fd39da8fe2025fff0aac3765d841531284b Mon Sep 17 00:00:00 2001 From: Ouranos Helper Bot Date: Thu, 16 Jan 2025 15:24:31 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Bump=20version:=200.54.1-dev.2=20=E2=86=92?= =?UTF-8?q?=200.54.1-dev.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ouranos Helper Bot --- pyproject.toml | 2 +- src/xclim/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 84293bba9..597552261 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,7 +140,7 @@ target-version = [ ] [tool.bumpversion] -current_version = "0.54.1-dev.2" +current_version = "0.54.1-dev.3" commit = true commit_args = "--no-verify --signoff" tag = false diff --git a/src/xclim/__init__.py b/src/xclim/__init__.py index 1a10cce6c..bb48837c2 100644 --- a/src/xclim/__init__.py +++ b/src/xclim/__init__.py @@ -13,7 +13,7 @@ __author__ = """Travis Logan""" __email__ = "logan.travis@ouranos.ca" -__version__ = "0.54.1-dev.2" +__version__ = "0.54.1-dev.3" with _resources.as_file(_resources.files("xclim.data")) as _module_data: