[persistence] PersistenceConfig#

TOML section: [persistence]

Pydantic model: PersistenceConfig defined in hydromodpy.core.config_kit.persistence.

Source on GitHub

Orthogonal switch governing every persistence sink.

Toggles are independent: disabling save_zarr does not silence the catalog, and vice versa. save_catalog is the master switch for the project DuckDB; when False, every write through Catalog becomes a no-op.

Show fields:

Fields#

save_catalog

bool default = True user source

Persist DuckDB rows (simulations, parameters, metrics, calibration_iterations). When False, catalog writes are skipped.

save_zarr

bool default = True user source

Persist per-simulation field arrays (head, concentration, derived) into the Zarr store.

save_parquet

bool default = True user source

Persist per-simulation tabular outputs (timeseries, budgets, mass_balance) as Parquet files.

compression

str default = “zstd” dev source

Codec DECLARED for Zarr field arrays and Parquet tables. The writers carry their own codec (zstd) and do not read this field, so changing it changes nothing today; it records the intent and is the field a writer would read once the choice is threaded through.

One of: "none" "zstd" "lz4" "gzip" "snappy"

compression_level

int default = 5 dev source

Compression level DECLARED for those writers. Same as the codec: core/io/parquet.py and core/io/geoparquet.py hold level 5 and do not read this field. The default says 5 rather than 3 so the declaration at least matches the bytes actually written.

Starter TOML snippet#

Click to expand a copy-pasteable [persistence] TOML skeleton

Copy this block into your project.toml and uncomment the lines you want to set. Sub-tables ([parent.subfield]) appear in the order Pydantic expects them.

[persistence]
# save_catalog = true
# save_zarr = true
# save_parquet = true

Entity-relationship diagram#

ER diagram for PersistenceConfig

Click to zoom and pan. Press Esc or click outside to close.