Dr. Bertram S. Brown, head of the National Institute of Mental Health, was praised and fired this week by Health, Education and Welfare Secretary Joseph A. Califano Jr.

Brown - head of the government's large research, training and service agency in the fields of psychiatry, psychology and human behavior - was known in the mental health fields for keeping his agency strong during several years of unfriendly supervision by the Nixon White House.

Brown was one of only a few major health officials who was not immediately replaced early this year by Califano. But Dr. Gerald Klerman, new head of HEW's Alcohol, Drug Abuse and Mental Health Administration, asked for Brown's resignation in a one-hour interview Tuesday.

"He's a first-class man and he's done a first-class job," Califano said of Brown yesterday. 'I have no criticism of the job he has done or anything else. It is my policy that it's for the good of the government and the good of inviduals for us to turn over these posts when people have been in them for a number of years.

"I asked for Dr. David Sencer's resignation as director of CDC" - the government's Center for Disease Control in Atlanta -" for the same reason. I've done it with every health post with exception of Dr. Fredrickson at NIH."

Califano was outspoken early this year, in saying that he was keeping Dr. Donald Fredrickson, director of the National Institutes of Health - the overall agency for all research institutes except the mental health areas - partly because Fredrickson was outstanding and fairly new in the job and partly because NIH badly needed stability.

Brown has been director of NIMH since 1970, a period in which NIMH helped create scores of coummunity mental health centers all over the country, moving treatment of many of the mentally ill from big state hospitals to their own communities.

He has also directed the agency during a time when its own big mental hospital - St. Elizabeths, which mainly serves District residents - lost is national accreditation for deficiencies both in physical plant and medical care.

And Brown was recently ruled guilty of discrimination against Dr. Roger Peele, then acting superintendent of St. Elizabeths, after saying he had tried to replace Peele, who is white, with a black superintendent in part because a black might better serve District residents.

U.S. District Court Judge Thomas A. Flannery, who heard Peele's suit against Brown, still has not decided whether Brown's bias kept Peele out of the job.

But Califano, Klerman and HEW Assitant Secretary for Health Julius Richmond all said yesterday that the St. Elizabeths problem had nothing to do with replacing Brown.

Richmond and Klerman both called the replacement a desire for "fresh blood" and "new leadership" in a field - mental health - where there are scores of problems of long standing that need fresh approaches.

Brown so far has not resigned and yesterday would say only that "There's no way I can have any comment - it's just too sensitive and difficult at this point."

He is scheduled to see Richmond today. He is an assistant surgeon general in the Public Health Service, and one associate said, "He's still fighting this." But another associate said, "It's just a matter now of finding him a dignified new assigment."

NIMH was created by Congress in 1948. Brown, then a young psychiatrist, became deputy director in 1960, and director 10 years later. He helped to make the mental health agency independent of NIH in 1967.

Some critics have suggested recently that its research functions, at least, should be placed back under NIH. But Carter administration directions in the mental health field are now awaiting the final report in April of President Carter's mental health commission, which is headed by his wife, Rosalynn.