A Lattice Boltzmann model is developed for solving the advection-diffusion equation and other for shallow water equations. First we explore the validity of each model separately with classic problems in oceanography with analytical solutions such as tidal flow in a channel with irregular bottom and the diffusion of a Gaussian pulse in a rotating flow, among others. Then the two models are coupled and we solve the advection-diffusion of a concentration peak in shallow water under a uniform flow in a square cavity, showing the capability of the coupled model to reproduce problems of substance transport in shallow water flows.