I think you must have blank lines in your input file, as the errors are saying that there is nothing to add to our variables and hence the zero total at the end.
Try throwing this in as the first line inside the while loop:
[[ "$line" ]] || continue
I thought I would also an awk version I threw together as well:
month = $1
day = $2
hour = $3
rate = $6
mon_sum[month] += rate
day_sum[month][day] += rate
hour_sum[month][day][hour] += rate
for( m in mon_sum)
print "Totals for the month of " m ":"
for( d in day_sum[m] )
print " Hourly totals for day " d ":"
for( h in hour_sum[m][d] )
print " Hour :- " h " has a hourly sum of :- "hour_sum[m][d][h]
print " Daily total is :- " day_sum[m][d]
print "Monthly total is :- " mon_sum[m]
You run this like so: