hmp.spinup()#

spinup(
source,
*,
base=None,
spinup=None,
name_prefix='spinup',
then_run=False,
headless=True,
environment=None,
)[source]#

Run a cyclic spin-up, and a production run from its state when asked.

Repeats the representative window ([spinup] window_*, else [simulation.time]), each cycle from the state of the one before, until the heads and the lake stage converge. One project is kept so the mesh is the same across cycles.

Parameters:
  • source (Source) – A TOML file, a document as a mapping or JSON text, or a validated HydroModPyConfig.

  • base (PathLike | None) – The folder the relative paths of the document are read from.

  • spinup (SpinupConfig | Mapping[str, Any] | None) – Settings that replace the [spinup] section, as a mapping or as a SpinupConfig.

  • name_prefix (str) – Prefix of the run name of each cycle.

  • then_run (bool) – Chain a production run from the converged state, over [simulation.time].

  • headless (bool) – Draw no figure.

  • environment (Environment | None) – The environment of the call. None builds the default of the machine.

Returns:

SpinupResult – The outcome of the loop, restart_from included, and the sim_id of the production run when one was chained.

Return type:

SpinupResult

Keyword arguments and command-line flags#

The twin command is hmp spinup.

KeywordDefaultCommand-line flagAccepted by
baseNoneno flagevery form
spinupNoneno flagevery form
name_prefix'spinup'no flagevery form
then_runFalse--then-runevery form
headlessTrueno flagevery form
environmentNoneno flagevery form