Skip to content

Check chunking of coordinate variables in zarr format #29

@AliceBalfanz

Description

@AliceBalfanz

Is your feature request related to a problem? Please describe.
When checking datasets in zarr format, I usually run a check if the coordinate variables are chunked or not. I would appreciate a rule in xrlint to do this check. This check is used to identify performance issues with xcube viewer, where a chunked coordinate variable leads to many requests made to the source AWS S3 bucket.

Describe the solution you'd like
xrlint to check if coordinate variables are saved in chunks on disk or not. If they are chunked, a warning should be issued.

Describe alternatives you've considered
I check "manually" with:

for coord_var_name in dataset.coords:
            if dataset[coord_var_name].shape != dataset[coord_var_name].encoding["chunks"]:
                print(f"Encoding differs for {coord_var_name} from shape for {base_dataset_id}")

Image

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions