YOSEMITE NATIONAL PARK — Snow is one thing — all of the campers were prepared for that — but nobody had told Will Anderson he would need a raft to stay in Yosemite Valley this weekend. If he could even get permission. Which by Friday was impossible.

“I figured it was just going to be snow,” Anderson, 32, of San Marcos (San Diego County) said as he shook out a tent next to a campfire while his two snow-camping buddies folded tarps and packed up their car. “I didn't know there was going to be a flood.”

Anderson and his friends were ordered out of the Upper Pines campground a day earlier than they had planned as Yosemite officials prepared for a potentially damaging flood that meteorologists are predicting along with monsoon-like rains over the weekend.

They were among hundreds of visitors being evacuated from Yosemite National Park so federal officials could prepare to do battle with the mighty Merced River, which is expected to leap its banks and hit peak level Sunday. The storm, dubbed the Pineapple Express because of the warm air moving in from the Pacific, will likely cause the river to rise nearly 7 feet above flood stage at its worst, an event that could, depending on a variety of factors, approach the severity of the devastating flood that inundated the valley in 1997.

“This is a significant storm that we are anticipating,” said Scott Gediman, spokesman for the park, which evacuated all hotels and campgrounds and ordered all non-essential employees out of the valley by 5 p.m. Friday. “We fully understand that this is impacting people’s vacations, so we are not taking this lightly. But Yosemite National Park is by definition a wild place, and storms like this are natural events.”

Owen O’Gara, 8, was helping his parents and grandparents pack the car at Yosemite Valley Lodge, upset that their wintry vacation was being cut.

“Since we were on the top floor, I think we should stay because the flood won’t get that high,” Owen said.

His grandmother, Kathy Wallace-Phelps, 66, said she was told by phone just before the family made the long drive from their Orange County home that they would only be allowed to stay one night in the park instead of the several they had planned.

“I screamed, ‘nooo!’ because this is our family time, but we just couldn’t not come,” said Wallace-Phelps. “And it was worth it, even for one night. It’s so beautiful.”

As vacationers packed their bags Friday, park workers began laying sandbags between the river and the lodge’s Hemlock and Juniper buildings, which are believed to be the most vulnerable structures in the valley.

The concerns are well founded. The so-called “storm of the century,” on New Year’s Day 1997, caused the river to peak above 23 feet — flood stage is 10 feet — inundating the lodge with as much as 5 feet of water.

That flood, the worst since 1955, took out power lines, sewers, bridges and roads while it flooded many buildings and cut off access to the park. Some 1,400 employees and 875 visitors were trapped for more than two days. After the water receded, Yosemite National Park was a morass of mud and debris that remained closed until March that year. The final estimate of damage was $176 million.

Susan Clark, 60, of nearby El Portal was stacking sandbags for the park service at threatened roadways and remembered when the floodwaters came rushing up in the middle of the night, forcing everyone to flee.

“The power and force of the water was like nothing I’ve ever seen,” said Clark, who recalls boulders the size of vehicles crashing down the river and shaking her house. “Overnight it changed the landscape. It was magnificent. We were all awestruck. Just the day and night of it all was unbelievable.”

The coming flood is not expected to be as devastating — not least because there is less snow for the rain to melt — but it could still wreak havoc.

“I’m concerned, of course, but we’ll have to see,” Clark said. “People are more aware now, and nobody would ignore the warning. From my experience, you have to take heed.”

The previous flood helped inspire many of the measures in the Merced Wild and Scenic River Plan, which called for the removal of a lot of the riverside development, including campgrounds, as well as the shoring up of roads and restoration of meadows and riparian habitat. Still, Gediman said, having so much rain come down at the same time increases the potential for watery infiltrations of campground structures, roadways, sewage lines and electrical systems.

“All of these things mean we’re anticipating less damage to the infrastructure,” he said. But “ground saturation could also cause rockslides and dead trees to come down.”

Rusty and Julie Dupray, the hosts at the Upper Pines campground, weren’t about to wait to find out whether their 35-foot long motor home would be washed down the Merced.

“We’re total veterans at getting out,” Julie Dupray said as they loaded the giant vehicle, recalling the time in May 1994 when another flood washed out the camp. “It's an adventure. I mean, if everything ran smoothly, it wouldn’t be much fun.”

Peter Fimrite is a San Francisco Chronicle staff writer. Email: pfimrite@sfchronicle.com