Mads Ostberg took the lead after the opening day of the Rally of Spain as a heavy downpour thwarted the main favourites.