Some Beijing residents use smokestacks to predict smog: Smoke drifting gently upward means stagnant air where smog will accumulate, while smoke blowing away from the mountains indicates fresher winds and clear air ahead.
But the city government uses more sophisticated technology for its forecasts, including the one used this week to trigger Beijing's first-ever red alert for smog. The alert brought restrictions on cars and factories, as well as other measures aimed at keeping the smog in check.
The system takes into account not only weather patterns that suspend pollutants in the air, but also industry emissions and flows of vehicles and their emissions.
It also incorporates real-time data from air monitoring systems, satellite images and even information that is passed around on social media, said Meng Zhang, chief meteorologist at IBM Research China, which works with Beijing's environmental protection bureau on the forecasting system.
It then models and predicts the effects of weather on the flow and dispersal of pollutants and the airborne chemical reactions between weather and pollutant particles, Zhang said in an interview at an IBM lab in Beijing.
It yields high-definition pollution forecasts 72 hours in advance, as well as rougher predictions for 10 days in advance, he said.
Beijing's current system of smog alerts triggers a scaled response with blanket restrictions for the entire city for four levels of predicted pollution.
Zhang said the system can become increasingly granular, allowing authorities to pinpoint just the right restrictions, such as which factories must suspend operations and which not and at what time, to get the desired effect.
"Without this insight, the government responds in a very simple way. They shut down everything around Beijing, just like they did for the 2008 Olympic Games", he said.
"But for the 2022 Winter Olympics, they can do that in a smarter way so they can know what is the best window, what is the best area, to reduce the economic impact," Zhang said.
Such forecasting is being rolled out to a handful of other Chinese cities to improve their air quality management.