The driving forces of the thermohaline circulation in a semi-enclosed sea