RestartModule#

class fridom.framework.modules.RestartModule(realtime_interval: timedelta64 | None = None, modeltime_interval: timedelta64 | None = None, iteration_interval: int | None = None, restart_command: str | None = None, filename: str = 'model', directory: str = 'restart')[source]#

Bases: Module

__init__(realtime_interval: timedelta64 | None = None, modeltime_interval: timedelta64 | None = None, iteration_interval: int | None = None, restart_command: str | None = None, filename: str = 'model', directory: str = 'restart') None[source]#

Methods

__init__([realtime_interval, ...])

disable()

Enabling the module means that it will be executed at each time step.

enable()

Enabling the module means that it will be executed at each time step.

is_enabled()

Return whether the module is enabled or not.

reset()

Stop and start the module.

set_full_filename(it)

setup(mset)

Start the module

should_reload()

should_restart(mz)

start()

Start the module

stop()

Stop the module

update(mz)

Update the module

Attributes

diff_module

The differentiation module to be used by this module.

grid

The grid of the model settings

info

Return a dictionary with information about the time stepper.

interp_module

The interpolation module to be used by this module.

mset

The model settings

name

required_halo

name = 'Restart Module'#
setup(mset: ModelSettingsBase) None[source]#

Start the module

Description#

This method is called by the ModelSettings.setup() and sets the ModelSettings as well as the differentiation and interpolation modules.

should_restart(mz: ModelState) bool[source]#
should_reload() bool[source]#
reset() None[source]#

Stop and start the module.

set_full_filename(it: int) None[source]#
property info: dict#

Return a dictionary with information about the time stepper.

Description#

This method should be overridden by the child class to return a dictionary with information about the time stepper. This information is used to print the time stepper in the __repr__ method.