Skip to content

Commit

Permalink
Update write.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Balinus authored Sep 13, 2024
1 parent 4a85fa4 commit f139643
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/src/UserGuide/write.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
compression = Zarr.BloscCompressor(clevel=n)
savedataset(ds, path="ds.zarr", driver=:zarr, compressor=compression)
nothing # hide
````

## Write NetCDF

Save a single YAXArray to a directory:
Expand All @@ -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
savedataset(ds, path="ds.zarr", driver=:zarr, compress=n)
nothing # hide
````

## Overwrite a Dataset
If a path already exists, an error will be thrown. Set `overwrite=true` to delete the existing dataset

Expand Down

0 comments on commit f139643

Please sign in to comment.