In a decade marked by nagging inflation and lagging productivity, the West German economy invited the envy of other industralized nations -- and 1979 was no exception.

Recovering in the spring from a harsh winter and extended steel strike, the West Germans went on a perform more strongly than even the optimists had expected. Real growth scored 4 1/2 percent, unemployment stayed under 4 percent and the inflation rate for the year averaged a remarkable 4 1/2 percent.

From the outside, West Germany appears as industrially vigorous and economically stable as ever. But inside, fears about the future percolate. There are clouds onn the horizon and Germans would not be Germans if they were not peering toward them.

These jitters are all the greater because a national election approaches in October. Social Democrat Helmut Schmidt, the current chancellor, is running again, and though favored to win, his chief domestic concern remains the continued strong performance of the economy.

Such worry may be overdone. West Germany's magic economic formula of anti-inflation, pro-investment government policy mixed with cooperative labor-management relations has serviced the country well. There is little reason to expect the system to crumble, at least not all at once.

The business community remains sanguine. Polls reflect continued willingness by firms to invest, particularly in capital goods, with little expectation of a recession.

What troubles others, though, is not the world at home but the world abroad, which has been nurturing that traditional scourge of German economics and politics: inflation. The fear here is that further increases in the price of oil and other commodities could set off a wage-price spiral and disrupt the almost unnerving smoothness West Germans have become used to.

The most dramatic change in the West German economic picture in 1979 was in fact in the behavior of prices. Inflation in recent weeks approached 6 percent, which for West Germany, accustomed to rates under 4 percent, is deeply disturbing.

Several factors lie behind the acceleration in prices. Part, of course, is imported -- the result of higher oil prices. But the government also contributed by raising postal rates and broadcasting charges earlier this year. And in July, a 1 percent point increase in the value added tax took effect.

At the year's end, the federal statistics office here announced it was changing the cost of living index. Adjustments had to be made, the government said, because German spending patterns had changed. The base year for the index would also be shifted from 1970 to 1976. The government stressed the change had no political significance.

But it comes at the beginning of an especially critical wage round. Unions are putting forward unusually harsh demands to compensate for the effects of inflation. The two leading trade unions in the country -- the metal workers and the public sector employes -- already have asked for between 9 and 10 1/2 percent.

West German monetary authorities were able to keep inflation down as low as they did in 1979 because they took early action. They set fairly restrictive target zones for the growth of the money supply, consistently raised interest rates and called on a variety of measures to discourage excessive growth of lending by domestic banks.

But the combined threat of further oil price hikes and wage demands is sure to place more pressure on this anti-inflation effort in the coming year. The government already is predicting slower growth in 1980 of around 2 1/2 percent. Otmar Eminger, who stepped down last month as head of West Germany's central bank, warned that if wage settlements this year average above 6 percent, real growth will drop even lower.

Meanwhile, West German efforts in the energy field to pursue a nuclear alternative to oil continues to run into stiff opposition. The ruling Social Democrat party last month supported further development of nuclear power, but conservationists will be forming their own party this month, called the "Greens," and a major aim of theirs will be to resist more atomic power plants.

True, an expected downtown in the economics of the western industralized world in 1980 may reduce growth in the demand for oil, and help keep its prices lower than it otherwise might have been. But that would be cold comfort for the West Germans. More than one German worker in four derives his or her living from exports.

Despite a strong currency, in fact, the German export trade has stayed buoyant. Exports totaled $144 billion in the first 10 months of 1979 compared with $131 billion in the same period the year before.

For the first time since 1965, West Germany's current account showed a deficit in 1979. The key reason for this, though, was not a fall in demand from abroad for German goods. Rather, it was due to a marked worsening of the terms of trade for West Germany, as prices for its imports have risen much faster than those of its exports.

Still, West German companies are finding the competition abroad increasingly tough, with the strong German mark threatening to price them out of some markets.

The drive for improved technology and lower costs is leading to new cooperative arrangements among manufacturers. In telecommunications, for instance, the West Germans are participating in a European consortium. In electronics, leading West German companies have formed links with U.S. semiconductor houses.

Investment in the United States by West German firms also has been an important element in corporate strategy and likely will continue to be so.

Clearly, not all industries have enjoyed West Germany's relative boom year. Shipbuilding continues to lag, surviving on state subsidies. The steel industry, too, has in past years gone through a deep structural crisis involving drastic cutbacks and costly new investment. Output was up at the end of 1979 but capacity utilization remained below that of earlier times.

Meantime, the motor industry, which had been riding a strong upswing in demand returned in 1979 to what the companies call "a more normal level" -- and that seems to be the pattern in 1980 for much of West German industry.