An algorithm for tracking fluid particles in a spectral simulation of turbulent channel flow