Being in nature is one way people like to lift their spirits. A new study finds that visiting a city park can even make you as happy as you feel on Christmas Day -- and the more trees, the better.

The study from the University of Vermont looked at hundreds of tweets every day for three months from people who posted from 160 parks in San Francisco, according to Science Daily. Researchers found that those people tended to use happier words and were less negative on Twitter than they were before the visit.

It wasn't a fleeting high, either. The study found these happier moods lasted for up to four hours after the visit.

RELATED: Happiness at work can impact more than just 9-5

RELATED: Study says taking a cruise could be good for your well-being

The study found that the amount of plant life in the park made a difference. The more trees and vegetation, the happier the people were. Those visiting smaller parks or parks that were mostly paved did not have their moods as elevated.

City park garden
Getty Images/iStockphoto

The researchers used an online instrument called a hedonometer. It scores about 10,000 common words for what the study says is their "psychological valence" -- or their "emotional temperature." Then they scored words used in the tweets on a scale of 1-9. The happier the word, the higher the score.

The researchers described a "dramatic" increase in the happiness score from people who posted to Twitter after visiting the parks.

"This increase in sentiment is equivalent to that of Christmas Day for Twitter as a whole in the same year," they found, adding that Christmas Day is the happiest day on Twitter each year.

The researchers say they hope the findings will be used by cities to promote urban spaces and. as a result, improve mental health.

"In cities, big green spaces are very important for people's sense of well-being," said Aaron Schwartz, a graduate student and lead researcher.