unifhy-org / unifhy

A Unified Framework for Hydrology
https://unifhy-org.github.io/unifhy
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Allow Components to run on different TimeDomains #2

Closed ThibHlln closed 3 years ago

ThibHlln commented 3 years ago

Since the Interface is merely an exchange of information at the moment, Components cannot be run with different TimeDomains - Model is responsible for checking their strict compatibility. Actually, Model features two checks: one to check that Components span the same period, and one to check that Components' TimeDomains are purely equal (implying same temporal resolution). The former is here to stay, while the latter can be removed once the Interface is capable of producing the summaries that may be required when Components run at different resolution.

At the moment, if this second check is removed, the framework is still functional, but only instantaneous values of the flows of information are exchanged. For example if SurfaceLayerComponent is set up on an hourly timestep, and the others on a daily timestep. The ones on the daily timestep will only get the last hourly value produced by the SurfaceLayerComponent, the other 23 timesteps will be completely unknown to the daily components.

The Interface will need to accumulate values for faster resolution Components for the slower one to get a more representative value of what happened for the several timesteps the faster Components ran for. This could be a maximum, a mean, etc.