diff --git a/pyDeltaRCM/_version.py b/pyDeltaRCM/_version.py index 1de6099a..b368a9d3 100644 --- a/pyDeltaRCM/_version.py +++ b/pyDeltaRCM/_version.py @@ -4,4 +4,4 @@ def __version__(): Private version declaration, gets assigned to pyDeltaRCM.__version__ during import """ - return '2.1.2' + return '2.1.3' diff --git a/pyDeltaRCM/hook_tools.py b/pyDeltaRCM/hook_tools.py index 43cf0827..e26c0e0a 100644 --- a/pyDeltaRCM/hook_tools.py +++ b/pyDeltaRCM/hook_tools.py @@ -247,6 +247,15 @@ def hook_init_output_file(self): """ pass + def hook_after_create_domain(self): + """Hook called *after* :obj:`~pyDeltaRCM.init_tools.init_tools.create_domain`. + + Unlike the standard model hooks, this hook is called *after* the + domain has been created with the + method :obj:`~pyDeltaRCM.init_tools.init_tools.create_domain` + """ + pass + def hook_after_route_water(self): """Hook called *after* :obj:`~pyDeltaRCM.water_tools.water_tools.route_water`. @@ -264,3 +273,16 @@ def hook_after_route_sediment(self): method :obj:`~pyDeltaRCM.sed_tools.sed_tools.route_sediment` """ pass + + def hook_after_finalize_timestep(self): + """Hook called *after* :obj:`~pyDeltaRCM.iteration_tools.finalize_timestep`. + + Unlike the standard model hooks, this hook is called *after* the + finalize timestep method has completed. + + .. hint:: + + This is the last method called before logging and outputting data + for each timestep. + """ + pass diff --git a/pyDeltaRCM/model.py b/pyDeltaRCM/model.py index 62c674d6..ab3b39c7 100644 --- a/pyDeltaRCM/model.py +++ b/pyDeltaRCM/model.py @@ -113,6 +113,7 @@ def __init__(self, input_file=None, defer_output=False, **kwargs): # create the model domain based on configuration self.hook_create_domain() self.create_domain() + self.hook_after_create_domain() # initialize the sediment router classes self.init_sediment_routers() @@ -194,6 +195,7 @@ def update(self): self.hook_finalize_timestep() self.finalize_timestep() + self.hook_after_finalize_timestep() # update time-tracking fields self._time += self.dt