U.S. refiners did not produce all the gasoline they could have and instead increased production of other, more profitable products during the gasoline shortage earlier this year, a government study suggests.

A consultant's report presented to the Department of Energy's Office of Special Counsel Aug. 7 and obtained by The Washington Post concluded that during the period from November 1978 to May 1979, domestic refiners increased stocks of what the American Petroleum Institute classifies as "All Other Oils" by 12.6 percent, while demand for those products dropped by about .8 percent.

During the same period, according to DOE figures, refining of gasoline dropped and then leveled off.

Energy Department sources said the decision of the oil companies to produce more of the other products was financially a logical one, because those products are more profitable than gasoline, on which the price is regulated.

DOE had hinted in a July 24 report to President Carter on the industry's role in the gas crisis that a key reason for a drop in gasoline production during the shortage period was a shift to the production of more profitable products.

"It is . . . possible that it is more profitable for refiners to maintain or increase the other . . . products at the expense of gasoline because of the federal price control regulations on gasoline," the DOE report stated.

But, the report warned, "DOE does not yet have adequate data on refinery output of other . . . products."

The newly obtained confidential consultant's report -- which DOE Special Counsel Paul Bloom labeled as "preliminary," pointing out it has not been reviewed or accepted by his office -- takes that DOE speculation a bit further. It points out that "during the shortage, U.S. refiners produced an unusually large volume of 'All Other Oils' which does not appear to be justified by the demand levels for these products."

The report notes that "it was not until June 1979, when the gas shortage had peaked, that [the other product] stocks fell below what they had been at the same time in 1978 and motor gasoline stocks rose above their 1978 levels for the first time." By that time, the rise in gasoline stock was too late to help alleviate the gasoline shortages.

A spokesman for the American Petroleum Institute did not deny the report's analysis but said that one reason for the increased production of some "other" products was that the industry was substituting heavier crude oil for the lighter Iranian crude oil that had been used. In the process of making gasoline from the heavier crude, more of the "other" products are byproducts, the API said.

The report was submitted under contract by Cexec, a McLean firm that has been Bloom's primary computer consulting firm but is just beginning to perform the type of analysis offered in this investigation. Consequently, Bloom cautioned that the report does not represent the views or opinions of DOE and still must face careful scrutiny. He cautioned against accepting its findings out of the context of his overall investigation.

The actual mandate for the study called for an analysis of the Rotterdam spot oil market and its impact on the world oil situation, but the consulting firm went beyond that in drawing several conclusions about the recent shortage.

The report cites a need for further investigation into several factors that it said affected domestic shortages this year, including allegations that some traditional suppliers to the United States may have diverted shipments to foreign markets.