hydromodpy.results.zarr_store.zarr_schema#

Schema concerns for SimulationZarr.

Owns the on-disk layout contract: ZARR_SCHEMA_VERSION enforcement, _SUBGROUPS materialisation on init, and the strict root-open helper that validates the schema version on every reopen.

Pure functions; no instance state is held here.

Functions

child_zarr_path(target, name)

Concatenate the Zarr-internal path of target with name.

ensure_local_zarr_node_dir(store_path[, ...])

Pre-create a directory node under a local Zarr store (no-op for zip).

initialise_root(path, *, n_cells, n_layers, ...)

Create the on-disk store with the v2 layout and return its handles.

is_zip_store_path(path)

Return True for paths that resolve to a packed .zarr.zip archive.

local_store(path, *[, read_only])

Return the HydroModPy local Zarr store implementation for path.

local_store_path_arg(path)

Format a local-store path argument for zarr.storage.LocalStore.

open_root_strict(store, *, read_only)

Open the root group of store and validate the schema version.

update_attrs(node, attrs)

Apply one merged metadata write to a Zarr group/array.

windows_long_path(path)

Return a Windows extended-length path when needed by local stores.

Classes

RetryingLocalStore(*args, **kwargs)

Local Zarr store with short retries for transient Windows file locks.