LOS BANOS -- 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 overall, dozens of industries are affected.

The rules are relatively simple for producers like 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 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 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, like 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.

Morning Star, praised for its management innovations, has also won respect for improving its energy efficiency through equipment retrofits over the years. "If you have any ideas for efficiency," Kastle said, "we'll look at them."

"We deploy what we believe, based on the economics, are the most efficient tomato processing facilities in the world," he said in an interview at the company's plant in Los Banos. "And there are only two major costs in producing tomato paste: tomatoes and energy."

He was standing at the center of the plant's steaming Emerald City-like pipes and towers, beneath a network of artificial watercourses along which 838 tons of bobbing, colorful fruit move through the factory each hour in harvest season.

To run the conveyor system and to heat and sterilize the product, the plant uses five boilers, the newest of which is four years old and the oldest, 30. Replacing a boiler costs millions of dollars.

Kastle said Morning Star's margins are too slim to absorb new regulatory costs. But he also worries about the consequence of passing them on. He knows that the California garlic industry lost half its market to Chinese imports in less than a decade, and notes that China's tomato-processing industry is on the rise.

The Air Resources Board is also wary of this competitive situation, which is why it has been flexible about adjusting its regulation.

Steven Cliff, the California regulator most familiar with food processing, said that companies need the free allocations in the early years. "In a global marketplace you can't pass along all of your costs," he said.