hmp.stop()#

stop(ref, *, workspace=None)[source]#

Ask a running run or calibration session to stop, and return its flag.

The call writes <run or session>/.hmp/stop.json and returns at once. A run reads the flag between two steps, between two runs of its plan and, through libmf6 or Boussinesq, between two time steps; it ends aborted and hmp.run(..., resume=ref) takes it up again. A session reads it between two batches of trials.

Parameters:
  • ref (str | PathLike[str] | Run | Session | RunSet | Project) – A run or a session: its directory, its name in workspace (<name>[_vN], runs/<name>, sessions/<case>[_vN]; a bare name is looked for among the runs first), or the object.

  • workspace (str | PathLike[str] | None) – The project directory, or a folder inside it.

Returns:

pathlib.Path – The flag written, <dir>/.hmp/stop.json.

Raises:

hydromodpy.core.exceptions.NothingThereError – If ref names no run and no session, or one that is not running.

Return type:

Path

Keyword arguments and command-line flags#

The twin command is hmp stop.

KeywordDefaultCommand-line flagAccepted by
workspaceNone-w --workspaceevery form