You know the intervals when doing the model temperature calculation, so there is never a reason for an interval to be entirely outside the range of model temps.  For short intervals (less than the 328 sec model timestep) you can (should) cheat a little and always compute the max over the range `i_start:i_stop + 1`.  That guarantees there is always at least one element in your slice range.