[Thread Prev][Thread Next][Index]

Re: [ferret_users] filter



Hi -
For the LSL_LOWPASS function, I believe you are mis-interpreting the arguments to the function.
yes? show function lsl_lowpass
LSL_LOWPASS(A,cutoff_period,filter_span)
    Returns Least Squares Lanzcos filter of equally-spaced time series
    A: data to be filtered
    cutoff_period: period at which filter attains 1/2 amplitude. <=N
    filter_span: number of input data points used in each filtered output point
So it looks to me as if you may have reversed the second and third arguments. You want:
let LP_u10 = LSL_LOWPASS(u10,366,30)
To compare results, try this, using the monthly_navy_winds data that's distributed with Ferret:
yes? use monthly_navy_winds
yes? let uvar = uwnd[x=115,y=20]
yes? let u_lowpass = LSL_LOWPASS(uvar,132,31)
yes? let u_parzen = uvar[L=@spz:31]

yes? plot uvar,u_lowpass,u_parzen
To save filtered data, I'm not sure quite what you're asking. Whether you've used a function like LSL_LOWPASS or a transformation such as @SPZ, just specify the variable.
! This saves data on the same time axis as the original data, each point
! being smoothed with the filter
save/file=runningmean_u10.nc  rm_u10

!Or you could save one point per month. Here I've started
! with the 16th value, but you could start at any index.
let nt = `rm_u10,RETURN=Lsize`
save/file=month_u10.nc rm_u10[L=15:`nt`:31]
(Or try LIST commands to see what' you're doing).

As to the definitions of the filters and functions, I need to refer you to the sources listed in the documentation for LSL_LOWPASS, and the transformations in Ferret are based on what is in Numerical Recipes.

Ansley

jaya kumar A wrote:
dear ferret users,

I have a doubt regarding low pass filter and running mean.

my data is like this

     currently SET data sets:
    1> ./u_10.1996.nc  (default)
 name     title                                                                I              J         K         L
 U_10_MOD U_10_MOD1[GT=TIME@ASN]           1:360     1:177     ...       1:366

1) I want to 30 days low pass filter on above data and save that output data. i tried this way
let u10 = U_10_MOD[I=1:360,J=1:177,L=1:366]
let LP_u10 = LSL_LOWPASS(u10,30,366)
save/file=lowpass_u_10.nc  LP_u10

!!!!!!!!!!but this is not working !!!!!!!!!!!!!!

2) i want to have 31 days running mean in above data
 let rm_u10= u10[l=@spz:31]
!!!!!!!!normally plotting 31 days running mean we use plot/x=60/y=-20 u10[l=@spz:31]
save/file=runningmean_u10.nc  rm_u10
!!!! but if i want to save 31 days running mean how i will do it
!!!!!!!!!what is the difference in 2 and 1 in ferret!!!!
kindly help  me in this regards, may be i am wrong in thinking,
Thanks in advance for all suggestion

with regards

-
JAYAKUMAR A
Theoretical Studies Division
IITM, Pune-8

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement