hydromt_delwaq.DemissionModel.update#

DemissionModel.update(model_out: str | Path | None = None, write: bool | None = True, opt: Dict | None = None, forceful_overwrite: bool = False)#

Single method to update a model based the settings in opt.

Methods will be run one by one based on the order of appearance in opt (ini configuration file).

All model methods are supported including setup_*, read_* and write_* methods. If a write_* option is listed in opt (ini file) the full writing of the model at the end of the update process is skipped.

Parameters:
  • model_out (str, path, optional) – Destination folder to write the model schematization after updating the model. If None the updated model components are overwritten in the current model schematization if these exist. By default None.

  • write (bool, optional) – Write the updated model schematization to disk. By default True.

  • opt (dict, optional) –

    Model build configuration. The configuration can be parsed from a

    .ini file using configread(). This is a nested dictionary where the first-level keys are the names of model specific methods and the second-level contain argument-value pairs of the method.

    {
        <name of method1>: {
            <argument1>: <value1>, <argument2>: <value2>
        },
        <name of method2>: {
            ...
        }
    }
    
    forceful_overwrite:

    Force open files to close when attempting to write them. In the case you try to write to a file that’s already opened. The output will be written to a temporary file in case the original file cannot be written to.