MAMMOTH LAKES — By February, the snow made many neighborhoods here feel subterranean.

Twenty-foot walls of white, corniced by the wind, leaned over the plowed roads. Residents worked feverishly to keep the snow from swallowing their homes. They dug tunnels and narrow passageways to the street, opened portals to get light through second-story windows, shoveled dangerous weight off their roofs.

Unoccupied homes were so buried that a child might unknowingly sled down one. On still nights, when the wind stopped and the plows had passed, the silence was absolute. Only the streetlights and spirals of smoke from unseen chimneys suggested human life.

This year’s record-setting February and continued storms have reconnected residents to a historic rite of passage in California’s highest town, a place that largely came to be because of its monumental snowfall.

Brenda McCann had gone through the many harsh Mammoth snowfalls since her first autumn here in 1998, when four feet fell in two days at Thanksgiving. The old-timers called her neighborhood of Old Mammoth “Moleville” because of its propensity to get buried, turning homes into burrows.

The long drought began to make those eerie winters feel distant, a fading quirk of a town just five hours from Los Angeles that regularly made winters in Buffalo look moderate.

But the heavy snows of 2017 brought back memories. Many homeowners were unprepared, and roofs collapsed.

This winter, the town was ready, as 17 feet of snow landed in February, with more storms following in March.

“My whole house is encased in snow,” said McCann, 54, last week. “I’m in an igloo.”

While her house sits a good four feet above her driveway, she had to climb five feet over a frozen berm to get out, until she had someone plow it away. In the backyard, the snow rises straight up over the two-story roof of her next-door neighbor.

“I’ve seen a lot of dogs on roofs this winter.”

During and after white-out days, people spend so much time shoveling, blowing, shoveling, that their backs wince and their abs feel like they’d done a couple hundred sit-ups.Members come into the gym where McCann works, they say, “I worked out all day, I just need the Jacuzzi.”

One of her friends, who had moved back to Mammoth in summer after many years away, told her: “I’m outta here. Now I remember why I moved away in the first place.”

The sheer volume of the snow creates a logistical puzzle. Where to put it?

The town’s public works crews and the California Department of Transportation use large ribbon-bladed blowers to shoot it up on hills between homes, where it builds until it looms over the roads like a wave ready to take a ship down. Dump trucks haul the rest to a site down Highway 203, where it’s bulldozed off the side of the mesa.

From the huge ski operations on the mountain to town hall to condo complexes to small cabins and trailer homes, the urgent matter day and night has been “snow management.”

“People can’t understand this type of snow,” said Grady Dutton, the town’s public works director. “Fifty-three feet fell at the top of the mountain.”

During storms, his crews hack away at it 24 hours a day. County employees scrape 104 miles of street with seven plows and five massive Kodiak snowblowers, delivering the snow to scattered spots and the “snow pit” off the mesa. “We have a good idea of every nook and cranny in town,” Dutton said.

The machinery keeps the resort town functioning at the height of the ski season.

Mammoth gets its heavy snow due to its altitude and the topography surrounding it. Generally in the Sierra, Pacific storms hit the western slopes and rise into thinner atmosphere against the ridges. The clouds’ relative humidity climbs, ice particles congeal and snow falls — mostly in the highest, uninhabited interior — wrung dry by the 12,000- to 14,000-foot peaks.

But here, storms roll up the deep gorge of the middle fork of the San Joaquin River, rising quickly to a wide break between the high peaks — Mammoth Pass, just 9,300 feet.

Clouds funnel through the pass, and dump snow with a vengeance, particularly on the volcanic Mammoth Mountain, which rises to 11,059 feet.

Most of California’s big snow areas rely on this orographic effect of the storms rising and funneling up deep canyons — Squaw Valley, Bear Valley, Echo Summit and the home of America’s original snow nightmare, Donner Pass.

The community of Tamarack, three miles from Bear Valley, holds the record for the greatest snow depth ever measured in the U.S. — 371/2 feet.

In Mammoth, the remoteness of the area combined with the harsh winters, keeping settlers at bay.

The first to try it were some 2,500 prospectors who built a boom town they called Mammoth City in 1879. That December, storms dumped snow for 18 days. By spring, 28 feet had engulfed the newcomers.

“Residents were forced to cut a warren of snow tunnels to allow them to make their way through town, and businesses hacked long rows of snow steps down to their front doors,” wrote Martin Forstenzer, in “Mammoth: The Sierra Legend.”

Miners strapped barrel staves to their boots to use as skis, taking their cues from a Norwegian man who delivered U.S. mail all over the Sierra no matter the weather. Only a handful of residents stayed to endure the following winter.

Modern Mammoth traces back to 1936, when a penniless 21-year-old from Independence took a job as a hydrographer for Los Angeles Department of Water and Power, which had famously diverted the snowmelt of the Eastern Sierra into an aqueduct to the exploding city.

Dave McCoy’s job was to ski throughout the Sierra measuring snowpack so the water managers in L.A. would know what to expect come summer. He came to realize with the bald lava dome of Mammoth Mountain that it had the deepest snow he had seen, and regularly trekked there with friends to ski. Where the miners had failed, McCoy struck what would become white gold.

But it was a place where skiers could race giddilydown a wide bowl in brilliant sunshine, and an hour later, as a blizzard howls through, start envisioning a fate like the Donner Party’s.

One day McCoy arrived at his friend Ted Cushion’s cabin, only to have it snow unrelentingly for 11 days, according to Forstenzer. When it stopped 20 feet later, McCoy and Cushion went to check on neighbors who ran a tavern. They climbed in a second-story window to find them alive and well. Cushion asked McCoy to check on a couple named Phillips who were winter caretakers of a summer camp.

“He told me about how far it was and how to get to it,” McCoy recalled to Forstenzer. “”But when I got there, I couldn’t see a cabin or anything, anywhere.

“Pretty soon I saw a little opening in the snow with a little bit of smoke coming out of it, and heard a strange noise.”

Down below, the Phillipses were trying to tunnel out by shoveling snow by the front door into the cabin. McCoy helped dig them out. Such conditions never daunted him. McCoy built the first chairlift on Mammoth Mountain in 1955, and retired 50 years later, selling his ski resort for $365 million.

The town contains many microclimates sloping down a thousand feet from the base of the mountain at 8,700 feet into the Long Valley caldera. Some areas might have 10 feet of snow, where others have two. Near the top, and just below the pass, Old Mammoth, gets heaps.

“If you go down some of the smaller streets in town, it is literally tunnels,” said Jo Louise, a hotel receptionist who moved here 22 years ago. “You have to be careful. It’s eerie.”

She was taking a bus to work because her car was buried.

Dave Harvey, 72, was once the president of the town’s search and rescue team. In February, he could hear his house in Old Mammoth groaning under the weight. “You got to respect the snow and wind,” he said. “Make no mistake, this is rugged country.”