Potential issue in some Step Controllers
All step controllers have a function called initialize_dt_model (or they use the one in the base class). Inside some of them self.t_model_last is initialized to t0. This seems correct to me. However, some step controllers don't do this. For example Min_dt_controller doesn't do this. As a result, if one runs a single model simulation based on this step controller and then try to hot start, the simulation doesn't behave properly. In particular, the first time step dt is set to t which is clearly wrong and leads to instabilities (dt is too large in this situation).
Thanks. I'll take a look. Did you try applying that fix in Min_dt_contorller?
Yes. I did that very simple fix and it worked. I was trying to restart some shallow water simulations but I kept getting negative water heights. After some debugging I realized the time step was large because of that reason and that created the problem. I thought on doing a PR but I can't be sure if this is a bug or if not setting self.t_model_last=t0 is intentional. Indeed some step controllers call some functions from the model within initialize_dt_model. That made me think that maybe the intention is for the model to set t_model_last=t0.