On the origin of water masses in the Beaufort Gyre