time_series.pl
changeset 56 8f120b9f795a
parent 51 0f6d9e64cc4f
child 60 74fecc295d85
equal deleted inserted replaced
55:2d8e1139acd5 56:8f120b9f795a
     1 #======================================================================
     1 #======================================================================
     2 #                    T I M E _ S E R I E S . P L 
     2 #                    T I M E _ S E R I E S . P L 
     3 #                    doc: Sun May 23 16:40:53 2010
     3 #                    doc: Sun May 23 16:40:53 2010
     4 #                    dlm: Sun Apr 21 14:13:05 2019
     4 #                    dlm: Sat Apr 24 11:19:07 2021
     5 #                    (c) 2010 A.M. Thurnherr
     5 #                    (c) 2010 A.M. Thurnherr
     6 #                    uE-Info: 25 56 NIL 0 0 72 2 2 4 NIL ofnI
     6 #                    uE-Info: 26 27 NIL 0 0 72 2 2 4 NIL ofnI
     7 #======================================================================
     7 #======================================================================
     8 
     8 
     9 # HISTORY:
     9 # HISTORY:
    10 #	May 23, 2010: - created from [perl-tools/RDI_Utils.pl]
    10 #	May 23, 2010: - created from [perl-tools/RDI_Utils.pl]
    11 #	Oct 20, 2010: - disabled max_gap profile-restarting code
    11 #	Oct 20, 2010: - disabled max_gap profile-restarting code
    21 #	Nov 27, 2017: - BUG: gap heuristic could not deal with P06#001
    21 #	Nov 27, 2017: - BUG: gap heuristic could not deal with P06#001
    22 #				  - BUG: gap heuristic could not deal with P06#025
    22 #				  - BUG: gap heuristic could not deal with P06#025
    23 #	May  1, 2018: - added reflr u and v calculations
    23 #	May  1, 2018: - added reflr u and v calculations
    24 #				  - BUG: reflr u and v calcs did not work
    24 #				  - BUG: reflr u and v calcs did not work
    25 #	Apr 21, 2019: - improved surface gap warning message
    25 #	Apr 21, 2019: - improved surface gap warning message
       
    26 #	Apr 24, 2021: - output cosmetics
    26 
    27 
    27 # NOTES:
    28 # NOTES:
    28 #	- resulting DEPTH field based on integrated w without any sound speed correction
    29 #	- resulting DEPTH field based on integrated w without any sound speed correction
    29 #	- single-ping ensembles assumed, i.e. no percent-good tests applied
    30 #	- single-ping ensembles assumed, i.e. no percent-good tests applied
    30 #	- specified bin numbers are 1-relative
    31 #	- specified bin numbers are 1-relative
   108 					last;				
   109 					last;				
   109             } elsif ((abs($depth) < 10) ||											# shallow gap at the beginning
   110             } elsif ((abs($depth) < 10) ||											# shallow gap at the beginning
   110             		 ($depth == $max_depth)) {										# biased in-air data
   111             		 ($depth == $max_depth)) {										# biased in-air data
   111             		 	my($md) = defined($max_depth) ? sprintf('%d',$max_depth) : 'undefined';
   112             		 	my($md) = defined($max_depth) ? sprintf('%d',$max_depth) : 'undefined';
   112 						warning(1,"long surface gap (%ds) --- restarting at ens#$dta->{ENSEMBLE}[$e]->{NUMBER} " .
   113 						warning(1,"long surface gap (%ds) --- restarting at ens#$dta->{ENSEMBLE}[$e]->{NUMBER} " .
   113 								  "[depth = %d m; max_depth = $md]\n",$dt,$depth);
   114 								  "[depth = %d m; max_depth = $md m]\n",$dt,$depth);
   114 						$firstgood = $lastgood = $e;
   115 						$firstgood = $lastgood = $e;
   115 						undef($atbottom); undef($max_depth);
   116 						undef($atbottom); undef($max_depth);
   116 						$depth = 0;
   117 						$depth = 0;
   117 						$dta->{ENSEMBLE}[$e]->{ELAPSED} = 0;
   118 						$dta->{ENSEMBLE}[$e]->{ELAPSED} = 0;
   118 						$dta->{ENSEMBLE}[$e]->{DEPTH} = $depth;
   119 						$dta->{ENSEMBLE}[$e]->{DEPTH} = $depth;