wave_reader: compute hill properly with z-decreasing
Previously, wave_reader computed the hill height as a fixed zgrid(:,1,1) - MinZ // matlab notation which implicitly assumes that z increases along the third index. If that assumption is violated, the BPE calculation breaks (in ways that can cause assertion failures based on roundoff error, at that). Fixing the calculation as min(zgrid(i,1,:)) at initialization time alleviates this problem.
Showing with 3 additions and 1 deletion