Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace default_cache_type with first #185

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions activestorage/netcdf_to_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def gen_json(file_url, varname, outf, storage_type, storage_options):
secret=S3_SECRET_KEY,
client_kwargs={'endpoint_url': S3_URL},
default_fill_cache=False,
default_cache_type="none"
default_cache_type="first" # best for HDF5
)
fs2 = fsspec.filesystem('')
with fs.open(file_url, 'rb') as s3file:
Expand All @@ -32,7 +32,7 @@ def gen_json(file_url, varname, outf, storage_type, storage_options):
elif storage_type == "s3" and storage_options is not None:
storage_options = storage_options.copy()
storage_options['default_fill_cache'] = False
storage_options['default_cache_type'] = "none"
storage_options['default_cache_type'] = "first" # best for HDF5
fs = s3fs.S3FileSystem(**storage_options)
fs2 = fsspec.filesystem('')
with fs.open(file_url, 'rb') as s3file:
Expand Down
Loading