We look into the problem of approximating a distributed parameter port-Hamiltonian system which is represented by a non-constant Stokes-Dirac structure. We here employ the idea where we use different finite elements for the approximation of geometric variables (forms) describing a infinite-dimensional system, to spatially discretize the system and obtain a finite-dimensional port-Hamiltonian system. In particular we take the example of a special case of the shallow water equations. ©2006 IEEE.