Walter Gustav Charles Ramberg, 81, a retired scientific attache with the U.S. Embassy in Rome and a former chief of the mechanical engineering division of the National Bureau of Standards, died of a stroke Oct. 22 at his home in Sparks, Md.

Dr. Ramberg was born in Florence. He came to this country about 1919 ant settled in Portland, Ore. He graduated from Cornell University and earned a doctorate in physics from the Technische Hochschule in Munich.

In 1931, he moved to the Washington area and joined the National Bureau of Standards. He became chief of the mechanical engineering division in 1947. He transferred to the State Department in 1959 and was appointed scientific attache in Rome. He remained in that post until retiring in 1970.

He received the Washington Academy of Sciences award for outstanding achievement in the engineering sciences in 1942 and the Richard L. Templin Award from the American Society of Testing and Materials in 1957.

Dr. Ramberg was a member of the Cosmos Club and the Philosophical Society of Washington, of which he was a past president. He also was a member of St. John's Episcopal Church in Glyndon, Md.

His wife, Julia Elizabeth Lineberger Ramberg, died in 1980. Survivors include two daughters, Julia Hall of Alexandria, and Lucy Cadogan of Culworth, England; a son, Walter D., of Sparks; a brother, Edward, of Southampton, Pa.; a sister, Lucy Ramberg of Patagonia, Ariz., and seven grandchildren.