Stockholm — The ring has tightened around what appears to be a foreign submarine trapped in a Swedish harbor. Since the weekend, depth charges have been dropped near the mysterious - and presumed Soviet - submarine apparently encircled by the Swedish military in the harbor near the top-secret Karlskrona naval base on the Baltic Sea.
The underwater vessel has played cat and mouse with Swedish submarine hunters equipped with radar, sonar, hydrophones, infrared sensors, night vision devices, and possibly additional, secret detection methods.
Although foreign specialists say Sweden has a relatively backward anti-submarine capability, the length of the hunt - nearly a month - suggests the Soviets are using previously unknown, extremely sophisticated methods of infiltration, including sonar jamming. More disturbing are signs that foreign frogmen are operating as if they know the harbor area better than Swedish authorities do. Three frogmen were shot at by Swedish sentries last weekend after they came ashore on Almo Island near the base.
Almo Island is northwest of where a Soviet submarine, apparently armed with nuclear weapons, ran aground in Swedish waters in the fall of 1981.
Foreign military observers say the operation is either aimed at stealing or examining underwater sensors or is a real-life training exercise.
Antony Preston, naval editor of Jane's Defense Weekly in Britain, theorizes that the Soviets suspect the Swedes are using American-designed underwater sensors as part of their coastal defenses and are trying to steal or examine them.
''If the US has supplied technology to Sweden, comparable to the (US underwater listening posts in the North Atlantic), it would give them a good idea what they are facing in the Atlantic,'' he says.
Mr. Preston thinks the Soviets may also be looking for passages along the Swedish coast that would allow them to slip through the Danish straits in the event of a conflict with NATO.
Another military analyst in a European capital doubts that Sweden has any military technology of interest to the Soviets. He suggests the divers and minisubs may be sent on training exercises.
A young Latvian who lives near Stockholm says he met a Soviet Navy veteran about six years ago in Riga, Latvia, who told him he had been in Swedish waters several times on routine missions. Before the man, who had been drinking, could give any details, he was hushed up by his wife, the Latvian says.
The foreign analyst said the Soviets risked an unprecedented international scandal if one of their submarines were sunk, or if a unit of their naval special forces were captured. Speaking before the weekend firing at intruders, he said the Swedes weren't using as much firepower as they could.
''It almost strikes me as if they are caught by political restraints,'' he said, ''or maybe they don't have enough depth charges.''
At the same time, the analyst pointed out that antisubmarine bombardment blots out sonar, destroys any bottom tracks, and reduces underwater visibility, factors the Swedes may be weighing against the chances of hitting the intruders. Sweden may also lack the weapons to destroy intruders even if it detects them.
In shallow water near Sweden's rocky coastline, ''depth charges are no good, '' according to a military observer with antisubmarine experience in a major Western navy. He says a submarine could be hit by a homing torpedo such as the British Stingray, but that it would be difficult in in shallow water.
Even as the military was trying to capture the intruders, officials weren't showing any signs of preparation for the international scandal that a capture or killing of Soviet frogmen would mean.
Right-wing politicians criticized Prime Minister Olof Palme for allowing a top Foreign Ministry official to visit Moscow.
Sweden suspended ministerial visits last April after protesting to Moscow over alleged submarine intrusions, which Moscow denied.
But Mr. Palme had talks in Stockholm last month with Soviet Foreign Minister Andrei Gromyko, who assured him Moscow would respect Swedish territorial waters.