PC Spec

Home
Up
PC Spec is a stand-alone program that performs a spectral analysis of the time series data created by Wizard.  Output includes significant wave height; zero-crossing and peak period; zeroth, second, and fourth spectral moments; peakedness parameter; spectral width parameter; and 1-D spectra for 32 frequency bins.  If the instrument is a MacroSpec, then PCSpec also provides the peak wave direction, and 2-D spectral information. 

 

Theory

To derive the 1-D spectra, PCSpec uses a standard FFT.   Before applying the FFT, the pressure time series is demeaned and a cosine taper is applied to the end points.  After the FFT, the 1-D spectra is smoothed with a "box car" filter over 32 adjacent points with no overlap.  The 1-D spectral energy is also compensated for water column attenuation using linear wave theory.   More specifically, the 1-D spectra is calculated, then each of the discrete 1-D spectral values is multiplied by a transfer function, T(f) where T is the lesser of the attenuation factors specified in the PCSpec.DAT file or the expression:

            T = cosh2 kd / cosh2 k (d-z)

where k is the wave number of the discrete spectral value and z is the sensor depth.  The user may also specify a cutoff frequency in the PCSpec.DAT file so that the transfer function is set to zero for frequencies greater than the cutoff frequency.

For the direction analysis, PCSpec uses a discrete spectral approach, except that the steady current is neglected.  A directional spreading function is derived from the demeaned velocity time series.  This function is multiplied by the 1-D spectra derived from the pressure time series to form the directional spectra.

 

top

Running PCSpec

Four files are needed to run PCSpec;  PCSpec.BAT, PCSpec1.EXE, PCSpec2.EXE, and PCSpec.DAT.  To execute PCSpec, simply type from the DOS prompt:

     (ex:  C:\) PCSpec  dddssss .nnn                where             

     dddssss  is the burst output filename (day of the year and serial number)

     nnn  is the file number (001, 002...)

The PCSpec batch file invokes the two executable files.  PCSpec1 reads the dddssss .Bnnn file(s) and:   1) does a unit conversion from pressure units to height of water, 2) calculates the 1-D spectra and associated moments and parameters and 3) stores the results in an intermediate file called dddssss.Pnnn.  The latter is a temporary work file and is erased upon successful completion of PCSpec.BAT.

PCSpec2 reads dddssss .Pnnn, and outputs to the screen and the file dddssss .Snnn.  If the number of direction bins specified in PCSpec.DAT is greater than zero  then PCSpec2 also does a directional analysis and includes this in its output.

 

top

Input File

PCSpec reads initialization data from a file named PCSpec.DAT containing one line with six constants separated by commas.  These constants are:

1.  Maximum factor to use for compensation of water column attenuation.

2.  Nominal distance from the sea floor to the pressure and current meter sensors (in meters).  For a MacroSpec/620, this is 1 m.

3.  Frequency cut-off above which all spectral bins are set to zero.

4.  Output type as explained below.

5.  Number of direction bins.  This should be greater than zero if using a MacroSpec, and zero for all other Macroinstruments.

6.  Constant to convert from units of psi to units of water depth.  This constant should include the specific gravity of water, e.g. to get mks units in standard sea water, the constant is 0.72416 assuming a specific gravity of 1.03.  Note that the PCSpec energy units will be m2s.

The three output options are as follows:

"0" - Only summary statistics are printed, such as significant wave height, peak period, etc.

"1" - Summary statistics and the unidirectional discrete spectra are printed for 32 frequency bins.  If the specified number of direction bins is greater than five, then the output also includes the directional spreading coefficients for each frequency bin.  The coefficients can be used to generate the discrete direction spectra, D(f,q), using equation 1.

"2" - Summary statistics and the entire discrete directional spectra are printed for specified number of direction bins and 32 frequency bins.

Equ. 1:     D(f,q) = p / 2  S(f) / C5 (1 + 2 A cos (p / 2 - q - y1  ) + 2 B cos (p - 2q - y2  ))

where:               y1 = tan-1 (C2 / C1  );              y2 = tan - 1 (C4 / C3  )

                        A = (C12 + C22  );                  B = (C32 + C42  )

and the Ci (i = 1...5) are given in the out put file for each frequency bin, S(f) is the discrete 1-D spectra for frequency bin f, and q  is the compass heading.

 

top

Output File

The various abbreviations which appear in the PCSpec output file are as follows.  Mn is the nth spectral moment, Hs is the significant wave height, Tz is the zero crossing period, Tp is the period of the peak in the spectra, "Peak dir" is the direction (degrees counter clockwise from north) of the peak in the spectra, "Peakedness" (qp ) is the spectral peakedness parameter, and "Spec width" (w) is the spectral width.  All parameters are derived from the spectral results, not the time series.  The length units are determined by the sixth constant in the PCSpec.DAT file.  The time units are seconds.  The terms are defined below.

 

            Mn = S(f) fn df   

            Hs = 4 M0

            Tz = (M0 / M2 )

            qp  = 2 / M02  S2 (f) f df

             w = ( 1 - M22 / (M0 M4))

The directional matrix shows the spectral energy, S(f, q) for discrete values of f and q.  S(f, q) has units of L2 seconds where the length units are dictated by the sixth constant in the PCSpec.DAT.  S(f, q) has been divided by the factor listed at the bottom of the matrix (1x103). 

 

top

 

home  -  products  -  support  -  company  - site map  -  login

   Send mail to coastal@coastal-usa.com with questions or comments about this web site.

Coastal Leasing, Inc.
179 Sidney Street
Cambridge, Massachusetts 02139-4238
USA

Phone: 617-497-1122
Fax: 617-497-1188
E-mail: coastal@coastal-usa.com

Copyright 2002 Coastal Leasing, Inc.  Trademarks are property of their respective owners.  Specifications subject to change without notice.