Rip currents on a barred beach