Skip to content

Commit 8688672

Browse files
committed
modify zarr acces
1 parent 3b4adae commit 8688672

File tree

6 files changed

+182
-110
lines changed

6 files changed

+182
-110
lines changed

src/py_eddy_tracker/__init__.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
from argparse import ArgumentParser
2424
import logging
25-
import numpy
2625
import zarr
2726
from ._version import get_versions
2827

@@ -388,8 +387,8 @@ def parse_args(self, *args, **kwargs):
388387
nc_type="f4",
389388
filters=[zarr.Delta("i2")],
390389
output_type="i2",
391-
scale_factor=numpy.float32(0.01),
392-
add_offset=180,
390+
scale_factor=0.01,
391+
add_offset=180.0,
393392
nc_dims=("obs", "NbSample"),
394393
nc_attr=dict(
395394
long_name="Effective Contour Longitudes",
@@ -405,7 +404,7 @@ def parse_args(self, *args, **kwargs):
405404
nc_type="f4",
406405
filters=[zarr.Delta("i2")],
407406
output_type="i2",
408-
scale_factor=numpy.float32(0.01),
407+
scale_factor=0.01,
409408
nc_dims=("obs", "NbSample"),
410409
nc_attr=dict(
411410
long_name="Effective Contour Latitudes",
@@ -432,8 +431,8 @@ def parse_args(self, *args, **kwargs):
432431
nc_type="f4",
433432
filters=[zarr.Delta("i2")],
434433
output_type="i2",
435-
scale_factor=numpy.float32(0.01),
436-
add_offset=180,
434+
scale_factor=0.01,
435+
add_offset=180.0,
437436
nc_dims=("obs", "NbSample"),
438437
nc_attr=dict(
439438
long_name="Speed Contour Longitudes",
@@ -449,7 +448,7 @@ def parse_args(self, *args, **kwargs):
449448
nc_type="f4",
450449
filters=[zarr.Delta("i2")],
451450
output_type="i2",
452-
scale_factor=numpy.float32(0.01),
451+
scale_factor=0.01,
453452
nc_dims=("obs", "NbSample"),
454453
nc_attr=dict(
455454
long_name="Speed Contour Latitudes",
24.8 KB
Binary file not shown.
26.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)