There are two main considerations for the location of an explosion: height and surface composition. A nuclear weapon detonated in the air, called an air burst, produces less fallout than a comparable explosion near the ground. A nuclear explosion in which the fireball touches the ground pulls soil and other materials into the cloud and neutron activates it before it falls back to the ground.  An air burst produces a relatively small amount of the highly radioactive heavy metal components of the device itself.
In case of water surface bursts, the particles tend to be rather lighter and smaller, producing less local fallout but extending over a greater area. The particles contain mostly sea salts with some water; these can have a cloud seeding effect causing local rainout and areas of high local fallout. Fallout from a seawater burst is difficult to remove once it has soaked into porous surfaces because the fission products are present as metallic ions that chemically bond to many surfaces. Water and detergent washing effectively removes less than 50% of this chemically bonded activity from concrete or steel. Complete decontamination requires aggressive treatment like sandblasting, or acidic treatment. After the Crossroads underwater test, it was found that wet fallout must be immediately removed from ships by continuous water washdown (such as from the fire sprinkler system on the decks).
Parts of the sea bottom may become fallout. After the Castle Bravo test, white dust—contaminated calcium oxide particles originating from pulverized and calcined corals—fell for several hours, causing beta burns and radiation exposure to the inhabitants of the nearby atolls and the crew of the Daigo Fukuryū Maru fishing boat. The scientists called the fallout Bikini snow.
For subsurface bursts, there is an additional phenomenon present called "base surge". The base surge is a cloud that rolls outward from the bottom of the subsiding column, which is caused by an excessive density of dust or water droplets in the air. For underwater bursts, the visible surge is, in effect, a cloud of liquid (usually water) droplets with the property of flowing almost as if it were a homogeneous fluid. After the water evaporates, an invisible base surge of small radioactive particles may persist.
For subsurface land bursts, the surge is made up of small solid particles, but it still behaves like a fluid. A soil earth medium favors base surge formation in an underground burst. Although the base surge typically contains only about 10% of the total bomb debris in a subsurface burst, it can create larger radiation doses than fallout near the detonation, because it arrives sooner than fallout, before much radioactive decay has occurred.