The local interference method (LIME) is introduced as a tool for simulating guided mode excitation by finite gratings in monomode waveguides. This efficient and versatile calculation scheme considers each grating line as a scattering center radiating into and from the forward-traveling waveguide mode, neglecting multiple scattering processes. This approximation considerably speeds up calculation time while delivering very good results for a broad range of calculation tasks, including non-periodic gratings or waveguides exhibiting small variations of the propagation constant. The algorithm is presented in detail, and it is applied to the calculation of the coupling line shapes of waveguide grating structures used for biochemical nsors, having small spatial non-uniformities.