Dan Brown surged to the lead at Royal Troon despite awful weather and remained in contention until the very end.