A dock is an enclosure of water in a port or harbor in which a ship may be berthed for maintenance or loading. Where access to the hull is required, a dry dock may be used. Usually this is a basin of water dug into the shore of a water channel, from which it can be closed off by a gate: the ship is floated in, the gate closed and the water pumped out. Floating dry docks are trough-like structures which can, by use of ballast, be partly submerged: with the ship inside, the dock is drained and the ballast discarded. In all cases, the ship must be supported before pumping dry.