Out there in the wider Universe there are some really strange worlds that make the planets we have here in our Solar System seem almost mundane.

Super-Mercuries and mini-Neptunes, for instance, challenge expectations of planetary development. And then there's the hot Jupiters; and, for good measure, the ultra-hot Jupiters, worlds so close to their host stars that their atmospheres are thick with clouds of heavy elements, vaporized by the extreme heat.

Now, in two of the most hardcore worlds ever seen in the Milky Way, astronomers have detected the heaviest metal yet. In the atmospheres of exoplanets WASP-76b and WASP-121b drift clouds of barium – the 56th element on the periodic table.

Previous searches had found calcium, titanium oxide, and vanadium oxide in the atmosphere of WASP-76b, and vanadium, iron, chromium, calcium, sodium, magnesium, and nickel in the atmosphere of WASP-121b. That iron could even pelt down at the twilight horizon in a rain nobody would want to sing in.

But barium wafting through the air at high altitudes takes the whole shindiggery to another level.

"The puzzling and counterintuitive part is: why is there such a heavy element in the upper layers of the atmosphere of these planets?" says astronomer Tomás Azevedo Silva of the University of Porto and the Institute of Astrophysics and Space Sciences (IA) in Portugal.

"We were not expecting or looking for barium in particular and had to cross-check that this was actually coming from the planet since it had never been seen in any exoplanet before."

Figuring out the chemistry of an exoplanet atmosphere is a tricky prospect. First, you need an exoplanet that passes between us and its host star, in an event known as transiting. It then needs to pass frequently enough to amplify the signal and collect sufficient data. That planet also needs an atmosphere thick enough to allow light from the star to be absorbed as it filters through and re-emitted by the atoms and molecules within it.

This absorption changes the wavelength of the light, altering the electromagnetic spectrum we see from the star. By comparing the light from the transits with the light usually emitted by the star, scientists can pick out the spectral fingerprints of the exoplanet's chemistry and trace them back to the materials known to produce those fingerprints.

It's fiddly, painstaking work, but rewarding – it can help us better understand the diversity and evolution of exoplanets in the wider galaxy. Especially ultra-hot Jupiters. These enigmatic gas giants are incredibly close to their stars, way too close to have formed there, since the gravity, radiation, and intense stellar winds from the star ought to have kept the gas from clumping together.

Figuring out what these worlds are made of, and what their future looks like, can help astronomers piece together how they came to exist in the first place.

WASP-76b and WASP-121b are both very close to their stars, on orbital periods of 1.8 and 1.27 Earth days, respectively. They're also both pretty chunky, with masses 0.92 and 1.18 times that of Jupiter. This makes the barium detection quite peculiar.

"Given the high gravity of the planets, we would expect heavy elements like barium to quickly fall into the lower layers of the atmosphere," says astronomer Olivier Demangeon, also of the University of Porto and IA. ​​"At the moment, we are not sure what the mechanisms [for its presence] are."

The answers to that perplexing question are going to take more analysis, but the team's work on the two exoplanets have given us more information to chew on, as well. They made new detections of cobalt, strontium, and possibly titanium in the atmosphere of WASP-121b, and confirmed the presence of previously detected elements.

In addition, they were able to confirm features of WASP-121b that indicate that its atmosphere is leaking – the exoplanet is being evaporated by its star. This is further evidence that hot Jupiters are living on limited time, unable to survive long term so close to a star.

And some of the elements are heavily ionized, which will give planetary astronomers a lot to chew over.

"The presence of these heavy ionized species at high altitudes in the atmospheres of ultra-hot Jupiters may be evidence of unexpected atmospheric dynamics," the researchers write in their paper.

"Describing the mechanisms that would explain the presence of these species in the upper layers of the atmosphere is beyond the scope of this paper. However, we hope that with this discovery we encourage further atmospheric modeling."

The research has been published in Astronomy & Astrophysics.