what 2 factors affect the density of ocean water