This paper studies the question how the zonal mean potential vorticity (PV) distribution in potential temperature (u) coordinates is established in the atmosphere by the interaction of diabatic processes (crossisentropic transport of mass) with adiabatic dynamical processes (isentropic transport of mass and potential vorticity substance). As an aid in dissecting this interaction, a simplified model of the general circulation is constructed, which contains parametrisations of radiative transfer, wave drag and water cycle. This model reproduces the following four observed features of the atmosphere below 10 hPa: (1) a permanently present eastward subtropical jet, which in winter is separated from an eastward stratospheric jet by a zone (referred to as the 'surf zone'), between u 0380 K and u 0550 K, where planetary wave drag reduces PV over the polar cap;(2) a stratospheric zonal wind reversal in spring or beginning of summer; (3) a tropical cold layer at 100 hPa, and (4) a realistic distribution of zonal mean cross-isentropic flow. The strength of the cross-isentropic flow depends on wave drag, latent heat release and the thermal inertia of both the atmosphere and the earth's surface. Of special interest is the layer between u0315 K and u 0370 K (the 'Middleworld'), which lies in the troposphere in the tropics and in the stratosphere in the extratropics. Mass converges diabatically into this layer in the deep tropics, mainly due to latent heat release, and diverges out of this layer elsewhere due to radiation flux divergence. Meridional isentropic vorticity flux divergence in the tropical Middleworld, associated with the upper branch of the Hadley circulation, creates a region in the subtropics, at u 0350 K and adjacent isentropic levels, with a marked isentropic meridional PV-gradient, forming the isentropic dynamical tropopause.