D.C. Mayor Marion Barry, who has often endured a stormy relationship with the press during his 2 1/2-year tenure, yesterday announced that he has appointed Edward M. Meyers, a longtime political aide, to replace Alan F. Grip as head of the city's Office of Communications and chief spokesman for the government.

Meyers also will serve temporarily as chief spokesman for Barry himself, but Barry said that he will name a separate mayoral press secretary within the next month.

In what amounts to an overhaul of his press relations system, Barry announced that he will name a 12-member advisory committee to suggest ways of better coordinating the flow of information by city agencies, and that publication of the city government's monthly newspaper. The City Hall New Times, will be resumed as of Oct. 1. Publication of the newspaper had been suspended because of budgetary constraints.

Meyers, 37, has served for the past two years as deputy director of the city's Department of Finance and Revenue. He was an aide to Barry when the mayor was a member of the City Council and often handled press inquiries, but unlike Grip, Meyers has no experience as a reporter. His college degrees, from the University of Maryland and the University of Detroit, are in economics.

Grip left his job as head of the communications office, where he also served as the mayor's chief spokesman, on July 2. He said that the pressures of the job had adversely affected his health. Grip has accepted a job as head of communications and promotions for the city's new convention center.

Meyers emphasized yesterday that his will be a more low-key role, with less contact with reporters, than that of the press secretary. He said that he will work more to facilitate communications within the government -- among department heads, for example -- while the press secretary will speak for the mayor himself.

The moves come at a juncture when the campaign for the 1982 mayor's race is about to begin, and Barry widely is expected to try to keep his job. Relations with the press undoubtedly become more important as the election nears.

Meyers will become the fourth chief spokesman the mayor has had since taking office in January 1979. The first, press secretary Florence Tate, resigned after a little more than a year to set up her own public relations firm. Officially, the parting was amicable, although sources said at the time that Tate was disillusioned and wanted the mayor to be more cooperative with the press.

Tate's deputy, Kwame Holman, served for about four months as the mayor's chief spokesman before a reportedly angry Barry closed the press office in his District Building suite. He named Grip, who previously as communications chief did not speak for the mayor, to be an overall information czar for the city. Barry aides said they did not think Holman was experienced enough to handle the press.

During Grip's tenure, Barry sought to avoid conflicts of the kind he previously had had with the press by limiting his conservations with reporters. Grip instituted monthly general news conferences with the mayor, but they turned out to be virtually the only time reporters could question Barry on most issues. Barry, once eager to chat with reporters, routinely began declining to answer questions outside of formal situations, unless they were submitted through Grip.

The 12-member advisory committee will be headed by Ofield Dukes, a former aide to Vice President Hubert H. Humphrey who runs his own public relations firm here. The other members of the committee, which will attempt to develop a coordinated communications system for the entire government, will be announced later this week, Barry said.