mkProfile
changeset 23 fb0c269b1eaa
parent 21 0b5bbe60131c
child 33 307630665c6c
equal deleted inserted replaced
22:051b45f1c571 23:fb0c269b1eaa
     1 #!/usr/bin/perl
     1 #!/usr/bin/perl
     2 #======================================================================
     2 #======================================================================
     3 #                    M K P R O F I L E 
     3 #                    M K P R O F I L E 
     4 #                    doc: Sun Jan 19 18:55:26 2003
     4 #                    doc: Sun Jan 19 18:55:26 2003
     5 #                    dlm: Wed Nov  5 13:02:59 2014
     5 #                    dlm: Sun Mar 22 10:22:46 2015
     6 #                    (c) 2003 A.M. Thurnherr
     6 #                    (c) 2003 A.M. Thurnherr
     7 #                    uE-Info: 255 17 NIL 0 0 72 10 2 4 NIL ofnI
     7 #                    uE-Info: 91 63 NIL 0 0 72 10 2 4 NIL ofnI
     8 #======================================================================
     8 #======================================================================
     9 
     9 
    10 # Make an LADCP Profile by Integrating W (similar to Firing's scan*).
    10 # Make an LADCP Profile by Integrating W (similar to Firing's scan*).
    11 
    11 
    12 # HISTORY:
    12 # HISTORY:
    86 #	Nov 25, 2013: - expunged checkEnsemble
    86 #	Nov 25, 2013: - expunged checkEnsemble
    87 #	Feb 13, 2014: - added support set_range_lim()
    87 #	Feb 13, 2014: - added support set_range_lim()
    88 #	Mar  4, 2014: - added support to allow missing PITCH/ROLL/HEADING values
    88 #	Mar  4, 2014: - added support to allow missing PITCH/ROLL/HEADING values
    89 #	May 24, 2014: - finally added (gimbal-)pitch & roll to default output
    89 #	May 24, 2014: - finally added (gimbal-)pitch & roll to default output
    90 #				  - renamed heading to hdg and pitchroll to tilt
    90 #				  - renamed heading to hdg and pitchroll to tilt
       
    91 #	Mar 22, 2015: - made it work for moored time series as well
    91 
    92 
    92 # NOTES:
    93 # NOTES:
    93 #	- the battery values are based on transmission voltages (different
    94 #	- the battery values are based on transmission voltages (different
    94 #	  from battery voltages) and reported without units (raw 8-bit a2d
    95 #	  from battery voltages) and reported without units (raw 8-bit a2d
    95 #	  values)
    96 #	  values)
   253 
   254 
   254 if ($lastgood == $atbottom) {
   255 if ($lastgood == $atbottom) {
   255 	print(STDERR "$ARGV[0]: truncated file (ends at max depth)\n")
   256 	print(STDERR "$ARGV[0]: truncated file (ends at max depth)\n")
   256 } elsif (($atbottom > $firstgood) && ($lastgood > $atbottom)) {
   257 } elsif (($atbottom > $firstgood) && ($lastgood > $atbottom)) {
   257 	# all good
   258 	# all good
       
   259 } elsif ($lastgood > $firstgood) {
       
   260 	print(STDERR "$ARGV[0]: no bottom depth found\n")
       
   261 		unless ($atbottom > 0);
   258 } else {
   262 } else {
   259 	if ($opt_Q) {
   263 	if ($opt_Q) {
   260 		print(STDERR "$ARGV[0]: no valid cast data found\n");
   264 		print(STDERR "$ARGV[0]: no valid cast data found\n");
   261 		exit(0);
   265 		exit(0);
   262     } else {
   266     } else {