-
Notifications
You must be signed in to change notification settings - Fork 19
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
Balinus/patch 1 savedoc #438
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,17 @@ savedataset(ds, path="ds.zarr", driver=:zarr) | |
nothing # hide | ||
```` | ||
|
||
Save a dataset to Zarr format with compression: | ||
|
||
````@example write | ||
using Blosc | ||
n = 7 # compression level, number between 0 (no compression) and 9 (max compression) | ||
compression = Zarr.BloscCompressor(clevel=n) | ||
|
||
savedataset(ds, path="ds.zarr", driver=:zarr, compressor=compression) | ||
nothing # hide | ||
```` | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should have more than 1 compression level, and compare them both at the end, namely, what their disk sizes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean, compare on my computer and report sizes in the documentation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here, directly. Let's say a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had never use this argument, so..., also I don't know what are the defaults, and hence how different things actually are. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, I see I didn't even thought that the code were actually run! We'll look into it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Humm, strangely, the compression does not seems to work as expected. There is little effect on Zarr folders and there is some on netcdf files... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 76M test1.nc 84M test1.zarr |
||
## Write NetCDF | ||
|
||
Save a single YAXArray to a directory: | ||
|
@@ -45,6 +56,14 @@ savedataset(ds, path="ds.nc", driver=:netcdf) | |
nothing # hide | ||
```` | ||
|
||
Save a dataset to NetCDF format with compression: | ||
|
||
````@example write | ||
n = 7 # compression level, number between 0 (no compression) and 9 (max compression) | ||
savedataset(ds, path="ds.zarr", driver=:zarr, compress=n) | ||
Balinus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
nothing # hide | ||
```` | ||
|
||
## Overwrite a Dataset | ||
If a path already exists, an error will be thrown. Set `overwrite=true` to delete the existing dataset | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to add
Blosc
to the Project toml, explicitly. Or, loaded it from whatever other package is also available.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding Blosc to YAXArrays's Project.toml? or perhaps you mean YAXArrays/docs/Project.toml ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to docs 😄 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can access the compressor within Zarr.jl directly. I will adapt the code