Project vs Run#
HydroModPy V1 names every level of the hierarchy explicitly so the API stops overloading the word “simulation”. The contract is workspace > project > run.
Three levels#
Level |
Object |
Role |
|---|---|---|
1 |
Workspace |
Root directory with |
N |
Project |
One |
N |
Run |
One simulation result in the project catalog, identified by
UUID v7. Built by |
Programmatic flow#
import hydromodpy as hmp
project = hmp.Project("~/ws/projects/canut/hydromodpy.toml")
# Setup-once / run-many: share the context between runs
baseline = project.simulate(K=5e-5, name="baseline")
sensitivity = project.simulate(K=1e-4, name="K_up")
project.close()
# Open-and-query: jump straight to any run
catalog = hmp.open("~/ws/projects/canut")
best = catalog.best(metric="nse")
# Read a field through the V1 facade
head = hmp.read(best, "head", timestep=0)
CLI equivalents#
CLI |
Python |
|---|---|
|
|
|
|
|
|
|
|
|
|