hydromt.model.ModelRoot#

class hydromt.model.ModelRoot(path: Path, mode: ModelMode | str = 'w')[source]#

Handle model roots in a cross platform manner.

Parameters:
  • path (Path) – The path to the root of the model.

  • mode (ModelMode | str, optional) – The mode of the model (e.g. ‘r’ for reading, ‘w’ for writing etc.), by default “w”.

__init__(path: Path, mode: ModelMode | str = 'w')[source]#

Methods

__init__(path[, mode])

is_override_mode()

Test whether we are in override mode or not.

is_reading_mode()

Test whether we are in reading mode or not.

is_writing_mode()

Test whether we are in writing mode or not.

set(path[, mode])

Set a new model root and mode.

Attributes

mode

The mode of the model this object belongs to.

path

Return the path of the model root.