--- a/LADCPproc.bestLag
+++ b/LADCPproc.bestLag
@@ -1,9 +1,9 @@
#======================================================================
# L A D C P P R O C . B E S T L A G
# doc: Tue Sep 28 21:58:48 2010
-# dlm: Wed Mar 19 21:33:30 2014
+# dlm: Sat Jul 19 18:32:26 2014
# (c) 2010 A.M. Thurnherr
-# uE-Info: 28 45 NIL 0 0 72 2 2 4 NIL ofnI
+# uE-Info: 29 44 NIL 0 0 72 2 2 4 NIL ofnI
#======================================================================
# TODO:
@@ -26,6 +26,7 @@
# Oct 19, 2012: - BUG: opt_i had wrong sign!
# Jun 25, 2013: - adapted to :: %PARAM convention
# Mar 19, 2014: - moved %PARAM to LADCPproc
+# Jul 19, 2014: - made lagging obey -z)oom
sub interp_LADCP_w($$)
{
@@ -181,7 +182,7 @@
$best_lag = $i if ($nBest{$i} > $nBest{$best_lag});
}
croak("\n$0: cannot determine a valid lag\n")
- unless ($nBest{$best_lag} > $opt_n/3);
+ unless ($opt_z || $nBest{$best_lag}>$opt_n/3);
print(STDERR "\n\n\t\tWARNING: only $nBest{$best_lag} of the lag estimates agree!\n")
if ($nBest{$best_lag} < $opt_n/2);