hydromodpy.results.zarr_store.zarr_finalizer#

Finalization concerns for SimulationZarr.

Owns lifecycle: write-lock acquisition, consolidate_metadata, pack_to_zip (directory store -> .zarr.zip), and close.

All helpers take the live SimulationZarr (or its store/lock) explicitly so the module stays free of hidden global state.

Functions

close(store_obj)

Close the live store and invoke any on-close callback.

consolidate_metadata(store, path)

Consolidate Zarr metadata into a single .zmetadata entry.

guard_write(lock, path)

Return a context manager that holds the cross-process filelock.

pack_to_zip(store_obj)

Compact the directory-based Zarr store into a .zarr.zip file.

Classes

DummyLock()

No-op lock used for zip stores (read-only by construction).