pyspeedy.callbacks.BaseCallback

class pyspeedy.callbacks.BaseCallback(*args, **kwargs)

Base callback class.

__init__(*args, **kwargs)

Constructor.

Parameters
interval: int

Interval, in time steps, for which the callback should be applied.

verbose: bool

If true, print debug and progress messages.

spinup_date: datetime or None:

End date of the spinup period. During the spinup the callback is ignored.

Methods

__init__(*args, **kwargs)

Constructor.

print_msg(msg)

Print debug message if verbose was set to True.

skip_flag(model_instance)

Return True when the callback excecution is skipped for this time step if - model_date < spinup_date - current_step % interval !=0