Massive waves battered California’s coastline, threatening communities from San Francisco to San Diego.