Releases: roocs/clisops
Releases · roocs/clisops
v0.17.0
New Features
- Added an
engineargument toGrid.ds.to_netcdf()to allow users to specify the engine used for writing NetCDF files (#439). - Coding conventions have been updated to use Python 3.10+ features (#439).
Weightswill now usepost_mask_source='domain_edge'introduced inxesmfversion 0.9 when remapping a regional grid via nearest-neighbour to avoid extrapolation beyond the source domain (#447).- Added
Grid.extent_lonandGrid.extent_latattributes to expose longitude- and latitude-specific extents (#447).
Bug Fixes
- Fixed support for
kerchunkwiths3. Pinnedzarr >=2.13.0,<3.0(#429). - Lift pin on
xarraythat was previously due to incompatibilities withxesmf.xarray>=2025.1.1now required for general usage andxarray>=2025.6.0forregridoperations (#437). - Non-
numpydocdocstrings in the codebase have been converted to thenumpydocformat (#439). - Fixed issue with dask: "NotImplementedError: item is not yet a valid method on dask arrays" (#451).
- Added
fix_netcdf_attrs_encoding()and_fix_str_encoding()inoutput_utilsto correct UTF-8 encoding issues in global and variable attributes (#447). - Fixed
Grid._grid_from_ds_adaptivefor regional grids crossing the meridian or antimeridian (#447). - Fixed
Grid.to_netcdf()so thatds.encoding['unlimited_dims']is correctly updated when writing horizontal-grid-only datasets (#447). - Corrected
xarrayversion-compatibility warnings incore/regrid.py(#447).
Breaking Changes
- Support for Python 3.10 has been dropped.
numpy >=1.26is the new minimum supported version (#469). Grid.detect_extent()now returns a tuple(lon_extent, lat_extent)instead of onlylon_extent(#447).Grid.extentnow represents the combined lon/lat extent:"global"if both are global; otherwise"regional". The newGrid.extent_lonandGrid.extent_latattributes provide axis-specific extent information (#447).
Other Changes
- Added a
suppress_main_variable_warningoption toget_coord_by_type()for cases where no main variable can be uniquely identified (#447). - Updated
require_module()to support intervals of unsupported versions (#447).
Internal Changes
toxand Makefile configuration for testing docs has been adjusted to ensure that builds do not rely on opening a browser window (#437).step-security/harden-runnerAction is now configured to audit connections to the GitHub API and other services (#434).- Output utilities tests have been modified to no longer create files in the current working directory, but rather in a temporary directory. (#434).
blackandisortas well as most linting checks performed byflake8have been replaced byrufffor code formatting and linting (#439).pre-commithooks have been updated to userufffor code formatting and linting, as well as a few others (#439).- Addressed a few
RuntimeWarningmessages emitted by the test suite (#463). - Adjusted the CI workflows to not use Python 3.14 (due to incompatibilities with some dependencies) (#463).
- Fixed and updated
regrid.ipynband removed dependency onpsymaps/psyplot(#447). - Expanded and updated tests, including restoring tests previously skipped or xfailed with
engine="h5netcdf"(#447).
v0.16.2
v0.16.1
This is a patch fix release to explicitly drop Python 3.9 support in the metadata due to incompatibility with xarray. For release notes on this minor version, see https://github.com/roocs/clisops/releases/tag/v0.16.0.
Bug Fixes
- Dropped Python3.9 support in metadata due to incompatibility with
xarray(#408).
Internal Changes
- Fixed an issue with the
toxconfiguration that was causing thepy3.10environment to use the wrong Python version (#408).
v0.16.0
New Features
clisopsnow officially supports Python 3.13 (#398).- Version limitations have been lifted on
xarrayandnumpyto support newer versions (#398).- Mark regrid tests as
xfailwhich do not pass due to latest xarray version (#397).
- Mark regrid tests as
Bug Fixes
clisops.utils.dataset_utils- Fixed
is_timeto avoid memory overload (#397).
- Fixed
Internal Changes
- Pinned a few docs-related dependencies to compatible versions. Added
sphinx-autodoc-typehints,sphinx-codeautolink, andsphinx-copybuttonto the docs dependencies (#396). - The
LICENSEfile has been adjusted to ensure it is more machine-parsable (#398). - Licensing information has been added to the top-level
__init__.pyfile of the package (#398). - The
README.rstfile has been updated to include a table of relevant badges (#398). - All calls using
use_cftime=Truehave been updated todecode_times=xr.coders.CFDatetimeCoder(use_cftime=True)as suggested byxarray(#398).
CI Changes
- Added a workflow for uploading preview releases to TestPyPI (#374).
- GitHub Workflows now make more use of
step-security/harden-runnerAction for security hardening (#398). - Python libraries used for CI are now listed in
CI/requirements_ci.inand pinned by their hashes inCI/requirements_ci.txt(#398). - Coverage reporting now uses the
coverallsapp/github-actionAction. Conda builds now also report coverage to Coveralls (#398).
v0.15.0
New Features
- The functionality of the
roocs-utilslibrary has been folded intoclisops.roocs-utilsis no longer a dependency ofclisops(#368, #370). - The
CONFIGsettings have been updated to reflect the changes inroocs-utilsand those required inclisops(#370). - Several development tooling libraries have been updated to their latest versions (#368).
Other Changes
- The
pytesttesting suite has been updated to reflect the changes in theroocs-utilslibrary and the newclisopsconfiguration settings (#368, #370):- Tests previously found in
roocs-utilshave migrated toclisops. xclim.testing.utils.open_dataset()has been deprecated in favour ofxclim.testing.utils.nimbus().fetch().
- Tests previously found in
v0.14.1
New Features
- Added new methods to
clisops.core.regrid.Grid- Added possibility to apply land or ocean mask if present in the file
- Adapted method from
ESMFto detect smashed cells - Masking degenerate (i.e. collapsed and smashed) cells
- Dropping lat/lon bounds if an integrity check fails
- Added a few attributes to the
Gridobject
clisops.ops.regrid: added option to request a land/sea mask for the output gridclisops.utils.dataset_utils- Added function
determine_lon_lat_rangeto determine the min. and max. lat and lon values - Added function
fix_unmasked_missing_values_lon_latto identify and mask yet unmasked missing values in lat and lon arrays - Added
forceparameter tocf_convert_between_lon_frames
- Added function
Bug Fixes
clisops.utils.dataset_utils- Fixed issue in
cf_convert_between_lon_framescausing the longitude frame to not be adjusted in case of NaNs in the longitude array - Addressed issues in
generate_bounds_curvilinear- latitudes are now clipped above 90 or below -90 degrees north
- longitudes are converted to longitude frame -180, 180
- longitude bounds are adjusted at the Greenwich meridian or anti meridian to avoid grid cells wrapping once or more times around the globe
- Bounds are generated significantly faster due to making use of index slicing and
numpy.vectorize
- Fixed issue in
Breaking Changes
- Adapted functions from
roocs_utils.xarray_utils.xarray_utilsintoclisops.utils.dataset_utilsget_coord_by_typenow returns the name of the coordinate variable and not the coordinate variableget_coord_by_typeoptionally returns a list with further matches for the coordinate variableget_coord_by_typedoes no longer raise an exception when more than one coordinate variable matches the requested typeget_coord_by_typeraisesValueErrorinstead ofExceptionwhen the coordinate type is unknowndetect_coordinateraisesKeyErrorinstead ofAttributeErrorif no coordinate could be detecteddetect_gridtyperaisesValueErrorfor unsupported grid types rather thanInvalidParameterValueandException
clisops.core.regridGrid.detect_coordinate: raisesKeyErrorinstead ofAttributeErrorif no coordinate could be detected
clisops.ops.regridRegrid._calculate: issuesUserWarninginstead of lettingclisops.core.Weights.__init__raise anExceptionwhen input and output grid are alike
Other Changes
- The testing suite has been refactored to make better use of context handlers when opening files with
xarray, preventing synonymous read errors and improving the overall performance of the tests. - Several tests that were failing due to significantly long runtimes have been marked as
slowand are now skipped by default. - GitHub Workflows now use a timeout of 20 minutes for the build suite to prevent hanging builds.
v0.14.0
New Features
clisopsnow makes use ofpytest-xdistfor parallel testing. This can be enabled using--numprocesses={int}. See thepytest-xdist documentation <https://pytest-xdist.readthedocs.io/en/latest/>_ for more information (#345).- Testing data caching is now handled by
poochand testing data registries ('stratus' forroocs/mini-esgf-dataand 'nimbus' forOuranosinc/xclim-testdata) (#345). clisopscoding conventions now use Python 3.9+ conventions (#345).
Breaking Changes
clisopshas dropped support for Python 3.8 (#345).- Several dependencies have been updated to include lower bounds for clearer compatibility and easier maintenance (#345, #XYZ).
- The affected core dependencies are:
dask >=2023.6.0,filelock >=3.15.4,geopandas >=0.14.0,jinja2 >=2.11,numpy >=1.23.0,packaging >=23.2,pandas >=1.5.0,pooch >=1.8.0,scipy >=1.9.0, andxarray >=2022.6.0. - Extra dependencies are
ipython >=8.5.0,matplotlib >=3.6.0,nbconvert >=7.14.0,nbsphinx >=0.9.5,pre-commit >=3.5.0, andsphinx >=7.0.0.
- The affected core dependencies are:
clisopsno longer requiresgitpython >=3.1.30andrequests >=2.0(#345).- The development dependencies have been updated to include
deptry >=0.20.0andpytest-xdist[psutil] >=3.2(#345). netCDF4has been moved from core dependency to development dependency (#345).
Other Changes
clisops.utils.testinghas replacedclisops.utils.tutorial. This submodule contains several functions and variables for allowing user control over testing data fetching (#345).- The
_commontesting tools have been migrated toclisops.utils.testingor rewritten aspytestfixtures (#345). - Testing data fetching now uses worker threads to copy cached data to threadsafe data caches that are separated by worker (#345).
v0.13.1
Bug Fixes
- Changed the order of operations in
clisops.core.subset.subset_shapeto ensure that the CRS of the shapefile is compatible with the dataset CRS before attempting to subset (#340).
Breaking Changes
- Anaconda builds now require
cartopy >=0.23and only support Python 3.9 and above (#340). - Many dependency version pins now include lower bounds for clearer compatibility and easier maintenance (#343).
Other Changes
v0.13.0
New Features
clisopsnow officially supports Python 3.12 (#330).
Bug Fixes
- Fixed standard file-namer fallback method (#318).
- Fixed
KeyErrorfor temporal subsetting by components if not all components can be found in the dataset (#316). - Raising
KeyErrorfor temporal subsetting by components when no time steps match the selection criteria (#316). - Coordinate detection for remapping operator via standard_name if detection via
cf-xarrayfails / is ambiguous (#316). - Remove encoding settings with regards to compression for string variables to avoid netCDF write errors with newer
netcdf-clibrary versions (>4.9.0) (#319). - Fixed a few docstrings, specifies some class methods as static methods (#321).
- Renamed a few internal variables for clarity, rephrased a few sentences for grammar/spelling (#321).
- Fixed a bug related to the creation of the
weights_dirfor regridding that was causing issues for Windows platforms (#313).
Other Changes
- The compression level is capped at 1 to reduce write times (#319).
- Updated
pre-commithooks, pinned linting tools to their pre-commit equivalents (#321). - Added a pre-commit hook as well as a configuration for
codespell(#321). - Added
dependabotto maintain package and GitHub Action versions (#322). - The
require_moduledecorator can now accept supported version information (#321). - Testing data caching now uses platformdirs to determine the OS-appropriate caching location (#321).
- Updated
blackin linting tools to v24.2.0 (#330). - Changes some print calls into logging calls in the tests (#330).
- A warning is now emitted on
clisopsimport if the installedxesmfis too old (#330). - Replaced
styfle/cancel-workflow-actionwith GitHub Workflow concurrency settings (#330).
v0.12.2
What's Changed
- Regridding: handling of zonal mean datasets and datasets with shifted longitude frame by @sol1105 in #313
- Add core/average.py/average_shape to ops/average.py by @charlesgauthier-udm in #312
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #315
- Prepare v0.12.2 by @Zeitsperre in #314
New Contributors
- @charlesgauthier-udm made their first contribution in #312
Full Changelog: v0.12.1...v0.12.2