Record wildfires have been blazing in the Western United States, leaving areas across Oregon, Washington, Montana, and California scorched, choking on dangerous levels of smoke, and shrouded in a cloudy haze.

Fires have so far this year torched more than 115,000 acres in California. This week, at least 23 people were killed in fires in Napa, Sonoma, and Mendocino counties, and more than 20,000 residents were forced to evacuate.

Schools, colleges, and libraries are closing in the Bay Area, while emergency room visits are rising with the region shrouded in the highest air pollution ever measured.

"We're seeing the worst air quality ever recorded in many parts of the Bay Area," Tom Flannigan, spokesperson for the Bay Area Air Quality Management District, told SFGATE this week.

The wine country fires produced as much air pollution in two days as all vehicles in California produce in a year.

Air quality in the Bay Area is pretty bad today, even by Beijing standards. pic.twitter.com/Fa9UvD1HoQ — Trevor Houser (@TrevorGHouser) October 12, 2017

Haze from these fires is wafting down to San Francisco, more than 50 miles away.

Smoky haze over San Francisco from #napafire. Sending thoughts to people in harm's way. pic.twitter.com/MvBj1T4wPO — Charlene Li (@charleneli) October 9, 2017

It’s just the latest tragedy in a devastating fire season that’s still not over. More than 8.5 million acres have burned across the United States so far, according to the National Interagency Fire Center, putting 2017 on track to be one of the worst years ever for wildfires. And California’s fire season, which starts up in October and can run as late as April, is just getting started.

For residents of the Western states where fires have raged, one of the worst threats is lingering poor air quality that may take up to a week or more to disperse. You can use this map to zoom in on which areas currently have it worst.

The Environmental Protection Agency measures the harm from wildfires with its Air Quality Index, as shown here in this live map.

The math is a little convoluted, but the index allows regulators to make apples-to-apples comparisons of health risks across different pollutants like ozone and sulfur dioxide.

The six categories for the Air Quality Index range from “good” (“It’s a great day to be outside”) to “hazardous” (“Avoid all physical activity outdoors”).

Air quality in the San Francisco Bay Area reached “very unhealthy” levels on October 10:

Earlier this season, air in some parts of Montana, Washington, Oregon, and California reached that worst-case “hazardous” level during some of the more intense wildfires in September. Here’s the map from September 6:

Unfortunately, smoke from wildfires poses a threat even in small quantities, and can cause harm even to people hundreds of miles away from the nearest flames.

Wildfires can loft bits of dust and carbon into the jet stream, but health hazards emerge when the local weather conditions bring these particles back down to ground level, which is why specific local air quality monitoring and forecasts are so important.

The town of Seeley Lake, Montana, about 50 miles from Missoula, suffered some of the highest pollution levels from the blazes.

Seeley Lake is bordered by the Swan and Mission mountain ranges, and its geography traps dirty air over the town’s 1,600 residents.

The smallest particles are the biggest concern.

EPA regulates PM2.5, which refers to particles with a diameter of 2.5 microns or less. Wildfires directly create these particles as they torch plains and forests.

“Generally, we think that the smaller it is, the more likely it is to make you sick,” said Jia Coco Liu, a postdoctoral researcher studying air quality after disasters at Johns Hopkins University.

These particles penetrate deep into lungs, and can cause inflammation, asthma attacks, and over the long term, cancer.

Even in tiny concentrations, measured in micrograms per cubic meter, particulates can increase visits to the emergency room, especially for the elderly and people with chronic breathing problems.

“My research shows that when pollution is very high, over 37 [micrograms per cubic meter], we start to see health consequences,” Liu said.

Even on September 12, after many fires died down, the Seeley Lake air monitoring station was reporting an off-the-charts spike in air pollution and an average particulate count of 214.6 micrograms per cubic meter over 24 hours.

Officials don’t have many options to help people get fresh air under smoke and haze. “Other than staying indoors, it’s pretty hard to do, because you can’t stop breathing,” Liu said.

Overall, this fire season is far worse than officials expected. "We had a very wet winter and spring, but that was pretty much erased in July when we had a very strong heat wave in the West that dried this out very, very quickly," said Ed Delgado, the national program manager for predictive services at the National Interagency Fire Center.

As average temperatures continue to rise due to climate change, health officials are bracing for more wildfires scorching wider swaths of Western lands, leading to more coughing, wheezing, heart attacks, and deaths.