  We present a dynamo mechanism arising from the presence of barotropically
unstable zonal jet currents in a rotating spherical shell. The shear
instability of the zonal flow develops in the form of a global Rossby mode,
whose azimuthal wavenumber depends on the width of the zonal jets. We obtain
self-sustained magnetic fields at magnetic Reynolds numbers greater than 1000.
We show that the propagation of the Rossby waves is crucial for dynamo action.
The amplitude of the axisymmetric poloidal magnetic field depends on the
wavenumber of the Rossby mode, and hence on the width of the zonal jets. We
discuss the plausibility of this dynamo mechanism for generating the magnetic
field of the giant planets. Our results suggest a possible link between the
topology of the magnetic field and the profile of the zonal winds observed at
the surface of the giant planets. For narrow Jupiter-like jets, the poloidal
magnetic field is dominated by an axial dipole whereas for wide Neptune-like
jets, the axisymmetric poloidal field is weak.
