listEns
changeset 55 540d6574caca
parent 54 21cf468fa8e0
equal deleted inserted replaced
54:21cf468fa8e0 55:540d6574caca
     1 #!/usr/bin/perl
     1 #!/usr/bin/perl
     2 #======================================================================
     2 #======================================================================
     3 #                    L I S T E N S 
     3 #                    L I S T E N S 
     4 #                    doc: Sat Jan 18 18:41:49 2003
     4 #                    doc: Sat Jan 18 18:41:49 2003
     5 #                    dlm: Sun Feb 28 15:46:21 2021
     5 #                    dlm: Wed Mar  3 15:35:40 2021
     6 #                    (c) 2003 A.M. Thurnherr
     6 #                    (c) 2003 A.M. Thurnherr
     7 #                    uE-Info: 351 1 NIL 0 0 72 2 2 4 NIL ofnI
     7 #                    uE-Info: 239 14 NIL 0 0 72 2 2 4 NIL ofnI
     8 #======================================================================
     8 #======================================================================
     9 
     9 
    10 $synopsis = 'list ensemble summaries (default), dump ensembles (-E), time-average ensembles (-T)';
    10 $synopsis = 'list ensemble summaries (default), dump ensembles (-E), time-average ensembles (-T)';
    11 
    11 
    12 # HISTORY:
    12 # HISTORY:
    60 #				  - removed support for multiple input files
    60 #				  - removed support for multiple input files
    61 #	Apr 10, 2018: - added -l)ast bin
    61 #	Apr 10, 2018: - added -l)ast bin
    62 #	May 31, 2018: - BUG: -A was disabled by default
    62 #	May 31, 2018: - BUG: -A was disabled by default
    63 #	Feb 13, 2020: - added support for $readDataProgress
    63 #	Feb 13, 2020: - added support for $readDataProgress
    64 #	Feb 19, 2021: - BUG: -T did not handle new years correctly
    64 #	Feb 19, 2021: - BUG: -T did not handle new years correctly
       
    65 #	Mar  3, 2021: - BUG: debug statement left in place
       
    66 # END OF HISTORY
    65 
    67 
    66 # Notes:
    68 # Notes:
    67 #	- -E/-B outputs data in earth coordinates, unless -b is set also
    69 #	- -E/-B outputs data in earth coordinates, unless -b is set also
    68 #	- -E/-T output is always in ANTS format
    70 #	- -E/-T output is always in ANTS format
    69 
    71 
   232     
   234     
   233 		my($ssCorr) = defined($opt_S) ? ssCorr($dta{ENSEMBLE}[$e],$SS_salin,$SS_temp,$SS_depth) : 1;
   235 		my($ssCorr) = defined($opt_S) ? ssCorr($dta{ENSEMBLE}[$e],$SS_salin,$SS_temp,$SS_depth) : 1;
   234 
   236 
   235 		open(P,">$file") || die("$file: $!\n");
   237 		open(P,">$file") || die("$file: $!\n");
   236 		print(P "#!/usr/bin/perl -S list\n");
   238 		print(P "#!/usr/bin/perl -S list\n");
   237 		print(P "#ANTS#PARAMS# " .
   239 		printf(P "#ANTS#PARAMS# " .
   238 				"date{$dta{ENSEMBLE}[$e]->{DATE}} " .
   240 				"date{$dta{ENSEMBLE}[$e]->{DATE}} " .
   239 				"time{$dta{ENSEMBLE}[$e]->{TIME}} " .
   241 				"time{$dta{ENSEMBLE}[$e]->{TIME}} " .
   240 				"soundspeed_correction{%s} " .
   242 				"soundspeed_correction{%s} " .
   241 				"magnetic_declination{%g} " .
   243 				"magnetic_declination{%g} " .
   242 				"\n",
   244 				"\n",
   529 			if defined($dta{ENSEMBLE}[$e]->{BUILT_IN_TEST_ERROR});
   531 			if defined($dta{ENSEMBLE}[$e]->{BUILT_IN_TEST_ERROR});
   530 		print("\n");
   532 		print("\n");
   531 	}
   533 	}
   532 } # define output format
   534 } # define output format
   533 
   535 
   534 die("$yearbase") unless ($yearbase > 1900);
       
   535 
       
   536 #----------------------------------------------------------------------
   536 #----------------------------------------------------------------------
   537 # Loop Over Ensembles
   537 # Loop Over Ensembles
   538 #----------------------------------------------------------------------
   538 #----------------------------------------------------------------------
   539 
   539 
   540 for ($e=0; $e<=$#{$dta{ENSEMBLE}}; $e++) {
   540 for ($e=0; $e<=$#{$dta{ENSEMBLE}}; $e++) {