The Disney movie "Finding Nemo" left out a few fascinating details about clownfish.

As North Carolina State fish biologist Patrick Cooney wrote on his blog The Fisheries:

Father and mother clownfish are tending to their clutch of eggs at their sea anemone when the mother is eaten by a barracuda. Nemo hatches as an undifferentiated hermaphrodite (as all clownfish are born) while his father transforms into a female now that his female mate is dead. Since Nemo is the only other clownfish around, he becomes a male and mates with his father (who is now a female). Should his father die, Nemo would change into a female and mate with another male.

Clownfish all begin life as male, but can all carry both female and male reproductive organs. In any given community, the female is the largest fish, the breeding male is the second-largest and the rest are sexually immature males. These immature males can turn into females if the alpha female dies.

The social structure of clownfish and its ability to change sex may be related to the clownfish's chosen habitat — the sea anemone. Clownfish have a symbiotic relationship with the stationary animal. The fish uses the toxic host to hide from predators, and in turn the fish helps the anemone breathe.

The presence of barracuda and other large fish in an ecosystem means the clownfish rarely leaves its host. That also means it would be difficult to find a new female to come into the group if the alpha dies. So their ability to change sex ensures that the dominant male does not have to wander into unsafe waters to find a mate — one of the immature males can just take that role.

This story has been revised.