To control its buoyancy, the submarine has ballast tanks and auxiliary, or trim tanks, that can be alternately filled with water or air. When the submarine is on the surface, the ballast tanks are filled with air and the submarine's overall density is less than that of the surrounding water.