NEW YORK (MainStreet) — With the peak hurricane season approaching, energy companies are ramping up their efforts to protect their assets and ensure there is enough oil and gas in case a major storm makes landfall.

Oil, gas and power supplies are affected by extreme weather changes and prices of the commodities can be volatile before and after a storm.

Exploration and production companies such as Shell and ConocoPhillips typically shut down offshore production rigs, refineries and pipelines in the Gulf of Mexico and evacuate workers before a major hurricane hits.

[Read: 5 Must-Have Disaster Apps]

Myriad factors contribute to the cost of gasoline, which is why consumers see price fluctuations during the peak hurricane season. Gasoline is derived from crude oil, which affects 63% of the cost. Crude oil prices fluctuate often from issues arising from supply and demand by the sellers and buyers in the market and political turmoil, said David Zahn, vice president of marketing for FuelQuest, a Houston-based software company that manages supply chain for suppliers and purchasers of fuel such as FedEx and UPS.

Wholesale fuel prices typically start adjusting a week ahead of a major hurricane, said Zahn. Consumers should consider filling up the tanks to their cars ahead of the storm while supply is still high and readily available.

"If there is the possibility that extended periods of constrained supply will result from severe weather, it is prudent to fill tanks ahead of bad weather so that inventories can sustain the fuel buyer until additional supply becomes available again," he said. "Don't fuel up the day of or before a hurricane, because you are rolling the dice."

Some gas stations could run out of gas even before a storm hits because they did not work with suppliers ahead of time to ensure there will be a delivery, Zahn said.

Retailers who do not have backup generators on site are not able to sell gas either. Ten days after Hurricane Sandy hit the East Coast last year, 75% retailers in the New York area did not dispense fuel ,because they did not have power or generators, he said.

"When severe weather hits, sudden and sustained supply disruptions are common," he said. "They can occur due to pipeline or refinery shutdowns, terminal closures, demand spikes, blocked roadways, or distributor unavailability. When supply is constrained, suppliers will fulfill their contract obligations first--versus the spot market--and as best as they are able. Fuel retailers have to anticipate that demand is shaky."

[Read: Oklahoma Relief Efforts Feature Small Businesses and Local Heroesl]

Price spikes can occur at the pump after a storm hits and most states do not have anti-gouging measures to protect consumers from having to pay double or triple the normal price. Many state laws prohibit excessive price increases during emergencies, but they are often written ambiguously, Zahn said.

The New York State Attorney General sued scores of station owners who had price increases that greatly exceeded their costs of buying fuel after Hurricane Sandy. Some states have set limits to price increases. New Jersey limits prices increases to 10% above normal levels during an emergency, he said.

Before a hurricane makes landfall, oil and gas traders are already reacting in anticipation of supply and demand changes, pushing prices higher.

Companies also make trades on the commodities since weather is a risk of doing business, said Nicholas Ernst, director of weather markets in New York for Choice Natural Gas, a subsidiary of OTC Global Holdings, an independent institutional broker in OTC energy commodities. Some businesses have larger exposures to weather changes and hedge to prevent large losses and to cover maintenance and repairs.

"In business you run the risk of being faced with the ebbs and flow of weather," Ernst said. "We take out the volatility of weather and add value to shareholders."

Weather forecasting is a tricky and complicated process. Forecasts more than a week old are typically incorrect, said Steve Bennett, founder, president and chief science officer of EarthRisk Technologies, a San Diego company which uses weather data from the past 60 years to project the likelihood of extreme weather events.

"It is an imperfect business," he said. "We provide that risk analysis to energy companies. Weather forecasting is about the probabilities so you can make a more informed decision. All forecasts are not created equal. Weather is such a chaotic system."

[Read: Avoid Popular Stocks like the Devil]

Power prices are less volatile now than eight years ago because only 5% of the production of natural gas comes from the Gulf of Mexico because of the shale gas boom compared to 22% in 2005, said Chris Faulkner, CEO of Breitling Energy Companies, a Dallas oil and gas exploration and production company.

"There are less disruptions if a major hurricane or storm hits," he said. "Hurricanes don't impact natural gas assets like they would offshore platforms and wells."

The market for gasoline is the "exact opposite," Faulkner said.

The Gulf of Mexico is where a large percentage of production and refining occurs with 23% of total U.S. crude oil production occurring in the area while over 40% of total U.S. petroleum refining capacity is located along the Gulf coast area.

"There could be big supply impacts if the refineries are damaged," he said. "Gasoline is very volatile."

Consumers should fill up their tanks on Wednesday, because many retailers update their signs on Thursday, he said.

Crude oil has risen by 20% in the last 12 days and by the end of July consumers should expect to pay $4.30 to $4.50 per gallon on the East Coast while the rest of the country could pay $4.00, Faulkner said.

"We might see a pretty active hurricane season," he said. "There could be volatility and you will see gas prices moving up rapidly."

If one refinery was damaged and was forced to shut down, the other refineries in the U.S. cannot pick up the slack, Faulkner said.

Technological advances are shortening the recovery time after a major hurricane or storm and bringing power back to homes sooner, said Greg Grillo, storm incident commander and vice president for safety at Entergy Corporation, a New Orleans electric and gas utility which operates in Arkansas, Louisiana, Texas and Mississippi. Mobile transformers that are brought in on 18-wheelers can each power 900 to 1,500 homes while the foundation of substations are being raised to prevent flooding.

"We anticipate an active season, but we will be ready for it," he said. "We are preparing for the worst, but hoping for the best."

Many hospitals, cities, counties, data centers, banks and service providers already have plans in place for emergency fuel to be brought in case of a hurricane or blackout, said Bob Kenyon, executive vice president for Atlas Oil Company, a national supplier based in Taylor, Mich. which delivers fuel to gas stations and Fortune 500 commercial accounts. Or the company can bring in mobile refueling stations when gas is not available like they did in the aftermath of Hurricane Sandy by providing gasoline for hundreds of vehicles ranging from taxis, the Metropolitan Transportation Authority (MTA) in New York, postal and tow trucks to personal cars for doctors and other essential personnel.

"Each event is unique," he said "Life goes on and people need to be able to recover. We participate in the recovery efforts."

Even for a minor hurricane such as a category 1, it can take one to seven days for power to be resumed, Grillo said.

"Whenever you are impacted significantly, there is a lot of work to get the system back up and stable," he said. "We have to repair the generators, transformers, transmission and distribution lines and substations. People take it for granted when they flip on the switch."

Smart grids being utilized by power companies can shift power automatically so large areas do not lose power completely, said Ken Geisler, vice president of strategy for the smart grid division in Minnetoka, Minn. for Siemens, the manufacturing and engineering giant. Companies are using automation in conjunction with customer feedback such as crowdsourcing when residents send in photos of areas without power.

"The general trend is to have decentralized design and more distributed generation points," he said. "It's taking away the dependency on a single source of energy. Automation is being expanded into most utilities to have more reliability and a more resilient system."

Evacuation routes in hard-hit areas now can also be monitored by traffic management systems to alleviate congestion and confusion along roadways and even trains, Geisler said.

--Written by Ellen Chang for MainStreet