Published September 30, 2024
| Version v0.10.0
Software
Open
Ouranosinc/xscen: v0.10.0
Description
v0.10.0 (2024-09-30)
Contributors to this version: Juliette Lavoie (@juliettelavoie), Pascal Bourgault (@aulemahal), Gabriel Rondeau-Genesse (@RondeauG), Trevor James Smith (@Zeitsperre).
New features and enhancements
- The
maskargument instack_drop_nanscan now be a list of dimensions. In that case, adropna(how='all')operation will be used to create the mask on-the-fly. (PR/450). - Few changes to
clean_up: minimum_calendarnow accepts a list as input. (PR/450).- More calendars are now recognized in
translate_time_chunk. (PR/450). new_diminunstack_datesis now None by default and changes depending on the frequency. It becomesmonthif the data is exactly monthly, and keep the old default ofseasonotherwise. (PR/450).- Updated the list of libraries in
show_versionsto reflect our current environment. (PR/450). - New
xscen.catutils.patterns_from_schemato generate all possible patterns from a given schema (or one of xscen's default), to use with :py:func:parse_directory. (PR/431). - New
DataCatalog.copy_filesto copy all files of catalog to a new destination, unzipping if needed and returning a new catalog. (PR/431). - Convenience functions
xs.io.zip_directoryandxs.io.unzip_directory(for zarrs). (PR/431). - New argument
compute_indicators:rechunk_inputto rechunk the inputs to resample-appropriate chunks before calling xclim. (PR/431). - New
xs.indicators.get_indicator_outputsto retrieve what variable name(s) and frequency to expect from an xclim indicator. (PR/431). xscennow supports launches tests frompytestwith the--numprocessesoption. See thepytest-xdist documentation <https://pytest-xdist.readthedocs.io/en/stable/>_ for more information. (PR/464).- Conservative regridding now supports oblique mercator projections. (PR/467).
- The automatic name for the weight file in
regrid_datasetis now more explicit to avoid errors, but now requirescat:idandcat:domainarguments for both the source and target datasets. (PR/467).
Bug fixes
- Fixed bug with reusing weights. (GH/411, PR/414).
- Fixed bug in
update_from_dswhen "time" is a coordinate, but not a dimension. (:pull:417). - Avoid modification of mutable arguments in
search_data_catalogs(PR/413). ensure_correct_timenow correctly handles cases where timesteps are missing. (PR/440).- If using the argument
tile_bufferwith ashapemethod inspatial.subset, the shapefile will now be reprojected to a WGS84 grid before the buffer is applied. (PR/440). maybe_unstacknow works if the dimension name is not the default. (PR/450).unstack_fill_nannow works if given a dictionary that contains both dimensions and coordinates. (PR/450).clean_upno longer modifies the original dataset. (PR/450).unstack_datesnow works correctly for yearly datasets whenwinter_starts_year=True, as well as multi-year datasets. (PR/450).- Fix
xs.catalog.concat_data_catalogsfor catalogs that have not been search yet. (PR/431). - Fix indicator computation using
freq=2Q*by assuming this means a semiannual frequency anchored at the given month (pandas assumes 2 quarter steps, any of them anchored at the given month). (PR/431). create_bounds_rotated_polenow uses the default value if the dataset has nonorth_pole_grid_longitudeattribute, instead of crashing. (PR/455).- Rewrote the global tas data file with latest HDF5/h5py to avoid errors when using h5py 3.11 and hdf5 1.14.2. (PR/1861).
- Remove reference of deprecated xclim functions (
convert_calendar,get_calendar) and adapt the code for supporting xclim 0.52.2 and its subsequent development version. (PR/465).
Breaking changes
convert_calendarinclean_upnow usesxarrayinstead ofxclim. Keywords aren't compatible between the two, but given thatxclimwill abandon its function, no backwards compatibility was sought. (PR/450).attrs_to_removeandremove_all_attrs_exceptinclean_upnow use real regex. It should not be too breaking since afullmatch()is used, but*is now.*. (PR/450).- Python 3.9 is no longer supported. (PR/456).
- Functions and arguments that were deprecated in
xscenv0.8.0 or earlier have been removed. (PR/461). pytest-xdistis now a development dependency. (PR/464).xs.regrid.create_bounds_rotated_polehas been renamed toxs.regrid.create_bounds_gridmapping. (PR/467).- The
weights_locationargument inregrid_datasetis no longer positional. (PR/467). - The
xs.regrid.create_maskfunction now requires explicit arguments instead of a dictionary. (PR/467).
Internal changes
DataCatalog.to_datasetcan now accept apreprocessargument even ifcreate_ensemble_onis given. The user assumes calendar handling. (PR/431).- Include domain in
weight_locationinregrid_dataset. (PR/414). - Added pins to
xarray,xclim,h5py, andnetcdf4. (PR/414). - Add
.zipand.zarr.zipas possible file extensions for Zarr datasets. (PR/426). - Explicitly assign coords of multiindex in
xs.unstack_fill_nan. (PR/427). - French translations are compiled offline. A new check ensures no PR are merged with missing messages. (GH/342, PR/443).
- Continued work to add tests. (PR/450).
- Updated the cookiecutter template via
cruft: (PR/452)- GitHub Workflows that use rely on
PyPI-based dependencies now use commit hashes. Dependabotwill now group updates by type.- Dependencies have been updated and synchronized.
- Contributor guidance documentation has been adjusted.
numpydoc-validatehas been added to the linting tools.- Linting checks are more reliant on
ruffsuggestions and stricter. flake8-alphabetizehas been replaced byruff.- License information has been updated in the library top-level
__init__.py.
- GitHub Workflows that use rely on
- Docstrings have been adjusted to meet the
numpydocstandard. (PR/452).
CI changes
- The
bump-version.ymlworkflow now uses the Ouranosinc GitHub Helper Bot to sign bump version commits. (PR/462).
Files
Ouranosinc/xscen-v0.10.0.zip
Files
(778.3 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:ba9f33698a73ec8eae317b9d9d4d4ae1
|
778.3 kB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/Ouranosinc/xscen/tree/v0.10.0 (URL)