meanProf
changeset 51 148c092b3a09
parent 45 5767cbe470a0
equal deleted inserted replaced
50:6bfec705d25e 51:148c092b3a09
     1 #!/usr/bin/perl
     1 #!/usr/bin/perl
     2 #======================================================================
     2 #======================================================================
     3 #                    M E A N P R O F 
     3 #                    M E A N P R O F 
     4 #                    doc: Fri Feb 22 08:40:18 2008
     4 #                    doc: Fri Feb 22 08:40:18 2008
     5 #                    dlm: Fri Aug 24 13:45:21 2018
     5 #                    dlm: Sat Jul 27 08:27:45 2019
     6 #                    (c) 2008 A.M. Thurnherr
     6 #                    (c) 2008 A.M. Thurnherr
     7 #                    uE-Info: 15 71 NIL 0 0 72 0 2 4 NIL ofnI
     7 #                    uE-Info: 56 36 NIL 0 0 72 0 2 4 NIL ofnI
     8 #======================================================================
     8 #======================================================================
     9 
     9 
    10 # extract time-averaged mean profile from ADCP data
    10 # extract time-averaged mean profile from ADCP data
    11 
    11 
    12 # HISTORY:
    12 # HISTORY:
    38 		 	  "[require -4)-beam solutions] [-d)iscard <beam#>] " .
    38 		 	  "[require -4)-beam solutions] [-d)iscard <beam#>] " .
    39 		 	  "[-%)good <min>] " .
    39 		 	  "[-%)good <min>] " .
    40 		 	  "[output -b)eam coordinates] " .
    40 		 	  "[output -b)eam coordinates] " .
    41 			  "[-M)agnetic <declination>] " .
    41 			  "[-M)agnetic <declination>] " .
    42 			  "[-D)epth <depth>] " .
    42 			  "[-D)epth <depth>] " .
       
    43 			  "[-v)erbose (show progress) " .
    43 			  "<RDI file>\n")
    44 			  "<RDI file>\n")
    44 	unless (&getopts("4bd:D:l:M:p:r:QS:") && @ARGV == 1);
    45 	unless (&getopts("4bd:D:l:M:p:r:QS:v") && @ARGV == 1);
    45 
    46 
    46 die("$0: -4 and -d are mutually exclusive\n")
    47 die("$0: -4 and -d are mutually exclusive\n")
    47 	if ($opt_4 && defined($opt_d));
    48 	if ($opt_4 && defined($opt_d));
    48 
    49 
    49 die("$0: -p and -b are mutually exclusive\n")
    50 die("$0: -p and -b are mutually exclusive\n")
    50 	if ($opt_b && defined($opt_p));
    51 	if ($opt_b && defined($opt_p));
    51 
    52 
    52 $opt_p = 0 unless defined($opt_p);
    53 $opt_p = 0 unless defined($opt_p);
    53 
    54 
    54 $RDI_Coords::minValidVels = 4 if ($opt_4);			# no 3-beam solutions
    55 $RDI_Coords::minValidVels = 4 if ($opt_4);			# no 3-beam solutions
       
    56 $RDI_PD0_IO::show_progress = $opt_v;
    55 
    57 
    56 print(STDERR "WARNING: magnetic declination not set!\n")
    58 print(STDERR "WARNING: magnetic declination not set!\n")
    57 	unless defined($opt_M) || defined($opt_b);
    59 	unless defined($opt_M) || defined($opt_b);
    58 
    60 
    59 $ifn = $ARGV[0];
    61 $ifn = $ARGV[0];