Calculates cross spectra quantities of a series.

Note: This function is only available in version 4.1.1 of NCL. If your site is licensed for version 4.1, then you can get version 4.1.1 for free. To get version 4.1.1 of NCAR Graphics software, please contact your site representative. If you don't know who your site representative is, then send email to ncarginf@ucar.edu or call (303) 497-1201.


    function specxy_anal(
        x    : float,
        y    : float,
        iopt : integer,
        jave : integer,
        pct  : float


x, y
1-dimensional arrays of length N containing the data. x and y must be the same length. Missing values are not allowed.
detrending option. iopt = 0 => remove series mean, iopt = 1 => remove the series mean and least squares linear trend.
smoothing to be performed on the periodiogram estimates. This should be an odd number (>= 3). If not, the routine will force it to the next largest odd number.

  jave=0 : do no smoothing
           spcx contains raw spectra estimates (periodogram)
  jave>0 : average jave periodogram estimates together
           utilizing modified daniell smoothing (good
           stability but may lead to large bias ).
           all weights are 1/jave except wgt(1) and wgt(jave)
           which are 1/(2*jave). this is the recommended option.
  It is this number which has the most impact on the
  degrees of freedom.
percent of the series to be tapered (0.0 <= pct <= 1.0). If pct =0.0, no tapering will be done. If pct = 1.0, the whole series is effected. A pct of 0.10 is common (tapering should always be done).


specxy_anal returns the degrees of freedom as a float scalar. It also returns the following attributes:

Example 1

Perform cross-spectral analysis on series x and y:

   iopt = 1    ; remove least squares linear trends from each
               ; series prior to tapering and computing spectra.
   jave = 7    ; Average 7 periodogram estimates using modified Daniel
   pct  = 0.1  ; taper 10% of the data
   dof = specxy_anal (x,y,iopt,jave,pct)

Reference Manual Control Panel

NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?

$Revision: 1.5 $ $Date: 1999/03/31 17:41:30 $