A study of the ocean's water masses using data and models