The world's first coral reef seethed in its 3,000-gallon tank while its master, Dr. Walter H. Adey, explained it to reporters yesterday at the Smithsonisn's National Museum of Natural History.

"This is not just a hotel for fish," he said. Behind him, anemones pulsed and reeds swayed as he artificial surf sent another wave surging into the tank. Brain coral stood its ground stolidly. A bare human arm suddenly reached down into the rolling water to adjust a sensor.

In the still water of the adjacent lagoon department, a furious damsel fish, just uprooted from another tank where it had established a model algae far, set about starting its life all over again.

Marine biologists had been trying to make artificial coral reef communities for years and years. Finally, Adey, 46, discovered that what keeps a real coral reef going is the "algal lawn" on its bottom, turning wastes and sunshine into oxygen, plus the waves, provide crucial circulation.

After years of tinkering with models, he built his big tank, filled it with Chincoteague water, three tons of coral rubble and 200 species of plants and animals. Then he organized an automated bucket brigade to dump pails of water, now separately, now in unison, to simulate the irregularity of the surf. Huge halide lights make a sun that comes on gradually at dawn and fades slowly at dusk while daytime creatures scuttle into the reef and night marauders emerge.

A key feature of Adey's community is a kind of dialysis machine, plastic screens coated with algae, over which the water is circulated during the "night" to remove ammonia and carbon dioxide and nutrients that would otherwise accumulate too fast and bloom next day. This algai scrubber is so vital that the Smithsonian is trying to patent it.

Behind the long tank and a movie strip that explains the work is a lab for Adey and his staff.

"this colonial system is about three months old," he said. "Within a year we should have 300 species going. We know it will happen because we have a pilot tank in the basement."

The $118,000 system is about at the growth stage of a typical Caribbean reef hit by a hurricane a year ago. It comes back fast.

The controlled reef could be as significant as the first plow, for it could lead the way to the ocean farms so beloved of futurists.

Adey, who comes from Newfoundland fisher stock, wants to build a Pacific reef system, and he has at his disposal a 100-foot research vessel, not to mention a plane and a trimaran he built himself. He likes to build things. At 14 he built a cyclotron in his cellar, and when it didn't work he converted it into a mass spectrometer.

Unable to major in oceanography at MIT, he started in geophysics and architecture, switched to paleontology and music (piano) graduate studies and finally got his doctorate at the University of Michigan in marine botany and geology.

Adey, who lives in McLean, spends as much time as he can at the former tuna boat, the resolute, his research ship, moored off Maine Avenue.

"We take off in chunks of time," he said, meaning himself, his wife and collaborator, Patricia, and their two sons. "We were in the Caribbean from '72 to '75. We want to get back to sea again. We're thinking about some work in the Gulf Stream, if we can raise the money."

In the summer there is always Maine. At this very moment he has a working Maine sea bottom, complete with kelp and lobster, in the Smithsonian basement.