A difference scheme for the mild-slope wave equation that governs the
combined diffraction and refraction of nearshore waves is derived base
d on the finite analytic method. The nine-point scheme expresses the v
alue of the dependent variable at the central point of a rectangular g
rid element as a linear combination of its values at the surrounding n
odes. The coefficients of the linear combination depend on the local w
ave number as well as the width-to-length ratio of-the grid element an
d are approximated, by Taylor expansion, as the polynomials of the rel
ative mesh size with coefficients being functions of the width-to-leng
th ratio of the grid element. Performance of the scheme is studied by
comparing the numerical results with the exact solution for a Dirichle
t problem and with the solution by separation of variables for the for
ced oscillation in a square basin. The scheme is also applied to the c
omputation of wave diffraction by the spherical shoal in a wave channe
l, on which carefully measured data in laboratory are available for co
mparison.