From 1945 to 1992, 520 atmospheric nuclear explosions (including eight underwater) have been conducted with a total yield of 545 megatons.
So keep the device down to a couple megaton and we should be "OK". (for certain values of "OK")
https://en.wikipedia.org/wiki/Nuclear_weapons_testing