Theoretical results for the magnetization dynamics of a magnonic crystal formed by grooves on the surface of a ferromagnetic film, called a surface-modulated magnonic crystal, are presented. For such a system, the role of the periodic dipolar field induced by the geometrical modulation is addressed by using the plane-wave method. The results reveal that, under the increasing of the depth of the grooves, zones with magnetizing and demagnetizing fields act on the system in such a way that magnonic band gaps are observed in both Damon-Eshbach and backward volume geometries. Particularly, in the backward volume configuration, high-frequency band gaps and lowfrequency flat modes are obtained. By taking into account the properties of the internal field induced by the grooves, the flattening of the modes and their shift towards low frequencies are discussed and explained. To test the validity of the model, the theoretical results of this work are confirmed by micromagnetic simulations, and good agreement between both methods is achieved. The theoretical model allows for a detailed understanding of the physics underlying these kinds of systems, thereby providing an outlook for potential applications on magnonic devices.