open netcdf or zarr
Usage
open_nz(nz, backend = NULL, warn = FALSE)
# S3 method for class 'Store'
open_nz(nz, backend = NULL, warn = FALSE)
# S3 method for class 'character'
open_nz(nz, backend = NULL, warn = FALSE)
# S3 method for class '`NULL`'
open_nz(nz, backend = NULL, warn = FALSE)Arguments
- nz
a pizzarr store, a path to a zarr store, a path to a netcdf resource, or an `s3://` or `gs://` URL. A cloud store is read through the pizzarr zarrs backend, in either Zarr v2 or v3, and must publish consolidated metadata: a `.zmetadata` key on v2, or a `consolidated_metadata` member of the root `zarr.json` on v3. Connection settings come from the environment: `AWS_ENDPOINT` for an S3-compatible endpoint, and `GOOGLE_SKIP_SIGNATURE=true` for anonymous access to a public Google Cloud Storage bucket.
- backend
character "pizzarr" or "RNetCDF" if NULL (the default) will try pizzar first and fall back to RNetCDF
- warn
logical warn or no warn?
Examples
if(requireNamespace("pizzarr", quietly = TRUE)) {
z <- z_demo()
bcsd <- open_nz(z)
class(bcsd)
zarr <- pizzarr::DirectoryStore$new(z)
class(zarr)
bcsd <- open_nz(zarr)
class(bcsd)
}
#> [1] "ZarrGroup" "R6"
# equivalent data in NetCDF
if(requireNamespace("RNetCDF", quietly = TRUE)) {
nc <- z_demo(format = "netcdf")
bcsd <- open_nz(nc)
class(bcsd)
}
#> [1] "NetCDF"
