Ocean-circulation model of the carbon cycle