The interaction between global warming and the thermohaline circulation