President Lopez Portillo of Mexico, who is paying his first official visit to Ronald Reagan's White House this week, invited Cuba's Fidel Castro to his country, gave him big hugs and called him "one of the personages of this century."

Ronald Reagan would never do that.

Lopez Portillo led a diplomatic campaign for the overthrow of the Somoza dictatorship in Nicaragua. He called it a "bloody regime" and accused it of "horrendous genocide."

Ronald Reagan would never have said a thing like that.

In short, the Reagan-Lopez Portillo perceptions of the problems of Central America in particular, and of the world in general, could hardly be more diametrically opposed. So it shapes up as a clenched-teeth and troubled encounter, right?

Wrong, judging by what's been said in preparation, on both sides. This meeting won't be anything like the cozy photo opportunity in early January while Reagan was still president-elect and little more than ceremonial protestations of friendship were exchanged at the border.

This time, the nitty-gritty of Mexican-American relations will be on the table: immigration, oil, trade, tuna fishing rights and all the rest -- including the raw and intractable issue of El Salvador. As with any contact between the two countries, historic strains will be at work, as well.

Despite Mexico's developing oil wealth and America's oil dependency, and despite Mexico's increasingly forceful role in Central America, the so-called Third World complexes of inferiority and super-power superiority are built into the relationship.

But less so, it would appear, than in the past. What one detects in talks with diplomats of both countries is an inclination, at least for now, to emphasize those things that untie and to play down those issues that divide.

On U.S. policy in El Salvador and Central America, for example, I suspect there will be an agreement simply to disagree -- for a time.

"We simply don't see the same Soviet threat in Latin America that you see," says one Mexican official. "We see it more as the Soviets' taking advantage of the inability of some of these regimes, which haven't changed in 200 years, to deal with social problems."

Thus Mexico takes a dim view of American intervention in El Salvador, and supports the Sandinista regime in Nicaragua, while the Reagan administration squeezes it by withholding aid. The Mexicans view left-wing revolution as inevitable, even wholesome, while Reagan and Secretary of State Alexander Haig have nightmare visions of new "Cubas" and falling dominoes.

But even in Central America there are elements in the policy of both countries that, in a certain practical and expedient sense, unite. Start with economic development. By all accounts, Reagan will be ready with a lan for multinational development assistance calculated to take some of the curse off the administration's unilateral, militaristic, East-West approach to the region.

Already, some American officials fear, the idea has been overblown as an American initiative. West Gernam Chancellor Helmut Schmidt didn't help by tossing out a "mini-Marshall Plan" analogy. "To us, that means if you're anti-communist, you get the money," says a Mexican authority, "and the way some people define communist, Lopez Portillo probably looks as Red as they come."

But administration officials hope to sell the idea in a way that will give it the look of a Central American initiative, and at the same time tie it in with Mexican undertakings of which the Lopez Portillo government is particularly proud. One is a unique Mexican-Venezuelan program of generous financing for purchases of their oil by poorer countries in the region on terms that encourage them to spend more on economic development.

The United States probably will take a positive view of a second Mexican innovation: a 22-nation, Third World-oriented summit meeting scheduled for later this year and dedicated to North-South problems. Reagan reportedly will also be ready with a comprehensive new approach to the tormenting problem of Mexican aliens, granting amnesty to some illegally in the United States, allowing for "guest workers" and tightening up enforcement of immigration laws.

There will be at least an accommodating approach on trade. Though the problems are complex, the potential is enticing: Mexico is now America's third largest trading partner after Canada and Japan, with an exploding population offering ever larger markets; and the United States needs Mexican oil.

Not all will be sweetness and light. There's no way to eliminate the negative. But there seems to be, at this beginning stage of the Reagan-Lopez Portillo relationship, a powerful dispostion, born of sensible self-interest on the part of both, to accentuate the positive.