A scheme is presented for solving the equation for barotropic ocean ci
rculation, taking into account the special character of the problem: n
early inviscid motion following f/H contours in the ocean interior, wi
th viscous effects closing the flow near western boundaries. Using a s
pecial compact finite-difference discretization, the scheme generates
boundary layers without spurious oscillations and without demanding ve
ry high resolution. Sharp changes in topography and closed f/H contour
s (e.g., in the vicinity of high sea mounts) are also handled by the s
cheme in a way that localizes errors due to underresolved topographic
features. Strategies are formulated for simplifying the connectedness
of the domain by ''sinking'' the islands.