President Reagan played the role of hero to the rescue today, braving storm and high water in an attempt to salvage a rain-drenched westeran welcome for his favorite queen, Britain's Elizabeth II.

The president's motorcade forded seven streams of wheel-high water to get to a barren metal hangar at Santa Barbara Airport, which the queen reached after an adventure of her own.

In Long Beach, the queen first left her royal yacht Britannia and then abandoned her flood-blocked limousine for the more reliable transport of a U.S. Navy bus, which took her to the Long Beach airport for the flight here.

The queen changed into knee-high rubber boots and a macintosh in the four-wheel-drive vehicle that took her from Santa Barbara to the president's secluded mountaintop Rancho del Cielo (Heavenly Ranch). Through it all, she wore the same turquoise hat with feather trim on the side. At the ranch, she and Prince Philip had a mostly Mexican lunch with the Reagans, White House Chief of Staff James A. Baker III and his wife Susan, and British Foreign Secretary Francis Pym and his wife.

"You've seen this water before," the president told reporters as he and the queen stood on the ranch house porch, posing for photographs. "I remember it was this way when we signed the economic program."

Perhaps the president was reminded of his economic troubles by his ride down the mountain for the red-carpet arrival ceremony in the hangar. Reagan reached the airport after Secret Service agents had scouted the tortuous road leading from his ranch to U.S. Highway 101 and advised that he and Mrs. Reagan make the trip in a four-wheel-drive vehicle.

It took 30 minutes to negotiate the 6 1/2 miles of hairpin turns and twisting curves, and one White House official acknowledged that he was concerned that the president had been needlessly exposed to a dangerous drive to attend the seven-minute ceremony.

The condition of the road was so bad that a Secret Service detail was trapped on the mountain early Monday morning during a storm. Fog and wind had made the helicopter landing area unusable.

In Washington, a Secret Service spokesman, Joe Petro, told the Associated Press, "We would never permit the president into a dangerous situation unneccesarily."

White House officials said Reagan had been advised of the condition of the road, which is not unusual during the rainy season here, and had decided to go to Santa Barbara anyway. He and Nancy Reagan also decided to go ahead with their plans for a mountaintop lunch for the British royal couple.

The royal visit chewed up most of Reagan's day at a time his administration faces a host of serious foreign and domestic policy problems. All told, including the ceremony, the lunch, the trip down and back up the mountain and a lot of waiting time for a queen, Reagan spent five to six hours of the day involved in the unusual royal visit to his ranch.

His staff was similarly preoccupied. Chief of Staff Baker made the trek up the mountain for the lunch. Deputy Chief of Staff Michael K. Deaver, who said today he had been much more worried about the queen's traveling conditions than she had been, has been detached to accompany her throughout her 10-day visit to the West Coast. "The queen insists upon staying on schedule. She didn't want to cancel anything today," Deaver said.

And White House spokesman Larry Speakes, reflecting the importance that Reagan gives the royal visit over anything else, did not even bother to hold his usual daily press briefing.

The closest Speakes came to discussing any issue during the day was when he was asked at the airport to comment on a report that Rep. John Dingell (D-Mich.) had accused the White House of withholding important imformation about the troubles in the Environmental Protection Agency.

"The president has indicated that we will not use executive privilege to cover up wrongdoing," Speakes said. "If Dingell has any evidence of wrongdoing, he should turn it over to the Justice Department."

To American observers, Queen Elizabeth has seemed rather impervious to both the many cheers and the fewer signs of protest that have marked her visit. In the hangar ceremony, for instance, she gave only a little halfway glance to a welcoming crowd of 1,000 that included many children who had been let out of school for the visit.

However, when the presidential limousine--flying both the U.S. flag and the monarch's royal standard--left the hangar, Prince Philip rolled down the window and acknowledged the cheers.

The ceremony itself featured a 21-gun salute and the playing of both "The Star-Spangled Banner" and "God Save the Queen" by a military band. The massive jet, decorated with the presidential seal, taxied into the hangar and deposited the queen and Prince Philip at the foot of the red carpet, where they were joined by the Reagans.

The president and the queen then walked to the end of the carpet and stood stiffly at attention as the anthems were played. Elizabeth's face was impassive. The president wore what some have called his "patriotic expression," familiar to those who have watched him at parades, ceremonies with important allies and the welcoming home of former prisoners of war.

At the ceremony, Mrs. Reagan wore a brown coat with fur collar and a small brown hat. The queen wore a turquoise dress and hat and two strands of pearls and a diamond brooch.

The welcome for the queen here, which will culminate in an official dinner in San Francisco Thursday night, followed by a 31st anniversary dinner for the Reagans the next night aboard the Britannia, was unprecedented.

Though kings and queens and others of similar rank are customarily accompanied by the U.S. chief of protocol, the relationship between the Reagans and and the British royal couple has become so personal that the first family was unwilling to delegate the ceremonial responsibility.

"As far as I'm concerned, it's perfect," said Chief of Protocol Selwa Roosevelt. "It's a big trip and there's a great deal to be done. Normally, when we do a queen we don't have the president and Mrs. Reagan to move, too."

In 1976, when the queen paid her six-day visit to the United States, she also stayed aboard HMY Britannia. Only in Washington, when President Ford entertained her at a state dinner, did she come ashore to stay in Blair House.

Then, however, Ford left it up to the State Department to arrange an escort. Since the State Department has no navy of its own, officials had to find a volunteer one. Publisher Malcolm Forbes was invited to accompany her flotilla in his 113-foot yacht, Highlander, and while he was at it, provide accommodations for then-chief of protocol Henry Catto and then-U.S. ambassador to Great Britain Anne Armstrong.

On that voyage the Britannia sailed along the Eastern Coast, docking at such ports as Charleston, S.C., Philadelphia and Newport, R.I., where the Fords went aboard as the queen's dinner guests the night before she left.

Deaver said last week the present trip was different from other royal visits because it was the first time a British monarch had toured the West Coast. Queen Elizabeth came to Rancho del Cielo at the personal invitation of Reagan, who, during a ride the two took at Windsor Castle last June, said he would reciprocate at his own ranch.

But the horseback ride planned for today was scrubbed because of mud, rain and slippery conditions, which are normal accompaniments to the rainy season here. A Santa Barbaran attending the hangar ceremony apologized to the president for the weather as he shook hands while waiting for the queen to arrive, but others in this seaside city wondered why the visit was arranged for this time of the year in the first place.

The queen's stopover here wasn't limited to the ranch trip. After flying here from Long Beach in a presidential jet, she attended an official welcome by the city. When she returned from the ranch, she visited the Santa Barbara Mission.

Throughout her visit, Queen Elizabeth has received mostly warm and friendly greetings from Americans. However, there have been a sprinkling of protesters and a few hostile signs.

Last night, a small group of all-purpose demonstrators marched up and down outside the White House press briefing at the Sheraton Santa Barbara with signs that said, "Free Ireland" and "The Malvinas are Argentine." Today the signs of protest were directed more at Reagan than the queen. One placard at the Santa Barbara airport said: "Sixty million more--horror for El Salvador."

At the ranch, the president wore a denim jacket, western shirt, cord tie and boots, and Mrs. Reagan was in a bright red raincoat as they welcomed the queen. They served a combination plate that included enchiladas, tacos, refried beans, chilies rellenos and fresh fruit.

The royal couple, accompanied by the first lady, braved the road from the ranch again to tour Santa Barbara Mission and then flew to Long Beach to board the royal yacht. Weather permitting, the couple and Mrs. Reagan are scheduled to steam up the coast and arrive in San Francisco Thursday morning.