This has been the hottest week of the year, steamy weather that has triggered warnings about the air we're breathing. NY1's Courtney Gross got an inside look at how those alerts are generated and filed this report.

Drive down the FDR on a hot day and you might see this ominous warning: "Air Quality Action Day, Take Mass Transit."

This week, as the mercury soared, the alerts flashed across the city, from the Manhattan Bridge to the BQE.

"This is the New York State Department of Environmental Conservation's Queens College air quality monitoring station," says David Wheeler of the DEC's Regional Environmental Engineer for Air Resources.

Machines hum as they measure local air quality.

Air samples sucked in from the roof of a tiny station and filtered down to monitors 24 hours a day, seven days a week.

"Generally for the summertime, our ozone is what we are looking for as the air quality advisory," says Wheeler.

Ozone comes from cars and power plants. In the summer, it can reach dangerous levels. The sun binds the pollutants together, creating a thick haze over the city.

"We had some rain last night so the air quality has actually improved quite a bit," says Wheeler.

Earlier this week it was a different story. The red line here shows ozone levels. On Wednesday, it was off the chart.

All the data collected in Queens is sent up to Albany, where meteorologists review it and they decide whether an advisory should go out.

On Wednesday, that's exactly what they did.

"There is also an air quality alert," Mayor de Blasio said on Wednesday.

So far this year the state has called for four air advisory days. In all of last year, there were seven. That's better than a generation ago, but environmentalists argue the state is not meeting federal standards—a lapse that can have serious long term effects on New Yorkers' health.

"Smog has often been compared to as getting a sunburn on the inside of your lungs, so if you are exposed to a high levels of ozone smog over a period of time that can exacerbate lung problems," says Eric Goldstein of the Natural Resource Defense Council.

"It's something the DEC is very concerned about," says Wheeler.

So New Yorkers know when to worry about their air.