A LevelDemand node associates a minimum and a maximum level (possibly multiple over different priorities) with connected Basins to be used by the allocation algorithm.
Since this connection conveys information rather than flow, an outgoing control link must be used. Below the minimum level the Basin has a demand, above the maximum level the Basin has a surplus and acts as a source. The source can be used by all nodes with demands in order of demand priority.
The same LevelDemand node can be used for Basins in different subnetworks.
Both min_level and max_level are optional, to be able to handle only the demand or surplus side. If both are missing, LevelDemand won’t have any effects on allocation.
This table is the transient form of the LevelDemand table, in which time-dependent minimum and maximum levels can be supplied. With this the levels can be updated over time. In between the given times the levels are interpolated with forward fill (block interpolation), and outside the demand is constant given by the nearest time value. The allocation algorithm evaluates the interpolation at the end of the allocation time step.
This is in contrast with UserDemand and FlowDemand, as allocation will aim to reach the desired level at the end of the allocation time step.
A LevelDemand only has an effect with allocation. For each connected Basin, allocation tries to keep the level between the minimum and maximum level of each demand priority. When the level is below the minimum level, the Basin has a demand for the water needed to reach it, which is met in the order of its demand priority. When the level is above the maximum level, the water above it is available to supply other demands. When there is not enough water for all Basins with the same priority, allocation divides the shortage so that the levels end up a similar distance below their minimum levels.
In allocation.nc these demands are listed under the Basin, not the LevelDemand node. They are positive when the Basin is below its minimum level, and negative when the Basin has water to spare above its maximum level. Flow demands and level demands cannot have the same demand priority within a subnetwork.