LOS BANOS, Calif. - The Morning Star Co.'s three plants in California emit roughly 200,000 metric tons of carbon dioxide into the atmosphere each year - about the same amount as the Pacific Island nation of Palau - as they turn tomatoes into ketchup, spaghetti sauce and juice used by millions of consumers around the world.

Beginning Jan. 1, under the terms of a groundbreaking California environmental law known as AB 32, Morning Star and 350 other companies statewide will begin paying for those emissions, which trap heat and contribute to global warming.

Companies are trying to figure out how this will affect their bottom lines and have lobbied state regulators to minimize the costs. In the meantime, they are weighing their options. Should they stay and adapt or move operations elsewhere? Should they retrofit and innovate to reduce emissions? Should they swallow the regulatory costs or pass them on to customers?

Each company's calculus depends on its particular circumstance. Morning Star, a top producer in a $926 million industry, has to be near the tomato fields of California's Central Valley, so relocating was never an option. Its biggest question is how to handle the extra costs.

About 600 facilities with hefty emissions are covered by the Global Warming Solutions Act of 2006. Oil refiners, electric utilities and cement makers, whose greenhouse-gas output totals in the millions of metric tons annually, are the biggest. But over all, dozens of industries are affected.

In recent months, as the start date of the new cap-and-trade program neared, California regulators have fine-tuned the rules, industry by industry, to avoid imposing severe economic hardship while trying to keep the rules stringent. It is a delicate balance. Regulators do not want California companies to lose their competitive edge because that could make other state governments reluctant to adopt this approach.

Cement plants near Los Angeles compete with plants across the Arizona border. State tomato processors control more than 95 percent of the American market, but they fear that the fast-growing Chinese sector could make inroads.

Officials in affected industries acknowledge they are struggling with how to proceed. As Meredith Fowlie, an economist at the University of California, Berkeley, explained, "Their calculations have to be that we either sit here and emit and pay the cost of doing so, or alternatively we can look at options" such as paying for major capital improvements to reduce emissions.

The state's Air Resources Board is using an array of policies to reach its intended goal of reducing emissions to 1990 levels by 2020. It has tried to structure the cap-and-trade program to encourage industry investment in energy efficiency that could cut costs as well as lower emissions. Investing in energy efficiency may make sense for companies under California's rules, Fowlie said, "but if they are making them before their competitors, that could be fatal."

The rules are relatively simple for producers such as Morning Star. At the end of 2014, they must present state-issued allowances - one per metric ton of emissions - for the greenhouse gases they emitted in 2013.

For the 200,000 metric tons of carbon dioxide emitted annually by Morning Star's three plants, the company is being awarded about 192,500 free allowances the first year; the company must buy the remainder on the open market. In the first allowance auction in November, the allowance price settled at $10.09 a ton, meaning that, in the first year, Morning Star has to pay roughly $75,000 to cover its emissions.

But over the next five years, the number of free allowances will decrease sharply to encourage further emissions cuts. At current rates, that means Morning Star will have to buy 100,000 allowances for both 2017 and 2018, by which time the prices may have doubled or tripled in an open market. The company estimates that the law will cost it an extra $20 million over the next seven years.

Nick Kastle, a company spokesman, said it would almost certainly pass on the new costs to makers of ketchup and frozen pizza, which would be likely to share the extra costs with consumers. "People nationwide are going to be affected by AB 32," he said.

But many economists said they think such a cost-centric analysis ignores the jobs and economic activity that the law could generate. Emission and efficiency standards for cars, buildings and appliances in California over the last four decades have succeeded in cleaning the air, making residents' per-capita energy use rate among the lowest in the country and spurring innovations and new industries, such as the one that arose around catalytic converters.

"It's almost a Darwinian point," said Matthew Kahn, an economist at the University of California, Los Angeles. While some companies' costs will no doubt rise, he said, the law creates moneymaking opportunities by forcing a rethinking of industrial processes.

For some industries, the options are limited. Cement cannot be made without releasing carbon dioxide as a byproduct, although engineers are trying to reduce the amount emitted. At least one new California company is experimenting with a process that captures and stores carbon that would otherwise be emitted.