Skip to content

Commit af0a5d3

Browse files
authored
Merge pull request #607 from dcs4cop/toniof-xxx-adapt_to_zarr_2_11
adapt to zarr 2.11
2 parents 018d86e + 71c3704 commit af0a5d3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/cli/test_prune.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import numpy as np
12
import os.path
23
import sys
34

4-
import numpy as np
55
import xarray as xr
66

77
from test.cli.helpers import CliTest
@@ -28,8 +28,14 @@ def setUp(self) -> None:
2828
variables=dict(precipitation=np.nan,
2929
temperature=np.nan)) \
3030
.chunk(dict(time=1, lat=90, lon=90))
31-
32-
write_cube(cube, self.TEST_CUBE, "zarr", cube_asserted=True)
31+
fv_encoding = dict(
32+
_FillValue=None
33+
)
34+
encoding = dict(
35+
precipitation=fv_encoding,
36+
temperature=fv_encoding
37+
)
38+
cube.to_zarr(self.TEST_CUBE, encoding=encoding)
3339

3440
def tearDown(self) -> None:
3541
rimraf(self.TEST_CUBE)

0 commit comments

Comments
 (0)