Sliding or stumbling on the staircase: numerics of ocean circulation along piecewise-constant coastlines