The water on both sides of the lock are at completely different levels. The two gates are NEVER open at the same time.
When a boat approaches, the one gate opens to let it in the middle of the the lock. Once that gate is closed then the gate in front opens to let the water in or out to raise or lower the water under the boat (depending if it is going upstream or downstream).
Then the boat can go on at the different level.
Latest Answers