Heterogeneous buoyancy-driven flows with dynamo action in a spherical shell modellng he earth's outer core