time_series.pl
changeset 51 0f6d9e64cc4f
parent 49 5006e9158207
child 56 8f120b9f795a
equal deleted inserted replaced
50:84914596c635 51:0f6d9e64cc4f
     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: Wed May  2 11:23:48 2018
     4 #                    dlm: Sun Apr 21 14:13:05 2019
     5 #                    (c) 2010 A.M. Thurnherr
     5 #                    (c) 2010 A.M. Thurnherr
     6 #                    uE-Info: 24 57 NIL 0 0 72 2 2 4 NIL ofnI
     6 #                    uE-Info: 25 56 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
    20 #	Apr 17, 2013: - improved gap message (added ensemble range)
    20 #	Apr 17, 2013: - improved gap message (added ensemble range)
    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 
    26 
    26 # NOTES:
    27 # NOTES:
    27 #	- resulting DEPTH field based on integrated w without any sound speed correction
    28 #	- resulting DEPTH field based on integrated w without any sound speed correction
    28 #	- single-ping ensembles assumed, i.e. no percent-good tests applied
    29 #	- single-ping ensembles assumed, i.e. no percent-good tests applied
    29 #	- specified bin numbers are 1-relative
    30 #	- specified bin numbers are 1-relative
   105 					warning(1,"long gap (%ds) after likely profile (0->%d->%dm) --- finishing at ens#$dta->{ENSEMBLE}[$e]->{NUMBER}\n",
   106 					warning(1,"long gap (%ds) after likely profile (0->%d->%dm) --- finishing at ens#$dta->{ENSEMBLE}[$e]->{NUMBER}\n",
   106 						$dt,$max_depth,$depth);
   107 						$dt,$max_depth,$depth);
   107 					last;				
   108 					last;				
   108             } elsif ((abs($depth) < 10) ||											# shallow gap at the beginning
   109             } elsif ((abs($depth) < 10) ||											# shallow gap at the beginning
   109             		 ($depth == $max_depth)) {										# biased in-air data
   110             		 ($depth == $max_depth)) {										# biased in-air data
   110 						warning(1,"long surface gap (%ds) --- restarting at ens#$dta->{ENSEMBLE}[$e]->{NUMBER}\n",$dt);
   111             		 	my($md) = defined($max_depth) ? sprintf('%d',$max_depth) : 'undefined';
   111 						warning(1,"[depth = $depth, max_depth = $max_depth]\n");
   112 						warning(1,"long surface gap (%ds) --- restarting at ens#$dta->{ENSEMBLE}[$e]->{NUMBER} " .
       
   113 								  "[depth = %d m; max_depth = $md]\n",$dt,$depth);
   112 						$firstgood = $lastgood = $e;
   114 						$firstgood = $lastgood = $e;
   113 						undef($atbottom); undef($max_depth);
   115 						undef($atbottom); undef($max_depth);
   114 						$depth = 0;
   116 						$depth = 0;
   115 						$dta->{ENSEMBLE}[$e]->{ELAPSED} = 0;
   117 						$dta->{ENSEMBLE}[$e]->{ELAPSED} = 0;
   116 						$dta->{ENSEMBLE}[$e]->{DEPTH} = $depth;
   118 						$dta->{ENSEMBLE}[$e]->{DEPTH} = $depth;