Long-time shallow-water equations with a varying bottom