Modeling complex hydrodynamic processes in coastal systems is an important problem of mathematical modeling that cannot be solved analytically. The approximation of convective terms is difficult from the point of view of error reduction. This paper proposes a difference scheme based on a linear combination of the Upwind Leapfrog scheme with 2/3 weight coefficient, and the Standard Leapfrog scheme with 1/3 weight coefficient. The weight coefficients are obtained as a result of solving the problem of minimizing the approximation error. Numerical experiments show the advantage of the developed scheme in comparison with other modifications of the Upwind Leapfrog scheme in the case when the convective transport prevails over the diffusion one. The proposed difference scheme solves transport problems more effectively than classical difference schemes in the case when the Péclet number falls in the range from 2 to 20. It follows that the considered difference scheme allows hydrodynamic problems to be solved in regions of complex shape effectively.