/******************************************************************************

  FILE:  profstat.cnt

         This control file is used with the profstat program
         to generate statistics on selected profiles in a CODAS database.

         This particular version is used to obtain second difference
         statistics on U, V, and W velocity components in order to
         derive initial thresholds for flagging errant profiles.

  INPUT:  CODAS database
  OUTPUT: 1. text file of profile statistics (.prs)
          2. Matlab file of profile statistics (.mat)
-------------------------------------------------------------------------------
  CONTROL FILE STRUCTURE:

  dbname:       < CODAS database name >
  output:       < root for output filename >
  step_size:    < number of profiles to advance >
  ndepth:       < number of depth bins to read and process>
  time_ranges:  < combined | separate >

  { one or more variable names, followed by various arguments as shown }
  [ < variable name >
      < "label" >                     { in quotes, for labelling the output }

      [ reference:   < start bin > to  < end bin > ]
      [ difference:  < 0 | 1 | 2 > ]     { for no, first, second difference }
      [ statistics:  scale= < n > ]  { 0.01 for output in cm, 1.0 = m, etc. }
      [ histogram:
          nbins=     < n >
          origin=    < n >
          increment= < n >
          style=     < h | c | n | cn > ]      { n = normalized display
                                                 c = cumulative display
                                                cn = cumulative & normalized
                                                 h = neither }
      [ flag_mask:
          < bit-mask >  { bit-mask is any one or more of those defined in
          .               profmask.h; these cumulatively indicate which criteria
          .               to consider in flagging profile bins as bad prior to
          .               calculations.  Default is ALL_BITS. }
          end ]
  end

  {time_ranges:           one of the following }
    < all >              { or } 
                         { list of YMDHMS time pairs }
    < yy/mm/dd hh:mm:ss > to < yy/mm/dd hh:mm:ss >
    .
    .                   
                         { or }
    < @tr_filename >     { where tr_filename is a file of timeranges }
                         { such as the output of timegrid }

-----------------------------------------------------------------------------*/

  dbname:       ../adcpdb/ademo
  output:       ademodf2                 /* no extension! */
  step_size:    2
  ndepth:       56
  time_ranges:  combined

  /* variables list: */
  U
    "U component"
    reference:   4 to 12
    difference:  2
    statistics:  scale= 0.01
    end
  V
    "V component"
    reference:   4 to 12
    difference:  2
    statistics:  scale= 0.01
    end
  W
    "W component"
    reference:   4 to 12
    difference:  2
    statistics:  scale= 0.01
    /* histogram:   nbins= 10 origin= -0.1 increment= 0.02 style= n */
    end
  end

  /* time range list */
	all
  /* 93/04/09 00:02:00 to 93/04/10 23:58:00 */

/*****************************************************************************/
