Here is a video recording the simulation process.
Please find the code here:
See this post for the 2D version of this model:
I would like to briefly introduce how I created this model in Netlogo.
The method I used to visualize the elevation in a 3D way is inspired by Netlogo's Hill Climbing 3D. Netlogo does not have a built-in function to create a surface based on elevation data. What I did is that I asked patches with pzcor = 0 to read the elevation data, and each create a turtle at zcor equal to the elevation. Then, I use the comment "create-links-with turtles-on neighbors" to create links between the turtles created in the last step, then I hide the turtles. In this way, a "surface" will be created, at least, it looks like a surface for visualization purpose.
The way I created the raindrops falling is inspired by Netlogo's Raindrops 3D. I created turtles representing raindrops at the top of the world, and ask them to face down and forward 2 steps in a tick, until they reach the surface.
To move the raindrops on the surface, it is more tricky. Patches at the base (those with pzcor = 0) have a variable called [top], which measures the elevation plus water height here. The raindrops read the variable [top] and flow to patches with lowest top.
I hope you enjoy this post!