Skip to content

Commit

Permalink
Merge pull request #13 from nasa/HARMONY-953
Browse files Browse the repository at this point in the history
Harmony 953
  • Loading branch information
hailiangzhang authored Nov 5, 2021
2 parents c2d8a67 + a699fed commit dcc6f2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion harmony_netcdf_to_zarr/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def scale_attribute(src, attr, scale_factor, add_offset):

def compute_chunksize(shape: Union[tuple, list],
datatype: str,
compression_ratio: float = 7.2,
compression_ratio: float = 1.5,
compressed_chunksize_byte: Union[int, str] = '10 Mi'):
"""
Compute the chunksize for a given shape and datatype
Expand Down
4 changes: 2 additions & 2 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ def test_compute_chunksize_medium(self):
"""
Test of compute_chunksize method for a medium input shape
"""
chunksize_expected = (100, 307, 307)
chunksize_expected = (100, 140, 140)
chunksize_result = convert.compute_chunksize(shape=(100, 1000,1000), datatype='f8')
assert chunksize_expected == chunksize_result

def test_compute_chunksize_large(self):
"""
Test of compute_chunksize method for a large input shape
"""
chunksize_expected = (211, 211, 211)
chunksize_expected = (125, 125, 125)
chunksize_result = convert.compute_chunksize(shape=(1000, 1000,1000), datatype='f8')
assert chunksize_expected == chunksize_result

Expand Down

0 comments on commit dcc6f2f

Please sign in to comment.