The flooding , the worst in California 's wine country in two decades , turned hundreds of dormant vineyards into small lakes and threatened to inundate tens of thousands of acres of farmland in Sonoma and Napa counties .