Arriving in the land of the Reformation, Pope John II appealed today for greater understanding between Catholics and Protestants at the start of the first papal visit to Germany in nearly two centuries.

At a chilly, rain-swept airport welcome here this morning, the pope set the tone for his five-day visit with a message directed as much to West Germany's 30 million Protestants as to its 27 million Catholics.

"May God grant that my pilgrimage may contribute beyond confessional frontiers to a greater mutual understanding and rapprochement between all Christians and promote the peaceful coexistence of all people in this country," he said in German accented by his native Silesian tongue.

This papal visit is widely seen as more delicate than the seven previous trips John Paul has made during his two-year pontificate.

West Germans, equally apportioned between two of Christianity's major faiths, Roman Catholicism and Lutheranism, have an especially deep interest in the ecumenical movement whose development here has stagnated in recent months under Catholic restraint. Posing a further challenge to the pope's mission is the presence in West Germany of some prominent theological voices for church reform.

Additionally, church-state relations here have been strained. Chancellor Helmut Schmidt, whom the pope met tonight, was angered by a pastoral letter that bishops sent to voters during the recent national election that criticized mounting public debt and the growing role of the state in society. The church also has condemned abortion legislation sponsored by Schmidt's government.

Clearly aware of Protestant sensitivities, John Paul said he wanted to honor the whole German nation and its close links with the history of Christianity. It was in Germany that Martin Luther broke with the Catholic Church and formed the first Protestant denomination.

The pope's greetings went not just to Catholics, he said, but to "all the separated brothers-in-faith.

The pontiff said he looked forward to an audience in Mainz on Monday with Protestant church leaders who want to discuss the Vatican's stand on ecumenical services and the dogma of papal infallibility, which is contested by Protestants.

A foretaste of the reform pressures John Paul is likely to encounter here within his own church were outlined in an open letter last weekend signed by 135 West German religious scholars and other figures, among them rebel theologian Hans Kung and writer Heinrich Boll, also a Catholic.

The letter called on the pope to respond to "signs of the times" and lift the church's ban on artificial birth control, open dwindling ranks of the priesthood to women and married men, and readmit divorced and married Catholics to the sacraments.

But at the first of seven masses to be celebrated during his tour, John Paul indicated that the Vatican has no intention of altering its position, at least on family values.

Speaking under gray, rainy clouds, he told an audience of 340,000 in Cologne that marriages were made to last and that "the taking of unborn life is not a legitimate means of family planning."

"Marriage and the family are deeply bound to personal human dignity," he said from the huge, raised altar built for the occasion. "Physical and sexual union is something great and beautiful. But it is only fully, humanly decent if it is integrated into a personal bond recognized by the civil and church community."

Stressing the church's disapproval of premarital sex and divorce, the pope said, "One cannot love only as a test or accept a person only as a time trial."

Banners with "I love you" in Latin fluttered in the umbrella-covered crowd, and one was visible linking the Polish-born pope with the Polish independent trade union leader, Lech Walesa. It said: "The pope, Poland, Walesa."

From the airfield mass, John Paul traveled by slow motorcade, past thousands who greeted him cheerfully, into Cologne to pay homage at the tomb of St. Albertus Magnus, a 14th century theologian who in his teachings connected belief to reason and whose pupils included Thomas Aquinas. The pope's arrival in Germany coincided with the 700th anniversary of Albertus' death and was the official reason for the pilgrimage.

As bells chimed throughout the city, the pope moved on to Cologne's famous twin-spired cathedral. There, meeting with students and scholars, John Paul called for a new dialogue between science and the church. The remarks were seen as amplifying the church's recent announcement that it would reexamine the case of Galileo, the 17th century astronomer condemned for heresy after concluding that the earth revolves around the sun.

"We are not afraid . . . that a science based on methodically pursued reason could arrive at conclusions that could conflict with religious truth," the pontiff declared.

The papal visit to West Germany is clearly colored by history and marked by the controversy that preceded it.

One public clash occurred over a Roman Catholic booklet issued for the visit that spoke disparagingly of Martin Luther, referring to him as a "church-splitter" and "heretic." The Vatican then said the offending passages "do not reflect the position of the Catholic Church," and the German Catholic leadership apologized.

Additionally, there was some diplomatic wrangling over where to hold the meeting between the pope and Schmidt, who is a Protestant. It finally took place this evening during a glittering state reception in the baroque castle in Bruhl, between Cologne and Bonn.No details of the private talks were disclosed.