# Zarrdump: printing metadata of Zarr's from the command line

**URL:** <https://discourse.pangeo.io/t/zarrdump-printing-metadata-of-zarrs-from-the-command-line/1066>\
**Category:** Data\
**Created:** [December 1, 2020, 5:42am UTC](https://discourse.pangeo.io/t/zarrdump-printing-metadata-of-zarrs-from-the-command-line/1066 "2020-12-01T05:42:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliverwm1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/oliverwm1/32/672_2.png) [@oliverwm1](https://discourse.pangeo.io/u/oliverwm1)\
**Post date:** [December 1, 2020, 5:42am UTC](https://discourse.pangeo.io/t/zarrdump-printing-metadata-of-zarrs-from-the-command-line/1066/1 "2020-12-01T05:42:53Z")

</div>

Hello!

I hope this is an appropriate topic for this forum. I recently wrote a [small package](https://github.com/oliverwm1/zarrdump) to make it easy to inspect metadata of zarr stores from the command-line. It was designed with xarray-dataset zarr stores in mind but also works with generic zarr stores. Pretty much a bare-bones ncdump for zarr:

```auto
$ zarrdump gs://my-bucket/dataset.zarr
<xarray.Dataset>
Dimensions: (lat: 73, lon: 144, time: 32)
Coordinates:
* lat (lat) float64 -90.0 -87.5 -85.0 -82.5 -80.0 ... 82.5 85.0 87.5 90.0
* lon (lon) float64 0.0 2.5 5.0 7.5 10.0 ... 350.0 352.5 355.0 357.5
* time (time) object 2016-12-01 00:00:00 ... 2017-01-01 00:00:00
Data variables:
    ps (time, lat, lon) float32 dask.array<chunksize=(4, 73, 144), meta=np.ndarray>
    ts (time, lat, lon) float32 dask.array<chunksize=(4, 73, 144), meta=np.ndarray>

```

I was getting tired of popping open a python console or notebook every time I wanted to remind myself the variables/dimensions/coordinates/attributes of some given dataset 🙃

I’m unaware of any other efforts in this direction, but I’d be interested if anyone is already thinking about this! And of course any feedback is welcome.

It’s available on PyPI: `pip install zarrdump`

Cheers,  
Oli

---

<div class="post-metadata">

**Author:** ![bvj](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@bvj](https://discourse.pangeo.io/u/bvj)\
**Post date:** [August 19, 2022, 7:54am UTC](https://discourse.pangeo.io/t/zarrdump-printing-metadata-of-zarrs-from-the-command-line/1066/2 "2022-08-19T07:54:55Z")

</div>

Hi Oli,

Nice work, I was looking for exactly this sort of thing - thanks! Have you seen anything similar to ncview that can be used on zarr stores?

Best wishes,  
Barry

---

<div class="post-metadata">

**Author:** ![oliverwm1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/oliverwm1/32/672_2.png) [@oliverwm1](https://discourse.pangeo.io/u/oliverwm1)\
**Post date:** [October 28, 2022, 6:22pm UTC](https://discourse.pangeo.io/t/zarrdump-printing-metadata-of-zarrs-from-the-command-line/1066/3 "2022-10-28T18:22:18Z")

</div>

Hi Barry, sorry for slow reply, just seeing this now. Glad zarrdump was useful for you.

I am not aware of any direct replacements for ncview that work with zarr stores. Probably your best bet would be to use holoviews within a jupyter notebook, but this involves multiple steps. It would be nice to be able to launch directly from the command line.

---

<div class="post-metadata">

**Author:** ![rabernat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/rabernat/32/22_2.png) [@rabernat](https://discourse.pangeo.io/u/rabernat)\
**Post date:** [October 30, 2022, 9:21pm UTC](https://discourse.pangeo.io/t/zarrdump-printing-metadata-of-zarrs-from-the-command-line/1066/4 "2022-10-30T21:21:18Z")

</div>

Since Zarr is now a valid storage backend for NetCDF, it’s conceivable that you could compile a version of ncview with Zarr support. Would be very curious to see this in action.

---

<div class="post-metadata">

**Author:** ![bvj](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@bvj](https://discourse.pangeo.io/u/bvj)\
**Post date:** [November 15, 2022, 1:40pm UTC](https://discourse.pangeo.io/t/zarrdump-printing-metadata-of-zarrs-from-the-command-line/1066/5 "2022-11-15T13:40:14Z")

</div>

Thanks both! Turns out [psy-view](https://github.com/psyplot/psy-view) works if you have zarr installed in your environment.

Although, in the [docs](https://psyplot.github.io/psy-view/ncview.html), it states that it is not as fast as ncview via X11. So compiling ncview with zarr support could still be useful and I have not tried.
