For both internal Soviet and internal American reasons Washington needed to deliver some sharp warnings to Moscow. But now that the alarm has been sounded, it makes sense to look carefully at what the Russians have been up to.

Recent examples of bad Soviet behavior turn out to be both marginal and murky. They require discriminating responses, not blunderbuss rhetoric - a little night music, not Beethoven's Ninth Symphony.

The starting point for analysis is the internal American situation. President Carter came to office with the United States winding down its presence in Asia and the Panama Canal. He then staked out numerous goals - in arms control, arms sales, human rights, nuclear proliferation, the Middle East and other matters - from which he has been obliged to retreat.

So the impression is around that he is weak, hesitant and indecisive. That is bad enough here, where the hawks and right-wingers use the atmosphere to block any steps toward peacefully agreement - particularly with the Soviet Union.

The impression has even worse consequences in Russia because of internal political conditions. The declining health of President Leonid Brezhnev means that the Soviet Union has already entered into a period of leadership transition that may last for another year or two.

In times of transition, power inevitably developes upon the army, the police, the party hacks and other upholders of toughness and orthodoxy. For no aspirant leader wants to be seen fighting those forces of law and order. So without necessarily designing to be aggressive, the Soviet Union is prone to drift into self-assertion.

As it happens, there has been a pronounced drift recently. I do not refer to the buildup in Europe or on the Chinese border. Both of those are activities started years ago and going forward without any significant new impulse.

But recently the Russians and Cubans have been very bold in helping Ethiopia resist aggression from Somalia in the Horn of Africa, The Russians seem to be taking advantage of the coup in Afghanistan. They put one in the eye of the United States with the severe sentencing of dissident scientist Yuri Orlov, and they may be preparing stll worse in the Scharansky and Ginzburg cases.

So the shots across the bow recently delivered by the president, the vice president and Zbigniew Brzezinski, the president's national security adviser, serve a double purpose: They show Americans this administration has some mettle, and they warn the Russians that trouble - serious trouble - may be in the offing.

But a continuation of generalized, across-the-board warning can only confirm the doubts of those who question Carter's resolution. What is required now are specific steps that make the Russians pay for the risks they have been taking.

Cuba is the most obvious target. Without going into the details of exactly who did what to whom in Angola, it is clear that the Cubans - with a third of their armed forces in Africa - are playing a role way out of proportion to their size in the world and their proximity to the United States. Fidel Castro needs to be taught the lesson of Finlandization - the lesson that tiny countries next to great powers should behave with circumspection.

A first step in that direction - now long overdue - is to end the liaison mission set up to normalize relations between the two countries. A second is to mount economic pressures so that the Russians have to pick up in hard currency the full Cuban tab. That way the Cubans themselves will come to learn how much adventures in Africa cost them in the way of development foregone at home.

This country clearly has no stomach for direct intervention in Africa. But there is nothing the matter with economic assistance for Africans who want to help themselves. Nor is it wrong to help European countries who are prepared to intervene on the ground. Indeed, one of the things French President Valery Giscard d'Estaing said to Carter was that the United States should be more forthcoming in providing financial aid for African ventures that are now beginning to strain French resources.

As to Afghanistan, what happened there is perhaps so unclear that more watchful waiting is in order. But at some point the United States should reaffirm its interest in the territorial inviolability of Iran and Pakistan - particularly in the latter case if a deal can be worked out whereby nuclear power is given up for economic aid.

A principal virtue of dealing with the Russians on a tit-for-tat basis is that it saves the great enterprise in which all of us have a stake: the strategic arms limitation talks. Indeed, unless the administration moves quickly to a measure-for-measure approach, SALT itself could be washed away in a self-induced,popular wave of anti-Soviet hysteria.