PHD Discussions Logo

Ask, Learn and Accelerate in your PhD Research

Question Icon Post Your Answer

Question Icon

How do you add a sub-model for the unsaturated zone and snow storage in MATLAB?

My existing model is a lumped rainfall-runoff code using simple water balance. To improve realism for a mountainous catchment, I need to add physics for water movement in unsaturated soil and snow accumulation/melt. I'm looking for guidance on structuring the code: should I create separate function files, use a specific ODE solver scheme, and how do I handle the coupling between these new storages and my existing river flow generation?

 

All Answers (1 Answers In All)

By Seema Answered 3 years ago

Based on my experience developing catchment models, I recommend a modular approach. First, abstract your core processes into separate functions: one for infiltration_and_unsaturated_flow using a method like the Richards equation simplified, and another for snow_accumulation_melt using a temperature-index model. In your main driver script, use a finite-difference or ODE solver loop. For coupling, have your snow routine output meltwater, which becomes the input to your infiltration function. The key is ensuring your time steps are synchronized and that you carefully pass state variables like soil moisture and snow water equivalent between modules each iteration. Start with coarse daily steps to debug.

 

Your Answer