Cardinal Robert W. McElroy, the bishop of the Diocese of San Diego, is leaving the city for a new assignment as Archbishop of Washington.