Index: wflow-py/wflow/wflow_bmi.py =================================================================== diff -u -r42d3c1c35dbb2f934cbc815646e166e2c9bfa2c1 -r8de00630f14f2ad1ede84fc18395c2b7614dc875 --- wflow-py/wflow/wflow_bmi.py (.../wflow_bmi.py) (revision 42d3c1c35dbb2f934cbc815646e166e2c9bfa2c1) +++ wflow-py/wflow/wflow_bmi.py (.../wflow_bmi.py) (revision 8de00630f14f2ad1ede84fc18395c2b7614dc875) @@ -92,6 +92,7 @@ Return type string, compatible with numpy. Propagate the model one timestep? """ + # TODO: fix dt = -1 problem, what do we want here? #curstep = self.dynModel.wf_ if dt != -1: self.dynModel._runDynamic(self.currenttimestep, self.currenttimestep) @@ -458,6 +459,11 @@ """ curtime = self.get_current_time() + if abs(time - curtime)% self.dynModel.timestepsecs != 0: + self.bmilogger.error('update_until: timespan not dividable by timestep: ' + str(abs(time - curtime)) + + ' and ' + str(self.dynModel.timestepsecs)) + raise ValueError("Update in time not a multiple of timestep") + if curtime > time: timespan = curtime - time nrstepsback = int(timespan/self.dynModel.timestepsecs)