Index: wflow-py/wflow/wflow_bmi.py =================================================================== diff -u -r1779d0977fdb473bf98a99cc22853d83e9cec801 -r6feb4db7b1bd34e7acb019e3393dd5774bdd5fa9 --- wflow-py/wflow/wflow_bmi.py (.../wflow_bmi.py) (revision 1779d0977fdb473bf98a99cc22853d83e9cec801) +++ wflow-py/wflow/wflow_bmi.py (.../wflow_bmi.py) (revision 6feb4db7b1bd34e7acb019e3393dd5774bdd5fa9) @@ -21,7 +21,7 @@ """ config = ConfigParser.SafeConfigParser() config.optionxform = str - config.read(configfile) + ret = config.read(configfile) return config @@ -739,14 +739,18 @@ raise ValueError("Time more than one timestep before current time.") self.dynModel.wf_QuickResume() else: - timespan = time - curtime - nrsteps = int(timespan/self.dynModel.DT.timeStepSecs) + smethod = configget(self.config,'run','runlengthdetermination','intervals') + if smethod == 'steps': + timespan = time - curtime + self.dynModel.DT.timeStepSecs + else: + timespan = time - curtime + nrsteps = int(timespan/self.dynModel.DT.timeStepSecs) + 1 self.bmilogger.debug('update_until: update ' + str(nrsteps) + ' timesteps forward from ' + str(curtime) + ' to ' + str(curtime + timespan)) self.bmilogger.debug('update_until: step ' + str(self.currenttimestep) + ' to ' + str(self.currenttimestep + nrsteps -1)) self.dynModel._runDynamic(self.currenttimestep, self.currenttimestep + nrsteps -1) self.currenttimestep = self.currenttimestep + nrsteps - self.bmilogger.debug("XX - Current time now: " + str(self.get_current_time())) + def update_frac(self, time_frac): """ Not implemented. Raises a NotImplementedError