LONDON, Oct 12 (Reuters) - U.S. gasoline stocks remain at record levels for the time of year but once they have been adjusted for record fuel consumption by U.S. motorists do not appear excessive.

The gasoline glut, which dominated discussions about the outlook for crude and fuel markets during the spring and early summer, quietly evaporated during August and September.

U.S. gasoline stockpiles are now just 3.5 million barrels (1.6 percent) higher than at the same point in 2015 according to data from the Energy Information Administration (tmsnrt.rs/2e1dCXZ).

Back in July, the stockpile surplus over 2015 peaked at more than 25 million barrels (12 percent), triggering talk about the need for voluntary run cuts by U.S. refineries in the second half of the year.

In turn, the prospect of lower crude processing rates weighed on oil prices during August and September, helping send prices sharply lower until OPEC reached a surprise production deal at the end of September.

Where did the excess gasoline go? And how did refiners manage to eliminate the surplus without major disruption?

A big part of the answer lies in the record or near-record consumption of gasoline over the summer which helped create a consistent draw on inventories (tmsnrt.rs/2e1eUCo).

In the face of record demand, refineries generally limited processing rates to at or below levels reported in 2015 to reduce stocks (tmsnrt.rs/2e1eJ9Z).

Limiting throughput in the face of strong demand played a key role in rebalancing the gasoline market but other adjustments also contributed.

U.S. refiners exported unusually large volumes of finished motor gasoline and blending components to countries in Latin America hit by local refinery problems.

U.S. refiners also exploited the flexibility in their processing operations to curb production of gasoline and maximise output of middle distillates like diesel and especially jet fuel.

At a first approximation, refineries produce roughly fixed proportions of the major fuels like gasoline, jet fuel, distillate fuel oil and residual fuel oil.

But there is some flexibility to shift yields especially between gasoline on the one hand and jet fuel and distillate fuel oil on the other.

In particular, refineries can switch production between the heaviest components of gasoline and the lightest components of jet fuel and distillate fuel oil by changing cut points and catalysts.

The capacity to switch is termed the "swing cut" and is part of what makes fluid catalytic cracking units so important for refinery economics.

VANISHING SURPLUS

Over the summer, U.S. refineries focused on producing more distillate and jet at the expense of slightly lower yields of gasoline.

Refineries cut their gasoline yield by more than 4 percentage points from 49.9 percent in January to 45.8 percent in July.

Gasoline yields normally decline between January and July but the decline this year was the largest for eight years (tmsnrt.rs/2dRu0Mq).

At the same time, refineries ramped up the production of middle distillates and especially jet fuel to an unusual degree.

Refinery yields of jet hit 10.0 percent in July 2016 compared with 9.6 percent in July 2015 and a 10-yr average of 9.5 percent (tmsnrt.rs/2dRs7z4).

Refiners' yield of jet in July was the highest since 2008. Production hit a record 1.729 million barrels per day, an increase of 59,000 barrels per day compared with 2015.

Valero, the largest independent refiner in the United States, told analysts during its second quarter conference call in July "we are currently in max-jet mode", which is consistent with the industry-wide yield statistics.

Record gasoline consumption. Restricted refinery throughput. Strong exports. Switching to jet. None of these factors would have been enough to clear the gasoline glut on its own.

But in combination these factors have proved enough to draw down excess gasoline and leave the market looking more balanced.

Hedge funds and other money managers have taken note and shifted from a bearish to a bullish position on U.S. gasoline futures.

Hedge funds have switched from a rare net short position in gasoline futures and options of 5 million barrels at the end of July to a net long position of 31 million barrels by the start of October (tmsnrt.rs/2dRuLVu). (Editing by Elaine Hardcastle)