Ungauged node: crash with upstream Diversion node
In case of an existing ungauged node in the model, the calibration process creates a sub-network containing the downstream gauged station, the ungauged stations and the upstream nodes providing the inflows from upstream. As these upstream nodes are already calibrated, they just have to provide the flow previously simulated. Therefore, in the sub-network, they act as "Direct Injection" nodes.
The issue arises when one of these upstream nodes has a Diversion, we then get to source of inflows (the flow simulated in the river at the node and the diverted flow) to distribute in the sub-network and the current implementation is not able to distinguish them.