Gilbert M. Grosvenor was named yesterday to become the third generation of his family to serve as president of the National Geographic Society.

Grosvenor, who has been editor of the National Geographic magazine since Oct. 1, 1970, will succeed Robert E. Doyle when he retires on Aug. 1. Grosvenor also is a vice president of the society and a member of its board of trustees. Grosvenor's grandfather, the late Gilbert H. Grosvenor, and his father, Melville Bell Grosvenor, were both president and editor for many years.

Grosvenor, 49, first joined the Geographic staff after graduating from Yale University in 1954. He left to serve in the U.s. aRmy psychological warfare branch from 1954 to 1956.

Grosvenor then worked for the magazine in a number of areas, particularly as a photographer and writer. In 1961 he won the National Press Photographers Award for his coverage of President Eisenhower's tour of Asia, Africa and Europe. The same organization named him editor of the year in 1975.

During an interview with Yugoslavia's Marshal Tito, Grosevnor once recalled, he and Tito had been engaging in a pleasant conversation until Grosvenor raised his color camera to shoot. Tito's armed guards sprang from surrounding hedges and pinned him down. They then grabbed his camera and ripped it apart.

Grosvenor later discovered that he had mounted the camera on an ordinary gun stock and the guards through he was really going to shoot their leader.

The board will name a magazine editor to replace Grosvenor later in the year and Doyle will continue to serve on the board of trustees and assume other duties, according to a statement issued by the society.

Doyle has been president of the society since 1976. He joined the society's staff in 1934.

For more than 20 years Doyle handled the society's membership and publication records and other correspondence. He was executive officer in charge of construction of the society's membership center building in Gaithersburg and later became director of the center.