hydromt.readers.read_workflow_yaml#

hydromt.readers.read_workflow_yaml(path: str | Path, modeltype: str | None = None, defaults: dict[str, Any] | None = None, abs_path: bool = True, skip_abspath_sections: list[str] | None = None) tuple[str, dict[str, Any], list[HydromtModelStep]][source]#

Read HydroMT workflow yaml file.

Parameters:
  • path (StrPath) – Path to workflow yaml file.

  • modeltype (str, optional) – Model type (eg wflow, sfincs). If given, this overrules the modeltype specified in the workflow file, by default None

  • defaults (dict, optional) – Nested dictionary with default options, by default dict()

  • abs_path (bool, optional) – If True, parse string values to an absolute path if the a file or folder with that name (string value) relative to the config file exist, by default True

  • skip_abspath_sections (list) – These sections are not evaluated for absolute paths if abs_path=True, by default [“setup_config”]

Returns:

  • modeltype (str | None) – Model type (eg wflow, sfincs)

  • model_init (dict) – Model initialization options to be used when instantiating a hydromt.Model

  • steps (list of HydromtModelStep) – list of model steps to be executed. Can be passed to hydromt.Model.build and hydromt.Model.update.