Roger Wets, an American, and Yuri Ermoliev, a Soviet, spend hours sitting and walking together in this village on the outskirts of Vienna. They are mathematicians, developing computer codes designed to help solve the world's food, energy and environmental problems.

Free of the tensions of their cold-warring governments, these two scientists--and colleagues working in similar fields--say that nowhere else in the world could they meet as they do here.

But the Reagan administration wants to bring the Americans home.

Crying spies, data leakage and one-way benefits for the Soviets, the administration wants to withdraw the United States from a unique, 10-year-old detente-era institute here where 100 scientists from East and West cooperate to seek solutions to problems that plague mankind.

The center, known officially as the International Institute for Applied Systems Analysis, is said by the people here to be the only full-time international interdisciplinary scientific facility in the world.

One million dollars in U.S. funds is at stake--roughly the cost of half a new M1 tank, as those being denied the money like to point out. But it is not just the money, say administration officials, who find themselves embroiled in an international controversy over the institute's future.

It is also reaction to events in Poland and Afghanistan and what U.S. officials contend would be the inappropriateness now of maintaining financial support for the institute.

Reagan, in a letter sent this week to Austrian Chancellor Bruno Kreisky, said he opposed continued U.S. involvement in the facility. Kreisky, a strong backer of East-West cooperation, had urged Reagan to show political understanding for the scientific institute's work.

A Reagan administration official involved in drafting the president's position said this week: "The reason IIASA is now the subject of controversy is that it was set up not for good scientific reasons but for political ones. There's a group of people who really value the East-West bridge-building aspect, but that's the point on which the administration can and does disagree."

A number of top U.S. scientists have rallied to the institute's defense. The National Academy of Sciences, which holds the U.S. membership in the institute, passed a resolution last month saying it wants to stay in the program.

But these are difficult times for supporters of East-West contacts, and the institute, a child of detente, stands to lose not only its U.S. parent but its Soviet one too if the administration has its way.

The facility was the outgrowth of an American initiative in 1966 when Lyndon Johnson called for the creation of an East-West institute to work on problems common to industrialized nations. Six years later, during the heyday of detente, it was opened in a handsomely renovated Hapsburg hunting lodge here.

Today, the institute has 17 members, mostly NATO and Warsaw Pact countries, with the United States and the Soviet Union contributing the major portions of the operating budget.

The institute collects data and builds models designed to help governments make complicated decisions on projects affecting their economies and environments. Systems analysis being an intangible craft, the scientists here concede that it is hard to point to concrete products of their efforts.

The value of the institute, its defenders say, is the benefit of working at close quarters with the other side.

"We're not trying so much for breakthroughs as for better understanding," said institute spokesman Peter Schlifke, explaining that a major aim is reaching international agreement on a more factual means for decision-making in such fields as energy, pollution and ecology. "It's certainly not only the research that's important. It's personal contact and learning what makes the other side tick."

Reagan administration officials have not been impressed with the concept of the institute or the quality of its work. In a letter this week to Frank Press, president of the National Academy of Sciences, Reagan's science adviser, George Keyworth, affirmed the administration's opposition to future participation in the institute, charging "Soviet abuse" and a "lack of reciprocity" in its programs.

Keyworth added, "It would be particularly inappropriate to continue our involvement in IIASA in light of other actions we have taken to show our displeasure about martial law in Poland."

One of the things that irked Washington is that the Soviets, through the institute, could plug into extensive U.S. data banks--in particular, a computer hookup to the Lockheed Corp.'s file of unclassified bibliographical information.

This enabled Soviet scientists to obtain easily all references in U.S. publications to such specialized areas as remote sensing by satellites of agricultural crops.

Institute officials, acknowledging that the flow of computer information between Eastern and Western members is unbalanced, argued that the Lockheed information is freely available to anyone who pays for the service. But the institute has now discontinued the Lockheed link.

U.S. security concerns grew last year after allegations in the European press that the institute's secretary, Arkady Belozerov, was a contact for a Norwegian double agent, passing information to the KGB, the Soviet espionage agency.

Belozerov, the highest-ranking Soviet in the institute at the time, resigned shortly after the story broke and institute officials--stressing that nothing secretive or classified is done there--have sought to distance the facility from the affair.

Roger Levien, the institute's director at the time and now director of systems analysis at Xerox, said in a phone interview that the Soviets were "stupid" for using the institute as a cover.

"But I'm convinced," he said, "there's no national security threat from IIASA. In fact, it's the other way around. The national security interests of the world demand that the United States remain a member."

Institute officials say the center serves Western interests by exposing the Soviets to broader scientific influences and encouraging them to adopt a more rational--and thus more predictable--approach to major decisions.

C.S. "Buzz" Holling, a Canadian ecologist and the institute's current director, accused Reagan administration officials of showing "abysmal ignorance" about the nature of the institute's work.

"I see them taking an essentially ideological point of view and criticizing specific one-way transfers without considering the multiplicity of the whole effort," he said. "If they are going to attack things like that, they're attacking the heart and essence of scientific inquiry."

The controversy takes place against the backdrop of big reductions in the overall U.S. science budget. Money for the National Science Foundation, which in turn funds the National Academy of Sciences and, through it, the institute here, was cut 40 percent last year.

To maintain some U.S. presence here, the academy has asked for at least $1 million, down from $2.3 million in years past. U.S. businesses also contribute about $300,000.

Backing on Capitol Hill for the institute is wavering in view of the security concerns raised by the administration. The House Committee on Science and Technology this week approved an amendment that would deny funds if the president determines "that participation in the institute is contrary to national security interests."