fullsteps = int((secondsperday - startsecs)/mdstep)
numsteps = fullsteps
frac1 = (secondsperday - startsecs) - fullsteps*mdstep
fullsteps = int(secondsperday/modelstep)
frac2 = secondsperday - fullsteps*mdstep
numsteps = numsteps + (iday - 1)*fullsteps +
numsteps = numsteps + (iday - 2)*fullsteps
laststep = numsteps + fullsteps
integer fullsteps