LOS ANGELES — Surfers here have long lived by a simple rule: When it rains, no matter how good the waves may be, stay out of the water. Those who do head out to the Venice Pier on a rainy day might have their bravery (or naïveté) repaid with pinkeye, a fever or diarrhea.

“The water will have this weird, funky smell to it,” said Sean Stanley, 26, who has been surfing here his entire life. “It’s murky. You’ll see soda cans and plastic bottles, oil from the cars. All the runoff from the city gets in there.”

Even in this water-starved region, storm and other runoff has become the primary source of water pollution. After the rare rains, runoff drags heavy metals, pesticides, cigarette butts, animal waste and other pollutants into streams and rivers and eventually to the Pacific Ocean, turning Los Angeles County’s beaches into the filthiest in the state.

But now, local officials are trying to deal with runoff pollution and another problem — the lack of drinking water — with an ambitious plan to make the runoff drinkable.