Re: help for fourier_info

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun, 21 Jan 2007 19:57:25 -0700 (MST)

>I am doing some harmonic analysis using the built-in function of fourier_info.
>Also,I know the returned value includes the amplitude and phase of each harmonic.
>But I am wondering what do the amplitude and phase stand for?
> for example:
> f=fourier_info(x,3,1)
> f(0,:,:,:) present the amplitude (amplitude^2= the (real)^2+(imag)^2)
> f(1,:,:,:) present the phase angle
  f(2,:,:,:) % variance
 
> If I want to select wave-1,wave-2,wave-3 and re-build f using the
> fourier_coeficent ,how do I design the script ?
>------------------------------------------------------------------------

    AMP(n)*cos(2*pi*n/N + PHASE(n))

    AMP : amplitude of harmonic 'n'
    PHASE: location of first maximum of AMP
    % VAR: relative power

--------------------------------------------
http://www.ncl.ucar.edu/Document/Functions/Built-in/ezfftb.shtml

See Example 3
--------------------------------------------
if X(time,lat,lon)

  ab = ezfftf ( X ) ; for all times and latitudes
                      ; ab(2,ntim,nlat,mlon/2)

  anot = ab_at_xbar ; mean
 ;anot = 0.0 ; set all to zero

  ab(:,:,:,3:) = 0.0 ; set high coef to 0.0
   
  XX = ezfftb ( ab, anot)

  copy_VarMeta(X, XX) ; optional copy meta data
  printVarSummary(XX)

 
Good luck
    
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jan 21 2007 - 19:57:25 MST

This archive was generated by hypermail 2.2.0 : Mon Feb 05 2007 - 07:15:45 MST