Skip to content

xarray accessor and helpers

Importing atlas registers an accessor at xr.Dataset.atlas (the side effect happens on the very first import atlas, so there's no extra setup). The accessor is a thin convenience wrapper around the Atlas.add_xr_dataset method.

import atlas, xarray as xr        # ds.atlas is registered here

ds = xr.Dataset(...)
with atlas.Atlas.create("/tmp/store") as atlas:
    ds.atlas.write(atlas, "jan_2024")           # accessor form
    atlas.add_xr_dataset(ds, "feb_2024")        # equivalent Atlas method

See xarray integration for the full storage conventions and dtype mapping.

ds.atlas.write

Append this Dataset to the open atlas store under name.

Equivalent to atlas.add_xr_dataset(self_ds, name, chunks).

atlas.init_tracing

Top-level helper for enabling the Rust core's structured logging. Useful when debugging a slow read path or verifying which chunks a lazy compute actually touched.

atlas.init_tracing("debug")           # everything at debug+
atlas.init_tracing("atlas_python=info")    # just atlas crate at info+
atlas.init_tracing()                  # re-read ATLAS_LOG / RUST_LOG env vars

Python-callable variant: atlas.init_tracing("debug") forces a filter directive regardless of env vars. Passing None re-reads env vars.