Skip to content

Commit

Permalink
Tie usage of compression keyword to xarray version
Browse files Browse the repository at this point in the history
  • Loading branch information
sfinkens committed Mar 13, 2023
1 parent 1c5394d commit 41226ec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion satpy/tests/writer_tests/test_cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1450,5 +1450,12 @@ def _get_compression_params(complevel):


def _should_use_compression_keyword():
# xarray currently ignores the "compression" keyword, see
# https://github.com/pydata/xarray/issues/7388. There's already an open
# PR, so we assume that this will be fixed in the next minor release
# (current release is 2023.02). If not, tests will fail and remind us.
versions = _get_backend_versions()
return versions["libnetcdf"] >= Version("4.9.0")
return (
versions["libnetcdf"] >= Version("4.9.0") and
versions["xarray"] >= Version("2023.03")
)

0 comments on commit 41226ec

Please sign in to comment.