Yup. The test partial test ban treaty was signed in 1963 by all the nuclear powers at the time - everything after then, US or otherwise, has been underground, with the exception of, I believe, India, who was not a nuclear power when the treaty was drawn up - india set of a series of undersea tests late in the century.
This was done specifically because they realized they would collectively make the planet uninhabitable if they continued.