The Hamiltonian for two-dimensional long waves over a slowly varying d
epth is derived. The vertical variation of the velocity field is obtai
ned by using a perturbation method in terms of velocity potential. Emp
loying the canonical theorem, the conventional Boussinesq equations ar
e recovered. The Hamiltonian becomes negative when the wavelength beco
mes short. A modified Hamiltonian is constructed so that it remains po
sitive and finite for short waves. The corresponding Boussinesq-type e
quations are then given.