California has gone to extremes to improve the state’s air quality, pushing out coal-fired power plants and implementing the strictest auto emissions standards in the nation. L.A.’s persistent smog layer may be a shadow of its former self, but it hasn’t been enough. Lots of people and too many cars means California still has seven big cities that rank among the 20 most polluted in the nation.

L.A. ranks No. 2 on our list of America’s Dirtiest Cities, and San Diego is no. 9, but some of the worst air in the country is in smaller cities in the San Joaquin Valley, where a ring of mountains traps a stagnant stew of ozone and particulate matter. According to data that Forbes crunched from The American Lung Association’s State of the Air 2011 report, the most hazardous breathing in America is in Bakersfield. Hot, dusty, adjacent to California’s biggest oil fields, Bakersfield has 60 days a year of unhealthy air, 10 times a level considered acceptable. Its ozone levels are better than at any time in the past 15 years, but still unhealthy for 100 days out of the year.

By contrast, Houston (No. 18) has 25 bad ozone days a year while New York (No. 14) suffers just 17, down from 40 a decade ago).

The Lung Association figures that half of the U.S. population lives in places where the air is sometimes unfit to breathe, contributing to asthma and lung cancer. And death. The data show that more people die of respiratory ailments on bad-air days.

Hold on folks, help is on the way. California and the federal government are set to embark on some giant regulatory experiments that could help clean the air. The concern is, at what cost?

First California. In late October, California’s Air Resources Board cleared the last legal hurdles to launch a statewide carbon cap-and-trade regime. Emissions will be capped and emitters will receive permits covering roughly 90 percent of their effluent; if they want to pollute more, they’ll have to buy permits on an exchange. The more cuts made, the more permits available.

The air resources board figures that they’ll be overseeing $10 billion in annual carbon trading by 2016. The objective is to reduce California’s emissions to 1990 levels by 2020. The law also requires emissions cuts for vehicles, more efficient appliances and for the state to get a third of its electricity from renewable sources by 2020.

Then there’s Washington, D.C. This month the Environmental Protection Agency is expected to issue a series of new rules that have power plant operators quaking. They will govern the emissions of hazardous air pollutants like mercury, arsenic and other toxins, and will require power plants to use maximum available technology to control what comes out of their stacks.

The EPA issued drafts of their rules earlier this year, and the industry has run the numbers. Critics fear that green goals will trump economic realities and that the rules will cripple power generation and kill jobs.

Coal-fired power plants will likely be the hardest hit. Electric power giant AEP says the new rules will likely affect 525 plants that produce 25 percent of U.S. electricity. FBR Capital Markets expects that plant owners will close 50 gigawatts of coal plants rather than invest in costly emissions overhauls. Bernstein Research is even more pessimistic, expecting 66 gigawatts, or 20 percent of all coal generation to be mothballed.

This could lead to some real air improvements in places like Louisville, Ky. (No. 11), and Knoxville, Tenn. (No. 15). Already Louisville Gas & Electric says it plans to mothball an old coal plant, while the Tennessee Valley Authority plans to take 11 of its 59 coal units offline. Philadelphia (No. 12) too should breathe easier soon; the Portland Generating Station outside of Philly has already been ordered by the EPA to reduce its massive sulfur dioxide emissions by 81 percent in three years.

Naturally, power plant operators complain about having to make costly investments in new technology to scrub pollutants out of their waste stream. And in California oil refiners resent that their cash will have to go to buy emissions permits instead of investments in emissions controls.

The green lobby has no sympathy. The EPA says that such investments will pay broad dividends to society, figuring that every dollar spent on pollution control will bring $30 in savings on health care.

State leaders aren’t so sure. In Texas, which relies heavily on coal generation, Gov. Rick Perry has sued the EPA to block implementation of the Cross State Air Pollution Rule, which would force Texas to reduce the amount of sulfur dioxide and nitrogen oxide that waft from Texas coal plants into neighboring states. In a letter to President Obama in September, Perry said complying with the rule would have an “immediate and devastating effect on Texas jobs, our economy and our ability to supply the electricity our citizens, schools and employers need.” Texas already suffered rolling blackouts this year when power demand exceeded supply.

Perry’s not alone. So far 25 states have urged the EPA to delay issuing rules until their economic impact is better understood.

And if the lights go out in Texas? It won’t be for long. Let the EPA and California push the nation away from coal. The solution is already here, in the form of cheap, plentiful, clean-burning natural gas. Compared with coal and nuclear, building gas-fired power plants is cheap.

Now if only we can get that gas “fracking” controversy cleared up. The EPA is looking at that one, too.