Metadata-Version: 2.4
Name: tensogram-xarray
Version: 0.17.0
Summary: xarray backend engine for tensogram .tgm files
Project-URL: Homepage, https://sites.ecmwf.int/docs/tensogram/main
Project-URL: Repository, https://github.com/ecmwf/tensogram
Project-URL: Documentation, https://sites.ecmwf.int/docs/tensogram/main
Author-email: ECMWF <software@ecmwf.int>
License-Expression: Apache-2.0
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Requires-Python: >=3.11
Requires-Dist: numpy
Requires-Dist: tensogram<0.18,>=0.17.0
Requires-Dist: xarray>=2022.06
Provides-Extra: dask
Requires-Dist: dask[array]; extra == 'dask'
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# Tensogram xarray Backend

xarray backend engine for Tensogram `.tgm` files — open a Tensogram
message or file as an `xarray.Dataset` with the native `engine="tensogram"`
hook, including Dask-backed lazy loading.

## Installation

```bash
pip install tensogram-xarray
# or, with Dask-backed lazy reads
pip install "tensogram-xarray[dask]"
```

The `tensogram` native package is pulled in automatically.

## Usage

```python
import xarray as xr

ds = xr.open_dataset("forecast.tgm", engine="tensogram")
print(ds)                    # coordinates, variables, CF attributes
print(ds["temperature"])     # standard xarray DataArray
```

With Dask for out-of-core reads:

```python
ds = xr.open_dataset("forecast.tgm", engine="tensogram", chunks="auto")
```

Multi-message files open as a single merged Dataset; coordinates and
dimensions are inferred from CF-style metadata when present.

## Documentation

- Full guide: https://sites.ecmwf.int/docs/tensogram/main/guide/xarray-integration.html
- Repository: https://github.com/ecmwf/tensogram

## License

Copyright 2026- ECMWF. Licensed under Apache-2.0.
