Metadata-Version: 2.3
Name: topozarr
Version: 0.2.0
Summary: Lightweight multiscale zarr
Requires-Dist: numpy
Requires-Dist: psutil>=5.9
Requires-Dist: pyproj
Requires-Dist: topozarr-core==0.2.0
Requires-Dist: xarray>=2025.9.0
Requires-Dist: xproj>=0.2.1
Requires-Dist: zarr>=3.2.1
Requires-Dist: boto3 ; extra == 'tutorial'
Requires-Dist: click ; extra == 'tutorial'
Requires-Dist: cloudpathlib[s3] ; extra == 'tutorial'
Requires-Dist: h5py ; extra == 'tutorial'
Requires-Dist: h5netcdf ; extra == 'tutorial'
Requires-Dist: icechunk>=1.1.19 ; extra == 'tutorial'
Requires-Dist: netcdf4 ; extra == 'tutorial'
Requires-Dist: obstore ; extra == 'tutorial'
Requires-Dist: pooch ; extra == 'tutorial'
Requires-Dist: virtualizarr ; extra == 'tutorial'
Requires-Dist: zarr ; extra == 'tutorial'
Requires-Dist: zarrs>=0.2.3 ; extra == 'zarrs'
Requires-Python: >=3.12
Provides-Extra: tutorial
Provides-Extra: zarrs
Description-Content-Type: text/markdown

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/carbonplan/topozarr/main/docs/assets/topozarr-lockup-on-dark.svg">
    <img src="https://raw.githubusercontent.com/carbonplan/topozarr/main/docs/assets/topozarr-lockup-on-light.svg" alt="topozarr" width="320">
  </picture>
</p>


<p align="center">
  <b>Create multiscale Zarr stores for web visualization.</b>
  <br>
  <a href="https://carbonplan.github.io/topozarr/">Documentation</a> ·
  <a href="https://carbonplan.github.io/topozarr/examples/categorical/">Examples</a> ·
  <a href="https://carbonplan.github.io/topozarr/releases/">Release notes</a>
</p>

`topozarr` turns an Xarray dataset into a multiscale [Zarr v3](https://zarr-specs.readthedocs.io/en/latest/v3/core/index.html) store, with each level 2x coarser than the last.

The stores follow the [GeoZarr](https://github.com/zarr-developers/geozarr-spec) conventions and are built for [`zarr-layer`](https://zarr-layer.demo.carbonplan.org/), which renders them directly in the browser.

## Installation

```bash
uv add topozarr
```

Or with pip: `pip install topozarr`.

## Quick example

```python
import xarray as xr
import xproj  # for CRS assignment
from topozarr import create_pyramid

ds = xr.tutorial.open_dataset("air_temperature").drop_encoding()
ds = ds.proj.assign_crs(spatial_ref="EPSG:4326")

pyramid = create_pyramid(ds, levels=2, x_dim="lon", y_dim="lat")
pyramid.write("pyramid.zarr")
```

See the [usage guide](https://carbonplan.github.io/topozarr/usage/) for cloud stores, tuning, and more.

## License

MIT. See the [LICENSE](LICENSE) file for details.

## About us

CarbonPlan is a nonprofit organization that uses data and science for climate action. We aim to improve the transparency and scientific integrity of climate solutions through open data and tools. Find out more at [carbonplan.org](https://carbonplan.org/) or get in touch by [opening an issue](https://github.com/carbonplan/topozarr/issues/new) or [sending us an email](mailto:hello@carbonplan.org).
