Deep inside the sun, there's an impossibly thin layer that scientists have puzzled over for decades. Now, researchers at the University of California, Santa Cruz believe they've cracked why this layer stays so razor-thin — and what it means for us on Earth.

The layer is called the tachocline, and it sits squeezed between the sun's inner core and its outer surface. Think of it like a narrow boundary where two different motion zones meet. Scientists have known this sliver of space plays a huge role in creating what we call "space weather" — the explosions of charged particles and radiation that shoot off the sun's surface. These eruptions can disrupt satellites, affect astronaut safety, and even mess with GPS navigation systems here on Earth.

For years, nobody could explain why the tachocline stays so remarkably thin. Researchers tried building computer models to simulate the sun's interior, but those models kept failing to replicate what astronomers observed.

That changed when UC Santa Cruz professor of applied mathematics Nicholas Brummell and postdoctoral scholar Loren Matilsky ran new simulations on one of NASA's most powerful supercomputers. Their work — published in The Astrophysical Journal with former graduate student Lydia Korre — required hundreds of millions of hours of processing time.

The team's models reveal something surprising: the relationship between the tachocline and the sun's magnetic field goes both ways. Scientists knew the tachocline helps generate magnetic fields, but the new research suggests the magnetic field also keeps the tachocline thin in the first place.

"For decades, it was thought that the tachocline was a key component in driving the large-scale solar magnetic field," Matilsky said. "The picture that's emerging from our work is that the reverse might also be true: that the large-scale magnetic field might be a key reason why there's a tachocline to begin with."

This discovery also helps explain how stars slow down over time — a process called "spin down." As stars age, their outer layers gradually brake against their own magnetic fields. How that braking message travels inward to affect the whole star has been unclear. The new simulations show the tachocline acts as a bridge, connecting the surface slowdown to the deeper interior.

Brummell said understanding these dynamics matters beyond just protecting our technology. "Everyone wants to know what the environment is like between the sun and Earth, because it affects our life here," he explained. "But understanding the origin of space weather is important when we are looking for other habitable worlds, too."

The research was part of COFFIES, a NASA center studying how magnetic fields and fluid flows interact inside stars and beyond.