The three-dimensional structure of an electromagnetically generated dipolar vortex in a shallow fluid layer