When applied to the grid-points near the surface, the spatial operators are folded back (reflected) in the following way: The part of the operator that operates in the z component of the wavefield retains its original polarity, while the part that operates in the x component has its polarity reversed (see Figure -a).
The source term is introduced as an additive contribution to the wavefield at the source location, during the time span in which the source is considered active. To avoid spatial aliasing (and also to allow the definition of a pressure source) the source needs to be spatially smooth, that is, covering a determined region of space. When the source is located sufficiently close to the surface (as is usually the case in the real world) the free-surface image of the source will be also active in the bottom space where the model is defined, as Figure -b shows. Therefore, the source term needs to be introduced as the sum of the contributions of the real source and of its image in the model space region.