We describe the space discretization of a three-dimensional baroclinic finite element model, based upon a discontinuous Galerkin method, while the companion paper (Comblen et al. 2010a) describes the discretization in time. We solve the hy- drostatic Boussinesq equations governing marine flows on a mesh made up of triangles extruded from the surface toward the seabed to obtain prismatic threedimensional elements. Diffusion is implemented using the symmetric interior penalty method. The tracer equation is consistent with the continuity equation. A Lax-Friedrichs flux is used to take into account internal wave propagation. By way of illustration, a flow exhibiting internal waves in the lee of an isolated seamount on the sphere is simulated. This enables us to show the advantages of using an unstructured mesh, where the resolution is higher in areas where the flow varies rapidly in space, the mesh being coarser far from the region of interest. The solution exhibits the expected wave structure. Linear and quadratic shape functions are used, and the extension to higher-order discretization is straightforward.