The waves keep rolling in as fast and smooth as ever here, and the sun and the ocean breezes still never let up, but make no mistake, there is no joy on the sands of Surf City this summer.

Miles of this famed beach, one of the most popular in the country, have been deserted for weeks and its shoreline has been declared strictly off limits until authorities can figure out why hazardous bacteria are contaminating the water.

It is a familiar Southern California drama--natural splendor under siege from relentless pollution--and by the bleak look of things it may not end soon.

That would be cause for gloom in any beach town at this peak time of year, but there are few places on Earth that worship the surf as much as this one.

This is, after all, the home of the International Surfing Museum, the star-studded Surfer Walk of Fame, and a city that announces itself along the Pacific Coast Highway with a grand statue of a crouched surfer riding a sculpted wave. The discovery of mysterious bits of sewage in what has long been the heart of California's fabled beach culture is not merely an environmental mess. It has become a spiritual crisis the likes of which Huntington Beach has never seen.

A few young mothers waiting one morning this week for their daughters to finish beach volleyball practice, as mothers often do in these parts, framed the mood just right as they stared in disbelief at the gleaming but empty surf.

"This is totally weird," said one.

"Totally," said another.

The trouble began two months ago. At first it seemed minor because bacteria were found only along a small portion of the beach. But since then, signs of the same threat to swimmers and surfers have turned up elsewhere, leading officials to invoke a tough new California law on clean water standards. Now, more than four miles of golden coastline--and nearly all of Huntington Beach--is sealed with a long ribbon of yellow police tape snapping in the summer wind.

Work crews are tearing up asphalt parking lots near the beach to inspect underground sewer lines, which is creating a nasty stench, and scientists are poking around the foamy waters just off shore with drills and sonar equipment in a frantic search for the source of the problem.

Some officials believe it could be rusted or cracked pipes that run from a sewage plant that operated near the coast many years ago. The results of tests of the ocean waters have improved in the past few days, but much of the beach may still be closed for Surf City's traditionally huge summer finale over Labor Day weekend.

"It has been very frustrating," said Huntington Beach Mayor Peter Green, who teaches biology at a local community college. "We're testing the water twice a day, but we still haven't found the hot spot where this may be coming from."

The investigation already has cost $400,000, and the sewage leak is one of the worst in Orange County's history. It is also slowly but surely strangling the local economy, which depends almost entirely on tourism. Huntington Beach, which is about 50 miles south of Los Angeles, usually draws more than 10 million visitors a year, but lately that mighty flow has been reduced to just a trickle.

Lifeguards have nothing better to do than to sweep sand from their towers. Lonely snack bar cashiers read cheap paperback novels all day. Bronzed teenagers drive up now and then, see no change along the shore and leave with their boards and towels in tow. Even the birds crowding the old pier look bored.

"I've never seen a beach closing this big," said Shawn Bradbery, 31, of New Hampshire, who is spending the summer here. He was taking a break from a bike ride. "And I've never seen the waves here without any surfers on them."

Surfing events are being canceled, parking rates have been cut from $7 to $1 a day in most city lots, and merchants are rushing to stage a few beach concerts in a desperate attempt to lure more people back to the sand, if not the water.

"The beach is open! Only the water is closed!" exclaimed Michael Ali, one of many exasperated business owners here. He was sitting outside one of his empty surf shops with two friends who had come by to help him pass the time. Big band tunes warbled from a radio propped on a counter as the sad old men stared at the sea.

Ali rents dozens of surfboards, wet suits and pairs of in-line skates, and usually at this time of year his stock turns over four times a day, seven days a week. It is all just sitting there now. Ali, a prominent merchant in Huntington Beach for decades, said his financial losses are bad and getting worse. He called the season the worst since a tanker spilled oil near the coastline here in 1990.

"My summer, you can kiss goodbye," he said. "Business is down 90 percent. It's too late to recover."

His friend tried to improve his morale. "These beaches are still the best," he said. "People talk about Florida. Florida? It has that humidity. And it has those bugs--mosquitoes, flies. Do you see any flies here? Do you see one fly?"

There were no flies.

"That is the kind of positive message we must get out," Ali said.

Southern Californians tend to be an optimistic bunch. And even with police tape blocking the path to the surf, even with the whiff of sewage in the air, some have been coming to their beloved beach and making the best of it.

Matt Cisowski and three friends, all firemen on an off day, spent one morning this week playing volleyball in the sand for hours. Yes, there was hardship.

"We can't run into the ocean to get all of this sand off," Cisowski said.

But the group had managed to find a bright side to Huntington Beach's plight.

"Look at all the open nets out here now," said John Wiegland.

A short walk away, Katie Fortney and her sister Patti, both teenagers, had just finished an 80-mile drive from scorching hot Riverside, Calif., to their favorite beach--only to discover that the ocean was still out of their reach.

They were not leaving, though. They had just begun to march across the sand, carrying sacks of towels and magazines. "At first when I saw this, I told my sister that we weren't going to stay long," said Katie, 17. "Then I changed my mind. All it really means is that we can spend more time working on our tans."

But nothing seemed to lift the spirits of Michael Ali, no matter what his old friends kept telling him. He said he needed to get away from the water troubles of Surf City and had begun planning a short vacation trip with his family.

Suddenly, his friends sat up straight in their chairs along the empty and windswept beach. They were braced to hear him announce a decision that in this part of the world, even in hard times, is considered an act of sacrilege.

"For the first time," Ali said, ashamed. "I am going to the mountains."

CAPTION: The bacteria problem has crashed the usual party atmosphere at Huntington Beach, which for years has been identified with Southern California's sun, sand and surf lifestyle.

CAPTION: A visitor stares past warning signs and yellow tape that block his access to the water at Huntington Beach, Calif. Bacterial contamination from an unknown source is to blame.