WILLOW SPRING, N.C. — Thick clouds and heavy humidity hinted at the storm crawling its way toward Carolina Mushroom Farm. But it was a crisp 38 degrees inside one of the farm’s concrete and metal coolers that store harvested and packaged mushrooms.

For Shahane Taylor and Steve Carroll, the farm’s co-owners, the electricity that keeps their mushroom sheds at just the right temperatures, humidity levels and lighting is essential to running the largest mushroom producer between Pennsylvania and Florida. The sheds are bolted into a concrete floor and, Taylor and Carroll say, have withstood every major hurricane and storm since the early 1980s.

But Hurricane Florence is forecast to be a storm of enormous ferocity, posing an even greater threat to their grey oysters, lion’s manes and shiitakes. The mushrooms are well protected, said Carroll, adding that“if this floods, half the state is going to be underwater.”

Hurricane Florence has the ­potential to decimate North Carolina’s agricultural economy, which accounts for nearly a fifth of all jobs in the state and produces much of the nation’s sweet potatoes, tobacco, pork and poultry. Many farms are based in the eastern part of the state, which is poised to take a direct hit from Florence and could receive two feet of rain. Farmers know that hurricane season and harvest season overlap here, sometimes with devastating consequences.

There is fear that the storm could decimate crop farmers who only recently started harvesting soybeans, cotton, peanuts and sweet potatoes.

“A majority of the crops are still in the field,” said Mike Yoder, coordinator of emergency programs for the NC State Extension, “and those guys will probably suffer as much or more as the livestock industry.”

In Lucama, employees at Scott Farms worked Tuesday to harvest as much tobacco, corn and sweet potatoes as they could before the storm hits.

“We’re in the mode of harvesting everything right now,” said Jeff Thomas, the farm’s director of marketing.

Scott Farms, which has about 130 employees and planted about 13,000 acres this year, has taken steps to try to mitigate damage from catastrophic flooding or storms. Employees planted sweet potatoes in areas that can withstand being waterlogged, and a state-of-the-art storage and curing system can hold harvested crops for up to a year.

The memory of Hurricane Matthew, which hit in October 2016, is fresh in Thomas’s mind. The farm salvaged much of its sweet potato crop despite extreme rain and severe flooding in the area. But Florence is arriving a month earlier than Matthew, truncating the harvest season, and is forecast to be stronger. Thomas said he can’t make any predictions, but is confident that the systems the farm put in place will help mitigate potential damage.

Larry Wooten, president of the North Carolina Farm Bureau, said that even farmers who lived through the devastation wrought by Hurricane Matthew and Hurricane Floyd, which decimated eastern North Carolina in 1999, know that Florence could be the worst they’ve seen.

“We’ve got a bad one coming,” Wooten said. “The governor said we’re in the bull’s eye. Agriculture is in the heart of that bull’s eye.”

Wooten said an emergency declaration issued by Gov. Roy Cooper (D) last week has helped farmers speed up harvesting by waiving farm-truck weight inspections and allowing the vehicles to operate around-the-clock. And some crops are further along: About 50 to 60 percent of the state’s tobacco crop has been harvested, as well as 75 percent of the corn crop in the eastern part of the state. Any tobacco or corn not harvested before the storm strikes probably will be destroyed by high winds.

State Agriculture Commissioner Steve Troxler said the fluidity of the forecast can make it difficult to fully prepare.

“We’ve been in preparedness mode since last week, trying to make sure we’ve got everything planned that we can plan,” he said, before adding that Florence looks worse than hurricanes of the past. “We are almost set up for the perfect storm.”

Livestock producers have been preparing since last week as well, Troxler said, moving animals from flood-prone areas to market and reducing levels in deep lagoons that store hog waste to allow them to handle additional rainwater.

North Carolina is the nation’s second-largest producer of pork, and most of the farms are in the eastern part of the state. Smithfield, the state’s largest producer of hogs, said it is moving animals to higher ground, making sure there is ample feed for the animals and preparing for power outages.

The company said it is also assessing the enormous lagoons where hog waste is stored. The lined pits hold treated manure that is used as crop fertilizer. Smithfield said farmers are reporting that lagoons can accommodate at least 25 inches of rain. Wexler said that the lagoons are at low levels because manure has been sprayed on fields in recent months.

Environmental groups fear there is a chance that lagoons could overflow.

“The great catastrophic risk is if the floodwaters leave the river banks and overtop the lagoons and flush those huge quantities of liquefied hog manure into the rivers, and flush that stuff downstream,” said Frank Holleman, a senior attorney with the Southern Environmental Law Center.

Some lagoons spilled over during Hurricane Floyd, which also killed thousands of hogs. The state offered buyouts to farmers who were in flood zones. Pork producers said they have been working for years to improve lagoons; 14 lagoons were inundated with floodwater during Hurricane Matthew in 2016, compared with 55 during Hurricane Floyd. The producers said that in 2016 there were more than 3,700 lagoons that experienced no flooding.

North Carolina is also a big poultry producer — 1.8 million broiler hens died during Hurricane Matthew.

At House of Raeford Farms, which works with 150 chicken farms in eastern North Carolina, employees worked to move birds in low-lying areas to higher ground. In some cases that could mean moving birds to new farms, said Dave Witter, the company’s manager of corporate sustainability and communications.

Farmers are also distributing as much feed as possible in case their trucks aren’t able to navigate flooded plots. And in the event that the farms lose power, House of Raeford is coordinating with the farmers to make sure each has enough fuel to top off their generators.

“One thing that we’ve really learned is we have to stay ahead of it,” Witter said. “If we don’t stay ahead of it, it’s not going to turn out well.”

Ross reported from Raleigh.