specx_anal

Calculates 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.


Synopsis

    function specx_anal(
        x    : float,
        iopt : integer,
        jave : integer,
        pct  : float
    )

Arguments

x
A 1-dimensional array of length N containing the data. Missing values are not allowed.
iopt
detrending option. iopt = 0 => remove series mean, iopt = 1 => remove the series mean and least squares linear trend.
jave
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.
pct
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).

Description

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


Example 1

Perform a spectral analysis on series x:
   iopt = 0    ; remove series mean
   jave = 0    ; no smoothing; return periodogram estimates
   pct  = 0.1  ; taper 10% of the data
   dof  = specx_anal (x,iopt,jave,pct)

Example 2

Perform a spectral analysis on series x but assume x has dimensions nyrs x nmos where nyrs represents the number of years and nmos the number of months. Use NCL function ndtooned:
   iopt = 0    ; remove series mean
   jave = 3    ; Average 3 periodogram estimates using modified Daniel
   pct  = 0.1  ; taper 10% of the data
   dof  = specx_anal (ndtooned(x),iopt,jave,pct)

Example 3

Perform a spectral analysis on series x but assume x has dimensions time x lev x lat x lon and named dimensions "time", "lev", "lat", "lon". Let's assume we want the spectral analysis across time at a specific point lev=kl, lat=nl, lon=ml. Then, using NCL's dimension reordering:
   iopt = 1    ; remove least squares linear trend in x
               ; prior to tapering and computing spectra.
   jave = 5    ; Average 5 periodogram estimates using modified Daniel
   pct  = 0.1  ; taper 10% of the data
   dof  = specx_anal (x(lev|kl:kl,lat|nl:nl,lon|ml:ml,time:),iopt,jave,pct)

Reference Manual Control Panel

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


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