laststep = int((secondsperday - startsecs)/mdstep)
fullsteps = int((secondsperday - startsecs)/mdstep)
frac1 = (secondsperday - startsecs) - fullsteps*mdstep
frac2 = secondsperday - fullsteps*mdstep
& frac3/mdstep
firststep = laststep - secondsperday/mdstep + 1
numsteps = numsteps + frac4/mdstep
firststep = laststep - endsecs/mdstep + 1
integer mdstep
mdstep = int(modelstep)