A systematic method to derive the Hamiltonian and Nambu form for the shallow
water equations, using the conservation for energy and potential enstrophy, is
presented. Different mechanisms, such as vortical flows and emission of gravity
waves, emerge from different conservation laws (CLs) for total energy and
potential enstrophy. The equations are constructed using exterior differential
forms and self-adjoint operators and result in the sum of two Nambu brackets,
one for the vortical flow and one for the wave-mean flow interaction, and a
Poisson bracket representing the interaction between divergence and geostrophic
imbalance. The advantage of this approach is that the Hamiltonian and Nambu
forms can be here written in a coordinate independent form