  Wavy dielectric grating hosts bound states in the continuum (BICs) at nonzero
Bloch wave number. For oblique incident optical field with parameters near to
the BICs, the reflectance spectrum exhibits ultra-sharp Fano line shape, and
the reflected beam has large negative Goos-H$\ddot{a}$nchen shift, due to
excitation of the corresponding quasi-BIC with negative group velocity. Under
incidence of Gaussian beam with sizable beam width, the excited quasi-BIC could
travel a long distance along the direction of the Goos-H$\ddot{a}$nchen shift,
designated as $L_{GH}$, before the energy is completely radiated. If the length
between the termination of the wavy shape and the focus of the incident
Gaussian beam is smaller than $L_{GH}$, sizable energy flux can be coupled into
the waveguide mode of the flat dielectric slab that is connected to the wavy
dielectric grating. Measurement of the energy flux of the waveguide mode can
sense the variation of the refractive index of the background medium. The
proposed sensing scheme can be integrated with waveguide in optical circuit.
