This thread is part of the local weather project - I'm just trying to avoid one monster thread and split the topics a bit, because there is a lot of ground to cover.
It's still a bit in the future, but I have started to think about implementing weather dynamics, and I keep hitting some problems. I wanted to use the opportunity to put the concepts to a discussion early on to see if anyone else can see a good way to do things or can add a useful idea.
First, unless I want real atmospherical dynamics, I don't think CPU time is an issue - clouds drift slowly, it's completely pointless to change the position of a 1000 m scale cloud by 5 cm every frame, that wouldn't even be visible, so positioning loops can run much more slowly and don't take significant resources as compared to other tasks.
The obvious idea is to let clouds and weather effects drift with the wind. That is relatively easy to implement, but has a few problems in particular situations:
1) not all clouds actually do - Lenticularis clouds are for example stationary in strong winds and just mark the spot where the airstream is deflected upward
2) thunderstorms actually create their own wind system - the surface winds are towards the cloud since it sucks air in - but the cloud as such may still drift in the surrounding airmass, on top of which the thunderstorm wind system exists
3) what to do when drifting clouds hit a barrier (frequently an issue in the mountains)
To get this right, a weather tile would need to specify a relatively complex wind system, with mean drift of airmass and low altitude/high-altitude in and outflow of strong convective systems and some winds/clouds tied to terrain features. It's easier to do that offline, to get this to work with real METAR fetch when the system needs to decide if a given wind in a METAR represents just a low altitude inflow into a system or part of mean drift is in all likelihood a nightmare.
Suppose that's done - so you can see clouds moving in a weather tile with the wind system as specified in the tile and tied to the terrain. For a flight from A to B, everything works fine. But if you fly around A and stay there, a new problem occurs:
4) sooner or later all clouds will drift out of the tile, and you see clear skies. For Cumulus clouds which are explicitly generated and die no problem - but the system can't explicitly model the generation of high-altitude clouds and layers in a meaningful way (without massive atmosperical dynamics) so we're a bit stuck.
The solution to that is to let the tile center itself drift with the mean airmass flow. If you stay at A, essentially your initial weather tile moves out, a new tile center approaches and a new weather tile generation is triggered, so you can see changing weather drift by without ever leaving the airport, just as if you would fly to B and trigger new tiles all the time. Sounds neat, but has other difficulties:
5) weather tiles are now moving objects with changing angular size (dependent on their position) and randomly generated orientation. To get any type of multiplayer synchronization quickly becomes a mess - so then probably all weather would need to be generated from a central server and all cloud positions / effect volumes / interpolation points distributed to the player. I don't know what bandwidth is available, in this case every player would need to get the position of O(5000) objects from the server, that's something like 25.000 float numbers. It doesn't seem to be an excessive amount of data in the age of megabit/s data transfer though - but I honestly don't know if that is feasible.
6) weather tiles now could (and in general would) move with different tile center speeds (just because you can't honestly put in a continuity equation for airflow into the system without drastic performance loss) - so a fast tile might eventually merge with a slow one, or a slow tile might create a gap to a fast one. That would chiefly be visible if you stay with a tile a long time, i.e. if you fly with it with the velocity of the airstream. Not doable for planes, obviously, but that's the natural motion of balloons.
One can think of fixing that by enforcing some ad-hoc rules which would try to mimick a continuity equation, but the results of that go beyond what I can comfortably simulate in my imagination without actually coding it.
So - that's where my ideas are at the moment, and I'd appreciate any other thoughts on the matter!