President Fidel Castro denounced today planned U.S. military exercises in Central America as "a true deployment of North American troops" and charged that the Reagan administration is proceeding toward a "grave error with incalculable consequences."

"The irresponsible advisers of President Reagan may feel tempted to new steps that make the situation irreversible," the Cuban leader said in a speech. "The difference between this type of psychological warfare and action has been reduced to the minimum."

Castro's warning came in an 85-minute address during celebrations here to mark the 30th anniversary of the start of the Cuban revolution. It sought to depict the Reagan administration's decision to carry out extensive military maneuvers around Nicaragua as a rash attempt to bully the Sandinista government despite grave dangers of regional conflict.

"Practically speaking, Nicaragua already is surrounded by warships and Yankee troops," the 57-year-old president shouted to a festive crowd of tens of thousands. "The threat and the aggression could not be grosser or more repugnant."

Castro's declarations marked the first top-level Cuban response to reports from Washington that the Reagan administration is sending separate naval forces to the Pacific and Caribbean sides of the Central American isthmus and plans to dispatch up to 4,000 troops for ground exercises in Honduras that could last six months.

Although strong in tone, his remarks centered on a warning that things could get out of hand. He notably avoided any pledges of Cuban help for its ally Nicaragua or the rebels in El Salvador.

"We must keep a cool head," he said.

Similarly, Deputy Foreign Minister Ricardo Alarcon declined at an earlier news conference to speculate on what Cuba might do if the United States intervened militarily in Central America, directly or by supporting Honduras in a conflict with neighboring Nicaragua.

The reluctance seemed to strengthen the assessment of several European diplomats in Havana, the capital 600 miles northwest of here, that Cuba's options in such an eventuality would be limited. Judging by Soviet failure to aid Syria and the Palestine Liberation Organization in Lebanon last summer, they said, Moscow appears ill-disposed to risk confrontation with the United States over Central America.

Against this background, Castro reemphasized Cuban backing for efforts by the Contadora group of four Latin American nations to work out a negotiated settlement to Central American tensions before they explode into a larger war.

The four--Mexico, Venezuela, Panama and Colombia--began their effort at Panama's Contadora Island in January. Their foreign ministers are scheduled to meet later this week in Panama as part of the continuing effort.

"We support without fail these attempts in search of a negotiated solution that would be just and dignified for the problems of Central America," Castro said.

He noted that his government expressed this support in a letter to the countries' presidents last week, responding to a message from the four. Nicaragua, in a speech July 19 by junta leader Daniel Ortega, also responded positively, Castro declared. But Reagan, Castro asserted, responded by "practically demanding the resignation of the Sandinista government" and the "precipitous dispatch" of warships to the region.

Castro spoke at the same time as Reagan's press conference, in which the American president expressed support for the Contadora effort.

U.S. officials had welcomed the Contadora attempt previously. At the same time, Washington's efforts have centered on separate missions, one by special Central American envoy Richard Stone and, now, another by a special Central American commission headed by former secretary of state Henry A. Kissinger.

Alarcon, in his news conference, sought to depict Washington's endorsement of the Contadora effort as a screen behind which it was laying the groundwork for military action against the Cuban-allied Sandinista government of Nicaragua and the Nicaraguan-backed leftist rebels of El Salvador.

The Reagan administration, Alarcon said, "is concentrating for a military solution."

Some U.S. officials in Washington have suggested that one mission of the U.S. warships off Nicaragua would be drills for a possible quarantine to prevent shipment of arms into Nicaragua for transhipment into El Salvador Reagan last week declined an opportunity to rule out such a measure.

"Of course, a quarantine is an act of war according to international law," Alarcon said, speaking in English.

Alarcon qualified the dispatch of U.S. warships to the region as a "severe blow" to the Contadora efforts.

Castro clearly aimed at putting the U.S. military moves in opposition to the Contadora peacemaking that he said is supported by Cuba, Nicaragua and most of the other countries in and beyond the region.

"Such maneuvers are dangerous," he charged. "The situation in convulsed Central America has awakened the deepest concern in the entire world, including European countries allied with the United States."

The Cuban leader's speech was interrupted repeatedly by applause from the crowd gathered in this muggy port near the eastern end of the island. The most enthusiastic responses came to Castro's declarations that Cuban militiamen would defend their own country against any American aggression "to the last drop of blood."

The crowd also maintained prolonged applause for visiting Prime Minister Maurice Bishop of Grenada when Castro saluted the revolution of that small Caribbean island--markedly more than for visiting Nicaraguan leaders also hailed by Castro.

Nicaragua has been the focus of Reagan administration action in Central America. Washington contends that the Sandinista government helps relay Cuban supplies to leftist guerrillas fighting to overthrow the U.S.-backed government in El Salvador.

Officials in Washington have said that the military exercises would be part of the effort to stop the arms flow into El Salvador.

Similarly, U.S. sponsorship of antigovernment guerrillas attacking inside Nicaragua from rear areas in Honduras has been aimed at persuading the Sandinista leadership it cannot help Salvadoran rebels with impunity, according to administration officials.

Alarcon maintained, however, that Cuba is not shipping arms to the Salvadorn rebels.

High-ranking Cuban officials have said arms were shipped previously but this has halted, partially because of U.S. interdiction and partially because the guerrillas get what they need by capturing or buying U.S. weapons from the Salvadoran Army.

Castro did not address the issue.

The concerns over Central America overshadowed three days of national celebrations recalling the July 26, 1953, attack led by Castro on the Moncada Army barracks here.

The attack failed. Castro was jailed and 80 to 130 rebels died within a few days.

Nevertheless, it has gone down in Cuban history as the beginning of the revolution that led to the overthrow of Fulgencio Batista on Jan. 1, 1959, and Castro's emergence as a world figure.