Each morning at 9 o'clock, Fayez Badr climbs into his gold-colored Mercedes and sets out on a tour of the port of Jeddah to assess his progress at what he calls "one of the toughest jobs in the world."

Puffing a Cuban sigar, he roams around the sheds and berths and warehouses, watching vast quantities of cargo being moved out - construction equipment, automobiles, cement, live camels, vegetables, tape recorders - a bewildering cornucopia of goods for the insatiable Saudi market.

A few months ago, conditions in the ports of Saudi Arabia were, as one Western analyst put it, "the worst in the world." These days however, Badr is pleased when he makes his rounds. Since taking office Sept. 1 as president of the Saudi Ports Authoirty he has, by general agreement, come a long way toward ending the chaos and breaking the logiams.

It is a task to which the government assigned the highest priority. By last summer, the country's multi-billion dollar development program and booming consumer markets had created a demand for imports that swamped the outdated ports. Long lines of ships waited months to enter the harbors while piles of damaged and unclaimed merchandise lay strewn about in the jumbled warehouses.

Prices were rising and construction schedules lagging as merchandise and equipment floated at anchor. Some desperate shippers were trucking their goods overland from Europe. Port officials had resorted to hiring a fleet of cargo helicopters to move merchandise directly from ships to warehouses, bypassing the docks.

The backlog spilled over into other countries of the Arabian Peninsula, which are having oil-fuled booms of their own and were finding their ports clogged with shipments destined for Saudi Arabia.

According to a report prepared last summer by the Saudi Arabian Monetary Agency, the country's treasury, "the rapid economic expansion, not-withstanding increased use of air and overland routes, generated port congestion which now constitutes one of the most serious constraints" on the country's economic development.

Badr, a former deputy minister of planning who has doctorate in economics from the University of Southern California, wastes no time on false modesty in describing conditions when he took over and what he has done about it.

Finding 147 ships waiting in Jeddah harbor, some for as long as nine months while demurrage charges piled up, he put the dockworkers on three-shift days, seven days a week, he said. Advised by British consultants, he assigned unloading quotas to receiving agents, set up a makeshift port 25 miles north of Jeddah where he began unloading with small landing craft and banned the unloading of damaged cargo.

"We had ships coming in here that went into service before I was born," said Badr, who is 42. "I issued a notice that two ships more than 15 years old would be allowed into Saudi Arabia unless their equipment had a certificate of good operating condition from one of six approved agenceis."

Even when goods were unloaded from the ships, he said in an interview, they were not moved out of the port because "the consignees were using the port as a free warehouse. I applied the known existing rule that if you don't take it out of here in 15 days, we will sell it."

The result of that, he said, was that long-scarce goods began appearing in the markets and supply houses in abundance, forcing prices down and prompting the Jeddah Chamber of Commerce to appeal, unsuccessfully, for a slowdown in the port.

Badr said he inherited an "epidemic called priority berthing," in which ships were unloaded according to their claim to urgency. Since each ministry and government contractor was claiming the higest priority for his cargo, Badr said, the system only compounded the confusion. He said he has eliminated all priority claims except for live animals, and perishables.

Other sources said that the Saudis continue to grant a sort oof unofficial priority to ships from Communist nations, unloading them and sending them on their way as quickly as possible.

Badr has quickly built a reputation for ruthlessness even among observers who admire his results. "He is a nasty man and that is what the situation called for" one diplomatic analyst said. "He has broken a couple of ankles on the way," said another, and he keeps his employees on a razor's edge. It seems to be working."

While contractors and suppliers trying to get goods into the country still report delays and difficulties, it is generally agreed that most of these are no longer directly attributable to conditions here or in the port of Dammam, across the country on the Persian Gulf.

According to official reports, the average waiting time for a ship in port here has been reduced from 51 days to 12, and should be cut further this month as new facilities are put into operation. Official charts say that in Dammam, the waiting time is only 48 hours, but independent analysts say conditions there are still chaotic.

The helicopters are still flying, though Badr calls them a "panic solution" that he wants to get rid of.

For the future, the country has committed itself to a vast program of port development and expansion that will include major facilities at Jubail and Yenbo and a series of "satellite" ports in now remote towns that are intended to relieve the pressure on the central importing points.