--- a/HISTORY Sun Mar 13 12:33:20 2016 +0000
+++ b/HISTORY Wed Mar 16 08:25:32 2016 -0400
@@ -1,9 +1,9 @@
======================================================================
H I S T O R Y
doc: Mon Oct 12 16:09:24 2015
- dlm: Sun Mar 13 12:32:46 2016
+ dlm: Wed Mar 16 08:25:15 2016
(c) 2015 A.M. Thurnherr
- uE-Info: 51 41 NIL 0 0 72 3 2 4 NIL ofnI
+ uE-Info: 60 0 NIL 0 0 72 3 2 4 NIL ofnI
======================================================================
V1.0:
@@ -52,4 +52,11 @@
- added simple ASCII CTD format [LADCP_w_CTD]
- added auto directory creation to [defaults.pl]
- updated howto
- - published
+ - published V1.2beta3
+ - updated [version.pl] [.hg/hgrc] to V1.2beta4
+ - added ADCP-file checks in [LADCP_w_ocean]
+ - updated howto
+ Mar 16, 2016: V1.2beta4
+ - published on server
+
+
--- a/LADCP_w_CTD Sun Mar 13 12:33:20 2016 +0000
+++ b/LADCP_w_CTD Wed Mar 16 08:25:32 2016 -0400
@@ -2,9 +2,9 @@
#======================================================================
# L A D C P _ W _ C T D
# doc: Mon Nov 3 17:34:19 2014
-# dlm: Sun Mar 13 11:53:56 2016
+# dlm: Sun Mar 13 15:00:12 2016
# (c) 2014 A.M. Thurnherr
-# uE-Info: 222 67 NIL 0 0 72 2 2 4 NIL ofnI
+# uE-Info: 57 52 NIL 0 0 72 2 2 4 NIL ofnI
#======================================================================
$antsSummary = 'pre-process SBE 9plus CTD data for LADCP_w';
@@ -54,6 +54,7 @@
# - temperature histogram resolution increased from 1degC to 0.5degC for no good reason
# Mar 13, 2016: - added simple ASCII file format
# - BUG: Layout error when input had no lat/lon
+# - added lon to simple ASCII format
($ANTS) = (`which ANTSlib` =~ m{^(.*)/[^/]*$});
($WCALC) = ($0 =~ m{^(.*)/[^/]*$});
@@ -142,9 +143,13 @@
$nscans = @ants_;
}
} else { # simple ASCII file format:
- croak("$CNVfile: ASCII file format error (1st rec must be latitude)\n") # header: lat
- unless numberp($rec) && $rec>=-90 && $rec<=90;
- &antsAddParams('lat',$lat=$rec);
+ ($lat,$lon) = split(',',$rec);
+ croak("$CNVfile: ASCII file format error (1st rec must be lat,lon)\n") # header: lat,lon
+ unless numberp($lat) && numberp($lon) &&
+ $lat>=-90 && $lat<=90 &&
+ $lon>=-360 && $lon<=360;
+
+ &antsAddParams('lat',$lat,'lon',$lon);
$sampint = 1/24; $condHistRes = 2; # assumptions: 24Hz
&antsAddParams('ITS',90,'cond.unit','mS/cm'); # ITS-90, mS/cm
$pressF = 1; $tempF = 2; $condF = 3; # Layout: scan press temp cond
Binary file LADCP_w_howto.pdf has changed
--- a/LADCP_w_ocean Sun Mar 13 12:33:20 2016 +0000
+++ b/LADCP_w_ocean Wed Mar 16 08:25:32 2016 -0400
@@ -2,9 +2,9 @@
#======================================================================
# L A D C P _ W _ O C E A N
# doc: Fri Dec 17 18:11:13 2010
-# dlm: Sun Mar 13 10:48:17 2016
+# dlm: Sun Mar 13 15:08:59 2016
# (c) 2010 A.M. Thurnherr
-# uE-Info: 226 76 NIL 0 0 72 0 2 4 NIL ofnI
+# uE-Info: 473 122 NIL 0 3 72 0 2 4 NIL ofnI
#======================================================================
# TODO:
@@ -224,6 +224,7 @@
# - added test for 1500m/s sound speed
# Mar 9, 2016: - added hab field to .wprof output
# Mar 13, 2016: - cleaned up warnings created before LADCP_file is defined
+# - added sanity checks and warnings
# HISTORY END
# CTD REQUIREMENTS
@@ -451,14 +452,31 @@
sub debugmsg(@)
{ printf(STDERR @_) if ($opt_v > 2); }
-#----------------
+#---------------------------
# Read LADCP data
-#----------------
+#
+# sanity checks:
+# - 1500m/s sound speed
+# - single-ping ensembles
+#
+# warnings:
+# - high bandwidth
+# - low transmit power
+#---------------------------
progress("Reading LADCP data from <$LADCP_file>...\n");
readData($LADCP_file,\%LADCP);
progress("\t%d ensembles\n",scalar(@{$LADCP{ENSEMBLE}}));
+error("$LADCP_file: cannot process multi-ping ensembles\n")
+ unless ($LADCP{PINGS_PER_ENSEMBLE} == 1);
+error(sprintf("$LADCP_file: unsupported soundspeed setting (%d m/s != 1500 m/s)\n",$LADCP{ENSEMBLE}[0]->{SPEED_OF_SOUND}))
+ unless ($LADCP{ENSEMBLE}[0]->{SPEED_OF_SOUND} == 1500);
+warning(2,"$LADCP_file: wide-bandwidth setting\n")
+ if ($LADCP{WIDE_BANDWIDTH});
+warning(2,"$LADCP_file: low transmit-power setting\n")
+ unless ($LADCP{TRANSMIT_POWER_HIGH});
+
error("$LADCP_file: not enough LADCP bins ($LADCP{N_BINS}) for choice of -r\n")
unless ($LADCP{N_BINS} >= $refLr_lastBin);
@@ -678,12 +696,6 @@
error("$0: implausibly short cast ($cast_duration seconds)\n")
unless ($cast_duration > 600);
-for (my($ens)=$firstGoodEns; $ens<=$lastGoodEns; $ens++) {
- croak("$LADCP_file: unexpected sound speed (%d m/s != 1500 m/s) at ensemble \#%d\n",
- $LADCP{ENSEMBLE}[$ens]->{SPEED_OF_SOUND},$LADCP{ENSEMBLE}[$ens]->{NUMBER})
- unless ($LADCP{ENSEMBLE}[$ens]->{SPEED_OF_SOUND} == 1500);
-}
-
my($year) = $LADCP{ENSEMBLE}[$firstGoodEns]->{YEAR} % 100;
&antsAddParams(sprintf('dn%02d',$year),$LADCP{ENSEMBLE}[$firstGoodEns]->{DAYNO});
@@ -1040,19 +1052,19 @@
# 2) PPI
#----------------------------------------------------------------------------
-croak("$0: conflicting water-depth information provided by user\n")
+error("$0: conflicting water-depth information provided by user\n")
if defined($opt_h) && defined($water_depth);
if (defined($opt_h)) {
if (numberp($opt_h)) {
$water_depth = $opt_h;
} elsif (-f $opt_h) {
- open(WDF,$opt_h) || croak("$opt_h: $_\n");
+ open(WDF,$opt_h) || error("$opt_h: $_\n");
$water_depth = &antsFileScanParam(WDF,'water_depth');
close(WDF);
undef($water_depth) unless numberp($water_depth);
} else {
- croak("$0: -h $opt_h defines neither number nor existing file\n");
+ error("$0: -h $opt_h defines neither number nor existing file\n");
}
}
--- a/version.pl Sun Mar 13 12:33:20 2016 +0000
+++ b/version.pl Wed Mar 16 08:25:32 2016 -0400
@@ -1,7 +1,7 @@
#======================================================================
# V E R S I O N . P L
# doc: Tue Oct 13 10:40:57 2015
-# dlm: Sun Mar 13 09:36:41 2016
+# dlm: Sun Mar 13 14:54:32 2016
# (c) 2015 A.M. Thurnherr
# uE-Info: 15 20 NIL 0 0 72 0 2 4 NIL ofnI
#======================================================================
@@ -12,7 +12,7 @@
# Mar 8, 2016: - updated antsMinLibVersion to 6.3
#$VERSION = '1.1'; # Jan 4, 2016
-$VERSION = '1.2beta3'; # Jan 5, 2016
+$VERSION = '1.2beta4'; # Jan 5, 2016
$antsMinLibVersion = 6.3;
$ADCP_tools_minVersion = 1.4;