Lyndz olagueralyndonmark429 at gmail.com
Sat Feb 19 22:27:30 MST 2022

```Dear Sir Dennis and NCL -experts,

Thank you for this!

I have one more question regarding fourier_info and  ezfftf in NCL.

Is it correct that If I want to get the smoothed time series for the first,
second, and third harmonics, I have to use the *ezfftf*?
(I would like to get the smoothed time series but I can only think of the
ezfftf and save to a netcdf file)

Does this mean that the fourier_info for the first three harmonics is
applied on the following smoothened time series?
cf(:,:,:, 0:1 ) = 0.0             ; First harmonic
cf(:,:,:, 0:2 ) = 0.0             ; Second harmonic
cf(:,:,:, 0:3 ) = 0.0             ; Third harmonic

Code is below
-----------------------------------------------------

Y    = y(lat|:,lon|:,time|:)      ; convenience
printVarSummary(Y)
cf   = ezfftf (Y)                 ; ==> cf(2,nlat,mlon,ntim/2)
printVarSummary(cf)               ; [2] x [73] x [144] x [36]
;print(cf at xbar)
do n=0,nlat*mlon-1
cf at xbar(n) = 0.0               ; reconstruct with harmonics only
end do
cf(:,:,:, 0:3 ) = 0.0             ; set non-desired harmonics  to 0.0
------------------------------------------------------------------------------------

Thank you so much for the help.

Sincerely,
Lyndz

On Sat, Feb 19, 2022 at 6:36 AM Dennis Shea <shea at ucar.edu> wrote:

> *https://www.ncl.ucar.edu/Applications/fouranal.shtml*
> <https://www.ncl.ucar.edu/Applications/fouranal.shtml>
>
> See the example*. fanal_4.ncl ...* in particular, the figure.
>
> The phase component gives the index (subscript) of the maxima.
>
>      (*1*,0)	72         <=== Phases: *location of first maximum*
>      (*1*,1)	36
>      (*1*,2)	12
> for 'latitude', then the first maxima occur at
> finfo(1,lat(72)), finfo(1,lat(36)), finfo(1,lat(12))
>
> If this were 'time', then the first maxima occur at
> finfo(1,time(72)), finfo(1,time(36)), finfo(1,time(12))
>
>
> On Thu, Feb 17, 2022 at 7:42 AM Lyndz via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Dear NCL-experts,
>>
>> I am using the *fourier_info *to extract the amplitude of the first and
>> second harmonics of a 24 time series (
>> https://www.ncl.ucar.edu/Document/Functions/Built-in/fourier_info.shtml)
>>
>> *;[time | 24] x [lon | 42] x [lat | 68]*
>>
>> *finfo_pa = fourier_info(pa(lon|:,lat|:,time|:),2,1.)*
>>
>> But, I am only getting the amplitude, phase, and variance explained from
>> the output.
>>
>> How can I extract the specific time/s (for first harmonics, it is one
>> time, for the 2nd harmonic it is two) when the wave reaches its peak (or
>> the time when I got the amplitude) for the first and second harmonics?
>>
>> I'll appreciate any help on this.
>>
>> Sincerely,
>> Lyndz
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220220/73959db8/attachment.html>
```