Despite the revolution that shut down Iranian oil output -- and no matter the gas lines in the United States -- world oil production rose to record levels during the first six months of this year.

Sharply increased production from the Arab Gulf states (primarily Saudi Arabia), from the North Sea and from Third World countries outside the oil cartel more than made up for the Iranian loss.

Worldwide oil output was 5.8 percent higher the first half of 1979 then in the comparable period last year according to the authoritative Oil & Gas Journal. The Central Intelligence Agency and administration experts have come up with similar estimates.

These figures are sharply at variance with the impression left earlier this year by former energy secretary James R. Schlesinger and others in the administration, who attributed the U.S. gasoline lines and 40 percent increase in gasoline prices in part to a worldwide oil shortage brought on by Iran.

But to some extent the year-to-year production figures are deceptive, analysts said yesterday. During the first half of 1978, world oil production was kept artificially low, as the industry tried to work off a glut that had put downward pressure on prices the year before. Indeed, U.S. companies seem in retrospect to have gone a little too far in 1978, and to have let inventories fall below normal.

Thus the production increase so far this year to some extent represents recovery, and to some extent reflects the normal annual increase in world consumption of petroleum products.

It is theoretically possible to have an increase in production and a tight world market at the same time.

Prices have also been lifted by anxiety. The chaos in world oil markets spurred by the Iranian revolt has still not totally subsided, and most oil analysts say future production is still marked with uncertainty.

Iran, formerly the second leading producer in the Organization of Petroleum Exporting Countries, reduced its oil output from more than 5.5 million barrels a day to 2.5 million barrels a day during the first six months of 1979.

Nevertheless, total free world oil production was not far below forecasts the major oil companies and the Energy Department made last year before the Iranian revolt.

Oil & Gas Journal, an industry trade publication, says total world oil production averaged 61.8 million barrels a day during the first half of this year compared with 58.7 million barrels a day during the first six months of 1978.

Reflecting on the sharp increase in world oil output, a New York-based international petroleum analyst, Walter J. Levy, said, "Production was definitely higher than people expected."

Levy, however, cautioned that "the danger is that the statistical supply picture can deceive us about the underlying weakness of our position" as oil importers.

The sharpest increase in oil output during the first half of the year came from the Saudis, who raised production 1.4 million barrels a day over their average level during 1978 -- a rise of 18.8 percent. During most of the first six months of this year, the oil-rich kingdom's output exceeded its self-imposed ceiling of 8.5 million barrels a day.

Iraq, likewise, dramatically increased its production by 900,000 barrels a day, a jump of 37.6 percent over last year, and has replaced Iran as the cartel's second leading producer.

Overall, despite the interruptions and sharp decline in Iran's oil output, the 13-member OPEC cartel's production during the first six months of this year rose from 28.3 million barrels a day in January to 31 million barrels a day in June. Moreover, according to Central Intelligence Agency internal analysis, the cartel's oil production continued at higher levels during the first half of 1979 than in the first six months of 1978.

John Lichtlau of the Petroleum Industry Research Foundation says that "there was clearly a shortage during the first quarter" of 1979 but that free world output rose during the second quarter.

As for the current state of world oil markets. Lichtblau says he expects free world production to hold at between 52 million and 53 million barrels a day. During the first three months of this year, Lichtblau says, free world production stood at 50.5 million barrels a day.

At the Energy Department yesterday a senior official said, "Our numbers show production is up dramatically too."

As for Schlesinger's pronouncements earlier this year that the world oil shortage was as much as 2 million barrels a day, the DOE official said, "Our view was that demand including stockbuilding exceeded supply." As for the current oil outlook, the official said, "We are on the knife's edge now -- just about at equilibrium."

Ironically, in June in Geneva as OPEC announced the stiffest price increase since 1973's embargo, most oil ministers said that production and demand were in close alignment.

Before the OPEC meeting opened, Dr. Fadhil Chelabi, an official with the cartel's secretariat, said that much of the confusion in oil markets during the spring resulted from the massive replenishment of inventories in the industrial nations, not from shortages in oil production.

Schlesinger, however, disagreed. A week before the OPEC ministers met he told a Washington press conference that the world shortage ammounted to about 1.6 million barrels a day, and predicted, "There will be some easement, but it will not be great."