v0.9.0
v0.9.0 (2024-05-07)
Contributors to this version: Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), Gabriel Rondeau-Genesse (@RondeauG), Juliette Lavoie (@juliettelavoie), Marco Braun (@vindelico).
New features and enhancements
xs.reduce_ensemble
will now callxclim.ensembles.create_ensemble
andxclim.ensembles.make_critera
if required. (PR/386).
Breaking changes
- Removed support for the old instances of the
region
argument inspatial_mean
,extract_dataset
, andsubset
. (PR/367). - Removed
xscen.extract.clisops_subset
. (PR/367). dtr
(the function) was renamed todtr_from_minmax
to avoid confusion with thedtr
variable. (PR/372).- The
xscen.reduce
module has been abandoned. (PR/386).build_reduction_data
has been made redundant byxclim.ensembles.make_critera
and will be removed in a future release.xscen.reduce.reduce_ensemble
has been moved toxscen.ensembles.reduce_ensemble
, as a module was no longer necessary.
Internal changes
- Modified
xscen.utils.change_unit
to always adopt the name from thevariables_and_units dictionary
if the physical units are equal but their names are not (ex. degC <-> ˚C) (PR/373). - Updated the
cookiecutter
template to the latest version. (PR/358):- Addresses a handful of misconfigurations in the GitHub Workflows.
- Added a few free
grep
-based hooks for finding unwanted artifacts in the code base. - Updated
ruff
to v0.2.0 andblack
to v24.2.0.
- Added more tests. (PR/366, PR/367, PR/372).
- Refactored
xs.spatial.subset
into smaller functions. (PR/367). - An
encoding
argument was added toxs.config.load_config
. (PR/370). - Various small fixes to the code to address FutureWarnings. (PR/380).
xs.spatial.subset
will try to guess CF coordinate if it can't find "latitude" or "longitude" inds.cf
. (PR/384).xs.extract_dataset
andxs.DataCatalog.to_dataset
will now default to opening datasets with optionchunks={}
, which tries to respect chunking on disk. (PR/398, GH/368).
Bug fixes
- Fix
unstack_dates
for the new frequency syntax introduced by pandas v2.2. (PR/359). subset_warming_level
will not return partial subsets if the warming level is reached at the end of the timeseries. (GH/360, PR/359).- Loading of training in
adjust
is now done outside of the periods loop. (PR/366). - Fixed bug for adding the preprocessing attributes inside the
adjust
function. (PR/366). - Fixed a bug to accept
group = False
inadjust
function. (PR/366). creep_weights
now correctly handles the case where the grid is small,n
is large, andmode=wrap
. (GH/367).- Fixed a bug in
tasmin_from_dtr
andtasmax_from_dtr
, whendtr
units differed from tasmin/max. (PR/372). - Fixed a bug where the requested chunking would be ignored when saving a dataset (PR/379).
- The missing value check in
health_checks
will no longer crasg if a variable has no time dimension. (PR/382).