Philly summer is no joke. And with some of the hottest days on record hitting the country in recent years, staying cool has become important now more than ever.

In Philly, heat waves occur at least once a summer, if not more, and last for days. During a heat wave, temperatures are dangerously hot, and with its many cars, crowds of people, and random blasts of heat from sidewalk grates or passing buses, Philly can feel hotter than towns outside of the city.

During city-designated heat emergencies, the city deploys a number of special programs, like cooling centers and cooling buses.

Here’s everything you need to know about how to stay cool this summer.

» READ MORE: How to stay cool in Philly without air conditioning

When does Philly declare a heat emergency?

There are different kinds of heat emergencies in Philadelphia. The National Weather Service and the Office of Homeless Services can issue alerts when the weather is hot.

The city declares heat emergencies by looking at the time of year, the temperatures in the forecast, and how long the heat is expected to last.

The city is more likely to declare an emergency in May and June than in July and August because people are more used to the heat in the hotter months.

Early in the season, the city will declare an emergency when the weather is likely to be 101 or higher for two consecutive days, or 98 or higher for three consecutive days.

Later in the season, if the weather is forecast for 106 or higher for two consecutive days or 103 for three consecutive days, that will trigger a heat emergency.

What is a cooling center?

To keep people cool en masse during citywide heat advisories, the city turns to a go-to resource it already has: the library. Participating libraries become spaces where people can go to get out of the hot sun.

“We try to keep them between 74 and 76 degrees,” says Lynn Williamson, chief of neighborhood library services for the Free Library of Philadelphia.

This year, seven branches are participating in the citywide cooling center effort:

In most cases, their hours extend from noon to 8 p.m., though some will close at 7 p.m. Note that these hours only remain extended during citywide heat advisories.

The Free Library will update its blog with any changes to hours, and you can view standard operating hours for each week on their websites.

The public is not only welcome to the air conditioning but can also access each library’s offered amenities, including internet access.

“You can browse the internet and flip through magazines,” Williamson says. “At some locations, staff may also bring out board games.”

And you don’t have to worry about staying quiet. “You can have conversations, that’s definitely what we want to see,” she says. “Everyone is welcome.”

What is a cooling bus?

In addition to cooling centers, the city sends SEPTA buses to rotating Philly locations during heat waves. Known as cooling buses, the designated buses are air conditioned and open to anyone who needs or wants a break from the hot air.

You can stay on the bus until you’re ready to face the heat — and, no, you don’t have to swipe your SEPTA card to get on.

For cooling bus locations, see the city’s official map.

» READ MORE: SEPTA buses serve as cooling locations during Philadelphia's heat wave

Can I cool off at one of the city’s pools or spraygrounds?

Throughout the summer months, you can head to one of the city’s public pools or spraygrounds (think of a smaller version of Dilworth Park’s massive concrete sprinkler system, built into your local playground).

Starting now, spraygrounds will be open seven days a week through Labor Day. To find your closest sprayground, see this map.

For swimming, 47 public pools are open for summer with the remaining 22 closed due to a lack of lifeguards. If the pool closest to you isn’t open, there may be another one nearby — many pools are grouped together closely.

» READ MORE: The best public pools in Philly

Will swimming when it’s hot out really cool me off?

According to physicians, it will.

“One of the ways the body thermoregulates is through conduction, which is transferring heat from the body to a cooler surface that it’s in contact with,” says Aditi Chincholi, a primary care physician at Mercy Health Associates at Chestnut Street. “Swimming would transfer excess body heat to the water in the pool, which will help regulate body temperature and keep it within normal body limits.”

Water in outdoor pools is typically cool and circulated, so even when it’s sunny and scorching out, a pool that’s at body temperature or below will help keep you cool.

“Don’t forget to stay well hydrated and drink electrolytes and cool water,” Chincholi says. “Make sure you’re wearing loose clothes and sunscreen if you’re going to be out in the sun.

» READ MORE: The best ice cream in Philadelphia

How else can I stay cool during a heatwave?

Staying cool during a heatwave is important for everyone, especially kids — they’re much more vulnerable to excessive heat.

The city encourages everyone to wear light colors, avoid drinking alcohol, stay in air-conditioned spaces, and check up on relatives and friends to make sure fans and air conditioners are working.

Staff writer Anthony R. Wood and contributed to this article. This article has been updated since it first published.

» READ MORE: Live your best life in Philly: Read our most useful stories here.