Industrial production rose 0.4 percent last month and probably would have climbed 0.7 percent except for the continuing coal strike, the Federal Reserve reported yesterday.

It was the second seasonally adjusted increase in a row for the index -- which charts the output of the nation's factories, utilities and mines -- with the estimate for March revised upward to a 0.5 percent gain. The figure for February was also revised upward but still shows a 0.1 percent decline.

The numbers were further evidence that the economy is not declining as many forecasters -- including those in the Reagan administration -- expected it would this spring.

Acknowledging this, Alan Greenspan of Townsend-Greenspan & Co. this week changed his forecast for the gross national product, a broader measure of economic performance than the industrial production index. Earlier his forecast had included drops in GNP, after adjustment for inflation, in both the second and third quarters. Now he is predicting small gains of 0.4 percent for the second quarter and 0.7 percent for the third.

Separately, the Federal Reserve said that the measure of the nation's money supply known a M1-B, which includes currency in circulation and checking deposits at financial institutions, rose by $3.1 billion to a total of $430.9 billion in the week ended May 6. [tables on C10] the figure for the previous week was revised downward by $800 million, however.

The latest weekly increase was in line with what many financial analysts had been expecting, but so long as the weekly money supply figures keep increasing by substantial amounts, interest rates are unlikely to come down significantly. Most investors treat large increases in the money supply as a signal that the Fed will have to tighten credit conditions to keep the monetary aggregates growing in line with the central bank's targets, and in anticipation of those moves the investors immediately seek higher interest rates on their money.

Although the economy is expanding only very slowly, it nevertheless has been stronger than expected, and this has helped boost money-supply growth. Forecasts such as Greenspan's showing continued upward movement in the economy, coupled with concern that the federal budget deficit will top $60 billion this year, could keep interest rates high for some time, analysts said.

Federal Reserve authorities, who have had some of the most pessimistic forecasts going, still believe there could be some dips in the economy in coming months. So do administration officials such as Murray Weidenbaum, chairman of the Council of Economic Advisers, who warned last week that 1981 would be a "soft and soggy year."

Among the groupings by market within the index of industrial production, output of consumer goods rose 0.8 percent in April as auto assemblies increased about 5 percent to an annual rate of 6.8 million units, the Fed reported. At the same time, retail auto sales were dropping from their rebate-spurred levels of March, so that inventories rose by about 100,000 units during April. Whether the industry will continue to build cars at the April rate could depend heavily on the future path of sales.

The output of business equipment climbed 1.2 percent last month, as did production of defense and space goods. Total materials production fell 0.3 percent, reflecting a 50 percent drop in coal output.