hydromt.model.Model.build#

Model.build(*, write: bool | None = True, steps: List[Dict[str, Dict[str, Any]]])[source]#

Single method to build a model from scratch based on settings in steps.

Methods will be run one by one based on the /order of appearance in steps (configuration file). For a list of available functions see The model API and The plugin documentation

By default the full model will be written at the end, except if a write step is called for somewhere in steps, then this is skipped.

Note that the * in the signature signifies that all of the arguments to this function MUST be provided as keyword arguments.

Parameters:
  • write (bool, optional) – Write complete model after executing all methods in opt, by default True.

  • steps (Optional[List[Dict[str, Dict[str, Any]]]]) –

    Model build configuration. The configuration can be parsed from a configuration file using configread(). This is a list of nested dictionary where the first-level keys are the names of the method for a Model method (e.g. write) OR the name of a component followed by the name of the method to run separated by a dot for ModelComponent method (e.g. grid.write). Any subsequent pairs will be passed to the method as arguments.

    [
        - <component_name>.<name of method1>: {
            <argument1>: <value1>, <argument2>: <value2>
        },
        - <component_name>.<name of method2>: {
            ...
        }
    ]