Skip to content

Releases: roocs/clisops

v0.14.1

05 Nov 22:00
Compare
Choose a tag to compare

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 ESMF to 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 Grid object
  • clisops.ops.regrid: added option to request a land/sea mask for the output grid
  • clisops.utils.dataset_utils
    • Added function determine_lon_lat_range to determine the min. and max. lat and lon values
    • Added function fix_unmasked_missing_values_lon_lat to identify and mask yet unmasked missing values in lat and lon arrays
    • Added force parameter to cf_convert_between_lon_frames

Bug Fixes

  • clisops.utils.dataset_utils
    • Fixed issue in cf_convert_between_lon_frames causing 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

Breaking Changes

  • Adapted functions from roocs_utils.xarray_utils.xarray_utils into clisops.utils.dataset_utils
    • get_coord_by_type now returns the name of the coordinate variable and not the coordinate variable
    • get_coord_by_type optionally returns a list with further matches for the coordinate variable
    • get_coord_by_type does no longer raise an exception when more than one coordinate variable matches the requested type
    • get_coord_by_type raises ValueError instead of Exception when the coordinate type is unknown
    • detect_coordinate raises KeyError instead of AttributeError if no coordinate could be detected
    • detect_gridtype raises ValueError for unsupported grid types rather than InvalidParameterValue and Exception
  • clisops.core.regrid
    • Grid.detect_coordinate: raises KeyError instead of AttributeError if no coordinate could be detected
  • clisops.ops.regrid
    • Regrid._calculate: issues UserWarning instead of letting clisops.core.Weights.__init__ raise an Exception when 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 slow and 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

03 Oct 19:16
5834d0c
Compare
Choose a tag to compare

New Features

  • clisops now makes use of pytest-xdist for parallel testing. This can be enabled using --numprocesses={int}. See the pytest-xdist documentation <https://pytest-xdist.readthedocs.io/en/latest/>_ for more information (#345).
  • Testing data caching is now handled by pooch and testing data registries ('stratus' for roocs/mini-esgf-data and 'nimbus' for Ouranosinc/xclim-testdata) (#345).
  • clisops coding conventions now use Python 3.9+ conventions (#345).

Breaking Changes

  • clisops has 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, and xarray >=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, and sphinx >=7.0.0.
  • clisops no longer requires gitpython >=3.1.30 and requests >=2.0 (#345).
  • The development dependencies have been updated to include deptry >=0.20.0 and pytest-xdist[psutil] >=3.2 (#345).
  • netCDF4 has been moved from core dependency to development dependency (#345).

Other Changes

  • clisops.utils.testing has replaced clisops.utils.tutorial. This submodule contains several functions and variables for allowing user control over testing data fetching (#345).
  • The _common testing tools have been migrated to clisops.utils.testing or rewritten as pytest fixtures (#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

20 Aug 14:12
Compare
Choose a tag to compare

Bug Fixes

  • Changed the order of operations in clisops.core.subset.subset_shape to 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.23 and 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

  • Internal warnings now consistently use the clisops configured loguru logger (#335).
  • CI Actions now use the commit hashes for version tracking (#343).

v0.13.0

16 Feb 16:50
Compare
Choose a tag to compare

New Features

  • clisops now officially supports Python 3.12 (#330).

Bug Fixes

  • Fixed standard file-namer fallback method (#318).
  • Fixed KeyError for temporal subsetting by components if not all components can be found in the dataset (#316).
  • Raising KeyError for 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-xarray fails / is ambiguous (#316).
  • Remove encoding settings with regards to compression for string variables to avoid netCDF write errors with newer netcdf-c library 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_dir for 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-commit hooks, pinned linting tools to their pre-commit equivalents (#321).
  • Added a pre-commit hook as well as a configuration for codespell (#321).
  • Added dependabot to maintain package and GitHub Action versions (#322).
  • The require_module decorator can now accept supported version information (#321).
  • Testing data caching now uses platformdirs to determine the OS-appropriate caching location (#321).
  • Updated black in linting tools to v24.2.0 (#330).
  • Changes some print calls into logging calls in the tests (#330).
  • A warning is now emitted on clisops import if the installed xesmf is too old (#330).
  • Replaced styfle/cancel-workflow-action with GitHub Workflow concurrency settings (#330).

v0.12.2

03 Jan 14:47
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.12.1...v0.12.2

v0.12.1

30 Nov 20:09
95acef9
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.12.0...v0.12.1

Release v0.12.0

24 Nov 13:56
Compare
Choose a tag to compare

New Features

  • clisops.ops.regrid, clisops.core.regrid, clisops.core.Weights and clisops.core.Grid added (#243). Allowing the remapping of geospatial data on various grids by applying the xESMF <https://pangeo-xesmf.readthedocs.io/en/latest/>_ regridder.

Bug Fixes

  • Calling subset_shape() with a locstream case (#288) returned all coordinates inside inner_mask which is equivalent to the bounding box of the polygon, not the area inside the polygon. Fixed by defining the inner_mask in subset_shape() for the locstream case. (#292).

Other Changes

  • Extending the removal of redundant _FillValue attributes to all data variables and coordinates (#243).
  • Extending the removal of redundant coordinates in the coordinates variable attribute from bounds to all data variables (#243).
  • GitHub Workflows for upstream dependencies are now examined a schedule or via workflow_dispatch (#243).
  • black steps are now called lint for clarity/inclusiveness of other linting hooks. (#243).
  • pre-commit hooks now include checks for TOML files, and for ReadTheDocs and GitHub Actions configuration files. (#243).
  • pre-commit hooks now include sorting of TOML file sections and running black on docstring Python examples. (#306).
  • clisops now uses GitHub Actions with environments for handling deployment via Trusted Publishing. (#306).
  • Documentation has been updated to reflect the new GitHub Actions CI/CD workflow. (#306).
  • bump2version has been replaced with bump-my-version for handling versioning. (#306).

v0.11.0

22 Aug 19:31
Compare
Choose a tag to compare

New Features

  • clisops has adopted PEP 517 <https://peps.python.org/pep-0517/>_ and PEP 621 <https://peps.python.org/pep-0621/>_ and now uses pyproject.toml files (using the flit backend) for package configuration. (#296).
  • Metadata has been modified to reflect current development status and scope of CLISOPS. (#296).
  • New file (requirements_upstream.txt) and Makefile recipe ("$ make upstream") for tracking and easily installing upstream dependencies. (#296).

Bug Fixes

  • The tests folder has been flattened and namespace files haves been removed in order to prevent pip from recognizing the folder as its own package. (#296).
  • The contribution guidelines were duplicated in two locations and contained conflicting information. The guidelines have now been consolidated into a single location and updated to reflect package changes. (#296).

Other Changes

  • GitHub Workflows for pure Python builds now use tox (4.0) to run tests. (#296).
  • GitHub Workflows for conda builds now test clisops using the mamba-org/setup-micromamba action. (#296).
  • The travis.yml file has been removed. (#296).

v0.10.1

21 Aug 18:27
Compare
Choose a tag to compare

Bug Fixes

  • Fixed an issue with the type hinting for subset functions that were broken due to changes in xarray (2023.08). (#295).
  • Updated ReadTheDocs configuration to use Mambaforge (22.9) as engine for building documentation. (#295).

v0.10.0

28 Jun 14:43
Compare
Choose a tag to compare

New Features

  • Added support for Python 3.11 (#287).

Bug Fixes

  • Fixed bug in core.subset.shape_bbox_indexer with the union of invalid geometries. Added regression test. (#280)
  • Added support in core.subset.shape_bbox_indexer for Point and MultiPoint geometries. (#283)
  • Fixed core.subset.subset_bbox and core.subset.subset_shape for datasets with 1D longitude and latitude (ex: Station data). (#288)

Other Changes

  • Shapely 2.0 is now faster than pygeos for create_mask. Removed pygeos from extra dependencies and pinned shapely above 2.0. (#289)