Propagation of solitary waves over underwater ridges