China's pollution crisis has inspired an environmental regulator in a smog-blanketed northern province to write a novel whose extracts have gone viral online, spurring plans for two more books.

Environmental degradation is fueling discontent in China, where critics say years of breakneck economic growth have left a dire crisis. Major cities are shrouded in perennial smoke and half the groundwater in the country is tainted.

“Smog Is Coming,” published last June, touches on fraud and bureaucracy and their impact on air pollution, with the official China Daily reporting that online excerpts have received tens of millions of pageviews.

Author Li Chunyuan's career inspired the fictional effort, which draws characters and scenes from his work as deputy director of the Environmental Protection Bureau in the smog-choked city of Langfang in Hebei province, he told state media.

“It is easier to tell people something through a novel than through boring lectures,” Li told the China Daily.

The novel features a masked burglar who exploits nightly haze to cover his break-ins as it clouds the lenses of security cameras, an episode Li said he took from real life.

Li said he wrote the book in a little more than three months, during evenings and weekends, adding that he envisioned a trilogy, once he had gathered enough material from his work.

Hebei, home to seven of China's ten worst smog-hit cities, has been under pressure to cut dependence on heavy industries such as coal, steel and cement, but has struggled to find viable alternatives for growth.

Some Chinese internet commentators were skeptical, calling the book a propaganda piece.

“It's good that it touches on an issue that bears on people's real lives, but let's hope the government can actually improve the environment too,” one microblogger wrote.

Elsewhere, the southwestern city of Chongqing banned residents from smoking pork to make bacon, the official Xinhua news agency said, blaming the annual tradition for smog.

It also banned another smoked delicacy, “firewood chicken.”

Many families eat spicy preserved pork and sausages during the Chinese lunar new year festivities coming up next month.

Chinese cities have tried to rein in outdoor grilling, and officials have urged cooks to cut back on stir fries, in pollution-fighting efforts often ridiculed in social media.