Super basic weather simulation over a terrain aimed at creating plausible region masks for use in computer graphics. This is really only simulating adiabatic cooling from orographic lifting. I used the moisture in the air and the dew point to decide when when it should rain (in green).
The air temp and air moisture are advected using a semi-Lagrangian linear back tracing method, however I have left the velocity field static for now.
All the values are quite arbitrary so there sadly isn't much actual science going on here. That's something I'd really like to improve on in future versions. The hard parts are you need a lot of initialization data, as well as quite complex and interdependent systems to model how the atmosphere actually works.
This was a learning exercise in advection and vector fields. I tried to create a wind field that would flow perpendicular to the terrain gradient simulating air flowing around and partially over obstacles, but only in 2D.
Obviously this isn't how real fluid would interact with a rough ground structure. That would ideally be done with a 3D sim. However, for computer graphics purposes, I thought this data could be use to make some cool cloud cover, or possibly to animate clouds/fog flowing over terrain.
Another thing to note is that the scale of this experiment is quite small. I don't think this would be suitable for large scale terrains, and I would imagine the parameterization used in accurate scientific models would not work well at this small scale either. An actual fluid sim would be best.
I found some info online by Jim Elder who nicely described a numerical model for sand dune creation. I read the associated paper by Brad Werner (1995) and created my own little 'sandbox' program to play with these ideas myself.
It was pretty clear this initial implementation was missing some important parts, as the simulation was unstable and all dunes would coalesce into a single gigantic dune. I think this could be reduced by more accurately modeling the wind and turbulence dynamics, especially in the wind shadow region of the dune.
©2021 Kevin Whitfield