December 6, 2025

Integrating the rTemp Water Temperature Model into GoldSim Using GSPy

Posted by Jason Lillywhite

This blog post describes a GoldSim model application that integrates the rTemp water temperature model into dynamic simulations. The rTemp model calculates the response temperature of water bodies using a comprehensive heat budget approach. Response temperature represents the equilibrium temperature that a fully mixed water column would reach based solely on surface heat exchange processes: 

  • solar radiation
  • atmospheric longwave radiation
  • evaporation
  • convection
  • sediment conduction
Originally developed by Greg Pelletier at the Washington State Department of Ecology for TMDL (Total Maximum Daily Load) studies, the model has been reimplemented in Python and is available on GitHub.

Screen capture of the GoldSim model with rTemp integration

The integration uses the GSPy Python bridge to resolve a temporal scale mismatch: GoldSim operates at a daily timestep for water balance and state management, while rTemp performs high-resolution thermal physics calculations at an hourly timestep. This architecture allows GoldSim to leverage an external physics engine for detailed heat budget calculations while retaining control over simulation time, water balance, and state persistence. The approach is particularly useful for water quality modeling where accurate water temperature predictions are needed for regulatory compliance or ecological assessments.