meanProf
changeset 33 307630665c6c
parent 0 229a0d72d2ab
child 43 b63fa355644c
child 44 b7654ea68af6
equal deleted inserted replaced
32:7155adf61d77 33:307630665c6c
     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 Feb 22 18:02:40 2008
     5 #                    dlm: Wed Mar 16 07:02:38 2016
     6 #                    (c) 2008 A.M. Thurnherr
     6 #                    (c) 2008 A.M. Thurnherr
     7 #                    uE-Info: 232 0 NIL 0 0 72 74 2 4 NIL ofnI
     7 #                    uE-Info: 14 49 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:
    13 #	Feb 22, 2008: - created from [listBins]
    13 #	Feb 22, 2008: - created from [listBins]
       
    14 #	Mar 16, 2016: - adapted to new Getopt library
    14 
    15 
    15 # Soundspeed Correction:
    16 # Soundspeed Correction:
    16 #	- applied as described in the RDI coord-trans manual
    17 #	- applied as described in the RDI coord-trans manual
    17 #	- sound-speed variation over range is ignored (valid for small gradients)
    18 #	- sound-speed variation over range is ignored (valid for small gradients)
    18 #	=> - same simple correction for all velocity components
    19 #	=> - same simple correction for all velocity components
    19 #	   - simple correction for cell depths
    20 #	   - simple correction for cell depths
    20 
    21 
    21 require "getopts.pl";
    22 use Getopt::Std;
       
    23 
    22 $0 =~ m{(.*/)[^/]+};
    24 $0 =~ m{(.*/)[^/]+};
    23 require "$1RDI_BB_Read.pl";
    25 require "$1RDI_BB_Read.pl";
    24 require "$1RDI_Coords.pl";
    26 require "$1RDI_Coords.pl";
    25 require "$1RDI_Utils.pl";
    27 require "$1RDI_Utils.pl";
    26 
    28 
    31 		 	  "[-%)good <min>] " .
    33 		 	  "[-%)good <min>] " .
    32 		 	  "[output -b)eam coordinates] " .
    34 		 	  "[output -b)eam coordinates] " .
    33 			  "[-M)agnetic <declination>] " .
    35 			  "[-M)agnetic <declination>] " .
    34 			  "[-D)epth <depth>] " .
    36 			  "[-D)epth <depth>] " .
    35 			  "<RDI file>\n")
    37 			  "<RDI file>\n")
    36 	unless (&Getopts("4bd:D:M:p:r:QS:") && @ARGV == 1);
    38 	unless (&getopts("4bd:D:M:p:r:QS:") && @ARGV == 1);
    37 
    39 
    38 die("$0: -4 and -d are mutually exclusive\n")
    40 die("$0: -4 and -d are mutually exclusive\n")
    39 	if ($opt_4 && defined($opt_d));
    41 	if ($opt_4 && defined($opt_d));
    40 
    42 
    41 die("$0: -p and -b are mutually exclusive\n")
    43 die("$0: -p and -b are mutually exclusive\n")