Hundreds of thousands of people plunge into the water along Chicago’s lakefront each year, and they’re joined by trillions of beach-going bacteria. This summer, city parks officials and a team of University of Illinois at Chicago researchers believe they have come up with a way to keep swimmers out of the water when they’re too far outnumbered by microbes.

For decades, public health experts and park officials have been bedeviled by the problem of when to close city beaches to protect swimmers from the invisible scourge of illness-causing bacteria like E. coli.

Testing required letting water samples incubate for up to 24 hours, meaning swimmers wouldn’t know if they’d dunked themselves among dangerous levels of bacteria until the day after they’d taken the plunge. And day-old data meant the lifeguards were warning people out of the water based on conditions the day before, likely discouraging people from swimming on days the water was perfectly safe.

“It’s not that the old (culture) test wasn’t giving us accurate results, it just turned out that they weren’t as useful,” said Cathy Breitenbach, the Park District’s director of cultural and natural resources.

“It turns out, yesterday’s water quality wasn’t the same as today’s.”

The city last year ended a five-year pilot program to predict bacteria counts using high-tech buoys that measured water temperature, currents and wave action, which also coincided with a two-year pilot of a rapid-testing method that measures bacterial DNA in the water within just a few hours.

This summer, park district officials picked a team from UIC to conduct same-day tests of the water, the first major city to adopt testing protocols recently approved by the EPA to identify the concentrations of bacterial DNA in lake water.

“Everybody else reports to the public what water quality was yesterday, because they use the old culture procedure,” said Dr. Samuel Dorevitch, a UIC public health professor who is leading the team of researchers who conduct the daily testing.

Here are the beaches along Lake Michigan in the Chicago area where water samples are taken to test for contamination. | Provided

Water samples from 20 spots on the lakefront, and the artificial beach in Humboldt Park, are dropped off each morning by 8 a.m. at the West Side campus, and test results are completed by noon, Dorevitch said. The quick turnaround allows the Park District to post warnings at beaches based on the levels of bacteria measured that morning. The data also is posted to the web at www.cpdbeaches.com, and bacteria counts of 1,000 “Calibrator Cell Equivalents” trigger an advisory.

The Park District in 2012 ended the practice of banning swimming based on bacteria levels — beaches still are closed for rough surf and after the rare instances when the locks on the Chicago River are opened to release stormwater — instead posting “advisories” to alert swimmers of the risks.

So far this summer, the Park District has posted advisories for high bacteria 180 times at 26 beaches tested, which appears to be on pace with the number of advisories in the previous two years. But, Breitenbach said, this year, advisories will likely do more to protect public health, since the alerts will be based on data that is only 4 hours old.

Environmentalists have praised the switch to rapid testing for just that reason, said Joshua Mogerman of the National Resources Defense Fund, which sued the EPA more than a decade ago in a bid to force the agency to authorize faster testing protocols.

“Timely information is important for making sure that a day at the beach is really a day at the beach, and not something really unpleasant,” Mogerman said, noting that bacteria can lead to infections that cause rashes and gastrointestinal illnesses.

The NRDC hopes that Chicago’s program will be a model for other cities with lake and ocean beachfronts, Mogerman said.

So far this year, North Avenue Beach is the only beach that has gone without a single advisory day, said UIC researcher Abhilasha Shrestha, who also worked on pilot studies that did rapid testing on city beaches in each of the last two years. The beach that has most frequently had high bacteria counts is the artificial beach at Humboldt Park, with 38 advisory days since the city’s parks and pools opened on Memorial Day.

Generally, bacteria in the lake stem from animal sources, especially feces from seagulls, dogs, and, to a far lesser extent, dirty diapers, said Shrestha. Levels climb when heavy rains cause runoff into the lake. Rough water, which stirs up algae and sediment in the water, also can free more bacteria into the beachfront.

Those concerned about bacteria in Lake Michigan should be aware that a Centers For Disease Control study from 2012 found that three-quarters of bacteria-related illness outbreaks were linked to pools and spas, rather than oceans and lakes. The Chicago lakefront may have issues with runoff in some areas, but the fact that the Chicago River flows away from the lake means sewer overflows seldom are being poured into the lake, Breitenbach said.

“Our beaches are actually pretty clean,” she said.