Hey boss, don't fret about all the stormy weather: It could well be making your workers more productive.

New research from Harvard University finds that employees get more done when the weather is frightful because they aren't distracted by ideas of the fun they could be having if they weren't stuck at work.

Related: Cheatin' Hearts Online Cost Businesses $17M a Day

"When the sun is out you're sort of thinking about the many different things that you could be doing outside," said Francesca Gino, an associate professor of business administration at Harvard and one of the paper's authors. "When the weather is bad that doesn't even come to mind, because that's not even an option."

To determine how weather affects productivity, the authors compared a long-running Japanese study of worker productivity with the weather during the two-and-a-half-year study. They found that workers got tasks done more quickly when it was raining.

The researchers did tests with other pools of participants and found that when the weather is lovely, people tend to be more distracted by thoughts of what they could be doing other than sitting at their desk working.

Related: 25 Weird Interview Questions Companies Really Asked

Of course, that doesn't account for the other drag on productivity related to weather: Not being able to get to work at all. That's something workers in the Atlanta area encountered this week after a rare snowstorm disrupted the city.

Maybe there's a silver lining there as well. Other research has found that some people are actually more productive when they work at home.

Gino said she experienced that firsthand when recent bad weather in the Boston area forced her to work at home, away from the interruptions of meetings and chats with colleagues. "The day of the snowstorm I was even more productive," she said.

This article originally appeared in CNBC.

Read more at CNBC:

Get smart! Your phone habits are annoying at work

Young women see sexism, but not at their job

Yes, your boss probably is happier than you are