  We present a unified three-dimensional model of the convection zone and upper
atmosphere of the Sun in spherical geometry. In this model, magnetic fields,
generated by a helically forced dynamo in the convection zone, emerge without
the assistance of magnetic buoyancy. We use an isothermal equation of state
with gravity and density stratification. Recurrent plasmoid ejections, which
rise through the outer atmosphere, is observed. In addition, the current
helicity of the small--scale field is transported outwards and form large
structures like magnetic clouds.
