2011_07_10/LADCPproc.defaults
changeset 10 196a179304ee
parent 9 48b2d27aaebf
child 11 d0af7f7aa23b
equal deleted inserted replaced
9:48b2d27aaebf 10:196a179304ee
     1 #======================================================================
       
     2 #                    L A D C P P R O C . D E F A U L T S 
       
     3 #                    doc: Fri Sep 17 09:44:21 2010
       
     4 #                    dlm: Fri Jul  8 00:06:07 2011
       
     5 #                    (c) 2010 A.M. Thurnherr
       
     6 #                    uE-Info: 91 16 NIL 0 0 72 0 2 4 NIL ofnI
       
     7 #======================================================================
       
     8 
       
     9 # default parameters for [mkShearProf]
       
    10 
       
    11 # NOTES:
       
    12 #	- defaults are taken:
       
    13 #		1) from my current UH processing merge control files
       
    14 #		2) from the defaults set in Eric's [merge.c]
       
    15 #	- the default version in the ANTS bin dir is always loaded
       
    16 #	- if there is a version in the current processing directory it is loaded 
       
    17 #	  afterwards
       
    18 #	- per-station parameters can be chosed based on $LADCP_file and $CTD_file
       
    19 # 	- for additional notes, see [LADCPproc]
       
    20 
       
    21 # HISTORY:
       
    22 #	Sep 17, 2010: - created
       
    23 #	Dec  9, 2010: - added doc for ASCII CTD file support
       
    24 #	Jun 15, 2011: - added Svbin_start, Svbin_end
       
    25 #	Jul  7, 2011: - added BT processing parameters
       
    26 
       
    27 #----------------------------------------------------------------------
       
    28 # ASCII CTD file support
       
    29 #----------------------------------------------------------------------
       
    30 
       
    31 # By default, [LADCPproc] reads a standard seabird .cnv file. Alternatively,
       
    32 # the CTD data can be supplied in a plain ASCII file. To do so, the following
       
    33 # variables must be defined in the setup file (-s). Each variable defines 
       
    34 # the field (column) number of the corresponding data field. Fields are
       
    35 # numbered beginning with 1.
       
    36 
       
    37 # $CTD_ASCII_sampfreq		= 1;  ## in Hz
       
    38 
       
    39 # $CTD_ASCII_press_field 	= 1;
       
    40 # $CTD_ASCII_temp_field 	= 2;
       
    41 # $CTD_ASCII_salin_field	= 3;
       
    42 # $CTD_ASCII_lat_field 		= 4;
       
    43 # $CTD_ASCII_lon_field 		= 5;
       
    44 
       
    45 # The following variable is optional.
       
    46 
       
    47 # $CTD_ASCII_badval 		= 999;
       
    48 
       
    49 #----------------------------------------------------------------------
       
    50 # Backscatter Profile Parameters
       
    51 #----------------------------------------------------------------------
       
    52 
       
    53 # The output profile of volume-scattering coefficient is calculated 
       
    54 # from a subset of the bins only. This is based on the observation,
       
    55 # from on a single P403 profile, that the volume-scattering coefficient 
       
    56 # correction of Deines (IEEE 1999) yield similar results only for
       
    57 # bins 3-9. 
       
    58 
       
    59 # The seabed-finding routine, on the other hand, uses acoustic 
       
    60 # backscatter from all bins, as it is possible that the seabed is only
       
    61 # seen in the farthest bins. 
       
    62 
       
    63 $Svbin_start = 3;
       
    64 $Svbin_end	 = 9; 
       
    65 
       
    66 #----------------------------------------------------------------------
       
    67 # Bottom Track Parameters
       
    68 #----------------------------------------------------------------------
       
    69 
       
    70 # First bin to consider when looking for seabed to calculated post-
       
    71 # processed BT. NB: For consistency with EF's code, bin 1 is the 
       
    72 # first bin.
       
    73 
       
    74 $BT_bin_start = 1;
       
    75 
       
    76 # CTD depth above seabed where BT search begins
       
    77 
       
    78 $BT_begin_search_above = 300;
       
    79 
       
    80 # Maximum allowed spread of bin number where max echo is found. Large values
       
    81 # imply sloping seabed and/or large instrument tilt. The default value of
       
    82 # 3 is probably too tight. The range spread calculation should be modified
       
    83 # to take instrument tilt into consideration.
       
    84 
       
    85 $BT_max_bin_spread = 3;
       
    86 
       
    87 # For tricky BT cases, the acoustic backscatter from the seabed can be plotted
       
    88 # and the bottom range set manually. This has been found to be very powerful
       
    89 # in case of 2011_IWISE yoyo profile 160, where the bottom was around 150m 
       
    90 # from the lower turning points and where the method of Deines [1999] clearly
       
    91 # does not work.
       
    92 
       
    93 #$BT_min_depth = xxx;
       
    94 #$BT_max_depht = xxx;
       
    95 
       
    96 # Maximum difference between water depth and average distance of echo max.,
       
    97 # if $BT_min_depth and $BT_max_depth are not set. The stddev of the detected
       
    98 # water depth is added To this number.
       
    99 
       
   100 $BT_max_depth_error = 20;
       
   101 
       
   102 # Maximum allowed difference between reference-layer w and BT w. Note 
       
   103 # that this must be relaxed in regions of significant near-bottom
       
   104 # vertical velocity, e.g. due to cross-slope currents.
       
   105 
       
   106 $BT_max_w_difference = 0.03;
       
   107 
       
   108 #----------------------------------------------------------------------
       
   109 # Shear Processing Parameters
       
   110 #----------------------------------------------------------------------
       
   111 
       
   112 ##   u_bin0, u_bin1, w_bin0, w_bin1: These set the first and
       
   113 ##      last bin indices used when integrating horizontal and
       
   114 ##      vertical velocity, respectively.  The indices start
       
   115 ##      from 1 and are inclusive.  These parameters do not  
       
   116 ##      affect the calculation of shear.  They should specify
       
   117 ##      a good reference layer (for the calculation of the
       
   118 ##      barotropic component) such as bins 1 to 4.
       
   119 
       
   120 $wbin_start	= 1;	## These parameters start from 1, not zero
       
   121 $wbin_end 	= 5;
       
   122 $ubin_start	= 1;
       
   123 $ubin_end	= 5;
       
   124 
       
   125 ##   sh_bin0, sh_bin1: These are like the above except that  
       
   126 ##      they affect the shear calculation only.  They can
       
   127 ##      normally be left at the default range of 1 to 128  
       
   128 ##      (disabled).
       
   129 
       
   130 $shbin_start	= 1;
       
   131 $shbin_end		= $LADCP{N_BINS};
       
   132 
       
   133 ##   w_ref_bin, w_dif: These control one of the editing  
       
   134 ##      criteria recommended by Fischer and Visbeck, or rather
       
   135 ##      a modification of it.  All velocity data are rejected
       
   136 ##      below the point at which the vertical velocity
       
   137 ##      estimate is w_dif larger or smaller than the estimate
       
   138 ##      in w_ref_bin.  I have not found this criterion
       
   139 ##      helpful.  94/12/22: changed, so that only those points
       
   140 ##      where w actually deviates from the mean from 0 to w_ref_bin
       
   141 ##      are flagged.
       
   142 
       
   143 $w_ref_bin = 10;
       
   144 $w_dif	   = 0.05;
       
   145 
       
   146 ##   wake_hd_dif, wake_ang_min, min_wake_w, n_wake_bins:  These control
       
   147 ##      editing based upon the direction and inclination of the package wake,
       
   148 ##      calculated from reference layer U,V, and W.  wake_hd_dif
       
   149 ##      sets how close to the heading of the wake must be to
       
   150 ##      the heading of any beam for interference (in degrees).
       
   151 ##      wake_ang_min sets the minimum wake angle from the
       
   152 ##      vertical for interference (in degrees).  min_wake_w sets
       
   153 ##      the minimum package speed required for wake interference
       
   154 ##      (although upward speed is measured negative, this parameter
       
   155 ##      is input as a positive value).  All three criteria
       
   156 ##      must be satisfied for the wake flag to be set.  n_wake_bins
       
   157 ##      determines how many bins from the top are removed from a
       
   158 ##      flagged profile, the default is 1 (top bin only).
       
   159 ##      Additionally, if the previous ensemble met all
       
   160 ##      interference criteria, the present ensemble
       
   161 ##      will be flagged even if the criteria are not met.
       
   162 ##      Default values are wake_hd_dif=0.0, wake_ang_min=90.0,
       
   163 ##      and min_wake_w=0.1, which results in no wake editing.
       
   164 
       
   165 $wake_hd_dif  = 0.0;   ## set wake editing defaults so that no wake editing
       
   166 $wake_ang_min = 90.0;  ## occurs
       
   167 $min_wake_w	  = 0.1;
       
   168 $n_wake_bins  = 1;     ## wake editing default - top bin only
       
   169 
       
   170 ##   e_max is the maximum error velocity.  An error velocity
       
   171 ##         greater than e_max will flag the other velocity
       
   172 ##         components.  For the BB with 2-ping ensembles, 0.01
       
   173 ##         m/s looks about right for this parameter.  It
       
   174 ##         knocks out the incorrect ambiguity glitches as well
       
   175 ##         as some smaller but still significant glitches.
       
   176 ##         Note that for the BB, the PG criteria operate on
       
   177 ##         percent 4-beam solutions, so PG combined with the
       
   178 ##         e_max provides a reliable filter against big
       
   179 ##         glitches.
       
   180 ##         For the NB with 18-ping ensembles, it is not yet
       
   181 ##         clear whether there is any benefit in using e_max
       
   182 ##         at all.  To be effective, the value will have to be
       
   183 ##         small, something like 0.015 or 0.02.  Note also
       
   184 ##         that for the NB, the pg array holds pg counting
       
   185 ##         both 4-beam and 3-beam solutions, so 3-beam
       
   186 ##         glitches will slip through the e_max net.
       
   187 ##         Default is e_max= 10.0, which effectively disables
       
   188 ##         it.
       
   189 
       
   190 $e_max = 0.1;
       
   191 
       
   192 ##   min_correlation (BB only) is the minimum correlation, in
       
   193 ##      counts, for each beam in a given bin.
       
   194 
       
   195 $min_cor = 70;
       
   196 
       
   197 ##   Shear editing:  This requires 2 passes through the
       
   198 ##      database, one using the option
       
   199 ##            binned_shear_time_range:
       
   200 ##      to set the time range for a pass during which the
       
   201 ##      shear statistics will be calculated on a relatively
       
   202 ##      coarsely grid by binning rather than interpolation,
       
   203 ##      then using the usual option
       
   204 ##            time_range:
       
   205 ##      for the normal pass in which the results of the
       
   206 ##      previous pass can be used to flag bad velocity values
       
   207 ##      based on anomalous shears.  The first pass can include
       
   208 ##      both up and down casts if desired, in which case it
       
   209 ##      would be followed by a second pass for the up and
       
   210 ##      downcasts separately.  The binned shear statistics are
       
   211 ##      saved until they are explicitly recalculated with the
       
   212 ##      "binned_shear_time_range:" option.
       
   213 ##      The shear editing is controlled by these parameters:
       
   214 ##         shear_dev_max= x.x, where x.x is a floating point
       
   215 ##            number giving a threshold in standard
       
   216 ##            deviations.  Any shear component deviating from
       
   217 ##            the binned mean by more than this times the
       
   218 ##            local standard deviation will raise a flag.
       
   219 ##            Suitable values for this parameter are probably
       
   220 ##            in the range 3-5.  Less than 3 is likely to
       
   221 ##            start trimming too many valid samples, more than
       
   222 ##            4 or 5 is likely to do nothing at all.
       
   223 ##         shear_sum_dev_max= x.x gives a threshold used in
       
   224 ##            detecting isolated bad velocity points.  If the
       
   225 ##            sum of two successive bad shears (based on
       
   226 ##            shear_dev_max), divided by the
       
   227 ##            standard deviation, is LESS THAN this amount,
       
   228 ##            then the common velocity point is considered to
       
   229 ##            be an isolated glitch, and it alone is flagged.
       
   230 ##            Otherwise, both velocity samples contributing to
       
   231 ##            a flagged shear will be flagged.  A reasonable
       
   232 ##            value for this parameter is probably around 1-2,
       
   233 ##            but I don't yet have enough experience to be
       
   234 ##            sure.
       
   235 ##         Warning: don't forget to reset the first_x=,
       
   236 ##         first_y=, and first_z= parameters after pass 1
       
   237 ##         (with binned_shear_time_range:).  If you don't, and
       
   238 ##         the depths are not in the database, then the depths
       
   239 ##         will be completely wrong in pass 2 (with
       
   240 ##         time_range:).  You may also want to use a different
       
   241 ##         output file name for pass 1, so that the binned
       
   242 ##         shear statistics file will not be overwritten
       
   243 ##         during pass 2.
       
   244 
       
   245 $max_shdev     = 3.5;	## to disable, set to nan
       
   246 $max_shdev_sum = 1.5;
       
   247 
       
   248 ##   previous ping bottom bounce interference editing is controlled by:
       
   249 ##   clip_margin 0.0 turns off this editing; otherwise, it is the margin in
       
   250 ##      meters (on each side) by which the calculated range of the
       
   251 ##      interference is expanded before clipping.  A reasonable value would
       
   252 ##      be something like 32 (2 depth bins).
       
   253 
       
   254 # NOTES:
       
   255 # 	- default value (90m) taken from comment in merge control files
       
   256 #	- clipping is disabled if water_depth cannot be determined
       
   257 
       
   258 $clip_margin	= 90;  			## default: no previous ping bottom bounce editing
       
   259 $first_clip_bin	= 1; 			## default: apply previous ping clipping to all bins */
       
   260 
       
   261 # tilt editing as in Visbeck's code
       
   262 
       
   263 $max_tilt 		= 22;			# max allowed angle from vertical
       
   264 $max_delta_tilt = 4;			# max allowed ping-to-ping tilt difference
       
   265 
       
   266 # On DIMES US2 stations in Drake Passage it was found that the ambiguity velocity had been
       
   267 # set too low. It appears, however, that aliased velocities are easy to detect because aliasing
       
   268 # causes a large positive velocity to appear as a large negative one, and vice versa.
       
   269 # The following defines the maximum allowed discrepancy between the vertical velocity from CTD
       
   270 # pressure and the LADCP reference-layer w. This parameter should probably be set to something
       
   271 # similar as the ambiguity velocity.
       
   272 
       
   273 $w_max_err = 2.5;
       
   274 
       
   275 
       
   276 1;