hydromodpy.physics.flow.flow_runtime_validators#

Pre-validators for the Boussinesq runtime knobs on FlowConfig.

These free functions implement the normalization logic for the 13 flat runtime_* / vi_* / ts_vi_* fields kept on FlowConfig for backward-compatible TOML payloads. Extracting them keeps flow_config.py focused on the field declarations.

Functions

normalize_bool(value, *, field)

Validate a boolean flag accepting common string forms.

normalize_positive_float(value, *, field, ...)

Validate a strictly-positive float with a default.

normalize_positive_float_or_none(value, *, field)

Validate an optional strictly-positive float override.

normalize_positive_int(value, *, field, default)

Validate a required strictly-positive integer with a default.

normalize_positive_int_or_none(value, *, field)

Validate an optional strictly-positive integer override.

normalize_runtime_backend(value)

Normalize the optional Boussinesq runtime backend selector.

normalize_surface_interaction_model(value)

Normalize the optional Boussinesq surface-interaction selector.