Ouranosinc / xclim

Library of derived climate variables, ie climate indicators, based on xarray.
https://xclim.readthedocs.io/en/stable/
Apache License 2.0
317 stars 55 forks source link

Phase out convert_calendar and some units processing #1010

Open aulemahal opened 2 years ago

aulemahal commented 2 years ago

Since xarray 0.20.0, some of xclim's calendar functionality has been implemented in xarray directly. Similarly, cf_xarray 0.7.0 now replicates (with minor differences and improvements) the units string processing machinery of xclim. Which means we could phase them out of xclim using these upstream methods instead.

Functions concerned:

So what is our plan for the deprecation?

I suggest we first simply make use of the upstream methods within our own API and remove them once and for all in xclim 1.0. May be adding a warning now, or at least on the last 0.x version. And we document this in the notebooks and docstrings.

Zeitsperre commented 5 months ago

This is waiting on upstream changes in xarray.

aulemahal commented 1 week ago

PR to make some methods removed from xclim public in xarray is here : https://github.com/pydata/xarray/pull/9105.

Updated top post, all tasks are done except this public method thing.