"Is there an obvious solution I'm missing?"
Not necessarily so obvious solution, but an apparent problem...
reshape(GridOut.runoff_hourly,24,(datasize/24))
unless mod(datasize,24) == 0, then there will be a remainder in the second argument to reshape given the message is what it is, that's pretty clearly the issue. You should use the [] syntax in cases like this any way, but that won't solve the problem of mismatched data sizes.
reshape(GridOut.runoff_hourly,24,[]) % let Matlab determine second dimension...
About all you can do in such a case is to use only the
Ndays=fix(length(runoff_hourly)/24);
as the number of elements such as
reshape(GridOut.runoff_hourly(1:Ndays),24,(datasize/24))
and then treat the remaining partial day values independently or ignore them as not being full 24-hr day. Of course, you'll want to ensure the first entry corresponds to the first element for the day; otherwise you'll need to locate it and the last element of the last full day.
