Behind the Code (technical deep-dive)

Home » Blog » Behind the Code (technical deep-dive)
woman in yellowstone

When I began my internship at the Henry’s Fork Foundation (HFF), I knew I’d be working with data, but I didn’t realize how deep those waters would go. Over the summer, I’ve had the chance to build, expand, and refine some of the core data tools HFF uses to understand the Henry’s Fork and the larger Snake River system.
I know not everyone reading this is a data nerd like me, but I’d love to give you a glimpse of the work I did. I promise to keep it clear, even if some of the details sound technical!
One of my first projects was updating and expanding HFF’s real-time water quantity app. This tool takes data from stream gages and reservoirs and makes it available online for the public, anglers, and water managers. When I arrived, the app mostly focused on Henry’s Fork. My work expanded its reach to include the South Fork of the Snake River and the Snake River headwaters. This meant writing scripts to automatically pull in new data sources, clean them, and link them to the app’s database. It may not sound glamorous, but it means more people can see, in real-time, how water is moving across the basin. And for a watershed where timing and quantity are everything, that kind of access is powerful.

A snippet of what expanded watershed on the web app would look like.

After the real-time work, I shifted to a much deeper task: building what I started calling my “scratch reader” — a daily climate data reader that pulls together records from dozens of stations, some going back to 1971.
This was harder than it sounds. Many of the datasets had issues:
– Negative daily precipitation (DP) values that needed to be corrected.
– Mismatched precipitation and temperature data across stations.
– Missing stretches of climate data that had to be estimated from nearby stations.
An example of fixing one of these issues was, I wrote scripts that:
– Checked for missing or impossible values,
– Paired stations together based on correlations (using SNOTEL and other sources), and
– Filled gaps using linear regression models, cascading through first-, second-, and third-choice reference stations.
By the end, I had created a complete, bias-corrected dataset covering over 40 stations, stretching from the 1970s to the present. This work will hopefully now feed into HFF’s daily water report models — making them stronger, more reliable, and more reflective of long-term climate.

Some of my other detailed work involved temperature and evapotranspiration (ET) data, and a lot of time was spent correcting and filling in missing records.
For example: Developed methods with my mentor to fill precipitation (AP/DP) values year by year, sometimes reaching back to 1989–2006 for stations like Grand Targhee.
It might sound like a tangle of scripts and CSV files (and sometimes it felt that way), but the outcome was simple: turning incomplete, messy climate histories into usable, trustworthy records.

The Henry’s Fork Foundation has long relied on data to guide water management and conservation. The work I did this summer ensures that the models HFF runs each day are backed by decades of climate history — not just today’s conditions. That means better forecasts, more informed management, and a stronger foundation for science-driven decisions in the watershed.
For me, it also showed how much persistence data science takes. Debugging, checking correlations, re-running models — it’s a lot like wading through a river. You have to keep moving, even when the current pushes back.

 

Can’t forget my first wading experience!
Collecting data from the logger.

 

 

 

 

 

 

 

 

 

 

 

 

Of course, this internship wasn’t only about code. The people I worked with, my fellow interns, HFF staff, and especially Dr. Rob Van Kirk, made this experience incredibly meaningful.
As the summer went on, one by one the other interns finished their projects and headed home. I’m wrapping up a week later, with the intern suite strangely quiet. Saying goodbye wasn’t easy, especially after all the shared adventures, from hiking Packsaddle Lake to sandboarding at the St. Anthony dunes.
It’s bittersweet to leave both the friends I made and the Idaho waters I’ve come to love. But just like the datasets I worked on, I feel like these experiences will stay with me long after the gaps are filled.

At the Sand Dunes..
At Packsaddle Lake.
Facebook
LinkedIn
Pinterest

Recent Posts

A photo taken of Island Park Reservoir while standing on the dam and looking north. The sky is cloudy, Mt Sawtelle sits with little snow in the background, and the reservoir is open water (save for a few small sheets of ice in the distance).
Water Quality
Christina Morrisett

Reservoir Ices Off, Growing Season Turns On

Photo of an ice-free Island Park Reservoir taken on March 31, 2026 On March 31, 2026, with no accompanying commentary, HFF scientist Christina Morrisett stood on top of Island Park Dam and texted colleagues Rob Van Kirk and Jack McLaren photos of open water on Island Park Reservoir. Rob, eager to see that the reservoir reality matched what he was seeing in the real-time river data downstream, texted back, “Yep! That’s close enough to ice

Read More »
Photo of confluence of Warm River and Henry's Fork
Water Quality
Rob Van Kirk

Water Supply and Water Quality Predictions for Summer 2026

The photo above captures the unprecedented situation we face at the beginning of April. The photo, of the confluence of Warm River and the Henry’s Fork, was taken on February 7 and shows the shocking lack of snow we experienced in the watershed all winter as a result of record-breaking warm temperatures. How will the warm winter and lack of snow affect water supply, water quantity, and fisheries? The highlights are below. If you want

Read More »
Person holding a rainbow trout.
Water Quality
Rob Van Kirk

Water Year 2025: Everything you wanted to know and a lot more!

Every year since 2017, the Henry’s Fork Foundation Science and Technology Team has produced an annual technical report that documents all of our data collection and analysis activities for the year. Water and irrigation year 2025 was a very active year for the team, given one of the hottest and driest summers on record, our 11th year of aquatic invertebrate sampling, and the 20th year of monitoring the rainbow trout spawning run in the Buffalo

Read More »
Fishing
Jamie Powell

Q&A: Are We Seeing Fewer Bugs?

Are aquatic insects actually declining?  Not in the way many anglers might think. After 11 years of data collected across six sites on the Henry’s Fork, we’re seeing that overall invertebrate communities remain abundant, diverse, and comparable—or better—than other top western trout streams. In fact, key indicators show improving water quality and habitat conditions over time.   So why do hatches sometimes feel worse—especially at Last Chance? The short answer: it’s not just about insect

Read More »