Data Loading Architecture#
This section documents how the project and runtime layers decide which data families must be active and where concrete data objects are stored for downstream use.
Open it when you want:
the split between planning-time activation and runtime loading;
the transfer points between loaded data, domain objects, and the
Projectruntime state;the code path from
[data]config to consumed runtime payloads.
Code map#
hydromodpy/data/planner.pyandplan.py: activation inference and immutable plan creation.hydromodpy/data/runtime_loader.py: data-family dispatch duringProject.load_data().hydromodpy/data/data_managers.py: loaded-data container published to runtime state.hydromodpy/project/facade.py: orchestration ofsetup_workspace/build_geographic/load_data.hydromodpy/physics/flow/structure_binders.py: example downstream consumer that expects transferred structures.
Recommended reading path#
hydromodpy/data/data_managers_config.pyhydromodpy/data/planner.pyhydromodpy/data/runtime_loader.pyhydromodpy/project/facade.pyone bound family such as
hydromodpy/data/variables/geology/orhydromodpy/data/variables/hydrometry/
Class diagram: definition and transfer#
This static view documents the collaboration that defines which data must be prepared, then transfers those data objects to the runtime state where they are consumed.
It focuses on:
data-type inference and normalization (
DataPlanner->DataLoadPlan);transfer of resolved data types into the project runtime state;
setup-time transfer for geology (
GeologyField->Domain.set_zone);data-phase transfer for hydrometry (
StationSet->Project.loaded_data.hydrometry).
Notes:
DataLoadPlandefines which data families are active._run_setup,DataManagersRuntimeLoader, and binders define where corresponding objects are stored.Geology is transferred into
Domainas a zone used by process solvers.Hydrometry is transferred into the
Projectloaded-data state for diagnostics and downstream use.
Activity diagram: definition and transfer#
This control-flow view documents the activation of data families and the transfer of concrete data objects to the right runtime holders.
It focuses on:
planning-time activation (
DataPlanner.build);setup-time geology transfer to
Domain;data-phase transfer of hydrometry to the
Projectruntime loaded-data state;continuation into simulation execution after data placement is complete.
Notes:
The same raw TOML can influence both activation inference and data payloads.
Geology transfer is driven by resolved data types at setup time.
Hydrometry transfer is implemented by
DataManagersRuntimeLoaderduringProject.load_data().Missing or invalid hydrometry configuration can be downgraded to warnings in
data.inference_mode = "warn"mode.