What he was in for was the kind of lost-in-the-wilderness blizzard that gets depicted in disaster movies, a fierce storm that made him feel so hopeless over a dozen days with no shelter - and eventually, no food - that he started writing last notes to loved ones.
"His survivability, for that length of time, was very low," said Gene Ellis, deputy sheriff of Chelan County, Wash. "He's a lucky young man."
Andrea Dinsmore and her husband are "trail angels," local residents who help hikers. When she retired from driving a truck, she and her husband, a mechanic, opened Dinsmore's Hiker Haven in Baring, Wash., close to the Pacific Crest Trail.
They have a grassy field for pitching tents, or, if the weather is cold, a dormitory with bunks. Usually, Dinsmore said, hikers try to finish the trek before October to avoid the worst weather.
Sarmento arrived at Hiker Haven in mid-October.
"There's whiteout conditions and you lose your sense of direction," Dinsmore said. "We tried to talk Ian into not going, but he went."
After Baring, there is only one town close to the trail, Stehekin, where hikers can restock on food and supplies before the last 90-mile leg to the end point, at Manning Park in Canada.
Sarmento had been doing fine. He had plenty to eat - he carried lots of food - and temperatures weren't that bad, though he was cold from the rain. Then the blizzard began.
Here's how he remembers what happened next:
He figured the snow would turn back to rain overnight, so he pitched a tent and slept. When he awoke, knee-deep snow had buried any signs of the trail.
Sarmento walked around, digging his hiking poles into the snow and following streams. No trail. Finally, he pitched his tent in a canyon, figuring he would wait for help.
He had one day of pasta, rice, and other food - about 5,000 calories - on his first day in the canyon. On his second day, he began rationing what he had, eating 300 to 500 calories per day.
Part of the journal he kept was later posted on the blog of a trail friend from New Zealand. Sarmento wrote this in the canyon:
"I would sometimes feel good in my decision to wait for help, and other times I contemplated trying anything I could to make an escape. I would drift back and forth between feeling relatively calm and sedated, to helpless and anxious. . . .
"By the fifth or sixth day I began imagining airplane sounds from the noise the creek was making, by the seventh or eighth day I began imagining helicopter noises, and by day nine or ten I would constantly hear both airplanes and helicopters so I wore earplugs for the last two days to try to protect my sanity the best I could."
He dreamed of his grandmother's macaroni and cheese, and his favorite stromboli. On his ninth day in the canyon, he ran out of food.
After one more night in the canyon, after he'd written "pretty personal" notes to loved ones, the snow began melting. Sarmento started looking for a way out, walking alongside streams and climbing steep cliffs.
Back in Baring, Andrea Dinsmore called the Stehekin post office on Oct. 17 and learned Sarmento had not shown up to claim his box of food and supplies.
She alerted authorities, who were blocked from mounting a full search because of the weather. Rescue workers could get helicopters into the air, but were blocked by the weather from flying to where they thought Sarmento might be.
By the time one of the counties was able to drop in rescuers near where he last was seen, he had arrived at the Stehekin post office.
Postmaster Jonathan Scherer was putting mail into post office boxes when Sarmento walked in.
Scherer recognized his face from a flier, and said to him: "I never expected to see you. There's going to be a lot of happy people."
Andrea Dinsmore also had been in constant touch with Sarmento's parents, Jeanne and Peter, and their other children (an older son and a younger daughter), to keep them informed about search efforts.
Jeanne Sarmento read trail hikers' websites and hikers' posts on Facebook. She asked for friends, family, and the hikers to pray for her son.
Finally, the couple's phone in Honey Brook rang. The voice was their son's. He was calling home on a satellite phone.
"It didn't really sound like him," Jeanne Sarmento remembered. "Something went out of his voice. . . . It sounded flat."
After he rested and ate, Sarmento made a decision that somewhere deep in her gut, his mother knew he would make - to finish the Pacific Crest Trail.
She had tried to get her son to take a cellphone and other technology on this hike. He refused. This time, she insisted. Finally, he bought a compass and a phone with a GPS.
Sarmento surprised his family by getting an earlier flight into Philadelphia than expected, arriving Nov. 14. From the airport, he took a train to Downingtown and walked to the Home Depot where his mother works.
He still was carrying his backpack and had wild hair and a scruffy beard.
The family had more than the usual gratitude at Thanksgiving, as Sarmento wolfed down a big meal - including his grandmother's mac-and-cheese.
He works at a machine shop now. He might attend college next fall and, in a few years, he might hike the last trail (along with the Appalachian and the Pacific Crest) of hiking's triple crown: the 3,100-mile Continental Divide National Scenic Trail.
A tip from Deputy Sheriff Ellis: Check the forecast first.
"While I will give the kid high marks for tenacity, I don't give him quite as huge marks for good judgment," Ellis said. "The thing is, what catches people is, they don't look at the weather. The Cascades this time of year can be a killer - literally."
Jeanne Sarmento's New Year's wish for her son, whom she says has considerably more intelligence than common sense, is "just for him to be happy. I want Ian to continue to take life by the reins and go in whatever direction he feels necessary."
"But whatever direction he goes in, he damn well better have a GPS."
Contact Carolyn Davis at 610-313-8109, firstname.lastname@example.org, or @carolyntweets on Twitter.