Temperature, salinity, and density are the key variables describing the state of the ocean.  Density is a function of both temperature and salinity.  As water warms, it expands and becomes less dense.  Dissolved salts are heavier than water, so density increases with salinity.