Problem with filtering
Added by Ralf Mueller almost 14 years ago
original from Pierre-Antoine.Bretonniere@cerfacs.fr:
I'm using CDO filtering operators and I'm facing a problem with the result of highpass.
I want to remove frequencies lower than 6 months to a one year time serie of heat fluxes and I get strange results (see highpass.jpeg attached): "horizontal ondulations/vertical bands" appear that have no physical > reason to be there.
I take a one year time serie (1st of january plotted in non_filtered.jpeg)
I apply command: cdo -highpass,2 infile.nc outfile.nc
And I get highpass.jpeg (1st of january plotted)Would you have any explanations of what happens with this filter? I don't get any trouble with the lowpass and I tried the highpass operator on other files with the same result so I don't think the problem comes from the input file.
Tanks a lot for your help,
Cordially,
highpass.jpeg (48.6 KB) highpass.jpeg | |||
non_filtered.jpeg (49.5 KB) non_filtered.jpeg |
Replies (7)
RE: Problem with filtering - Added by Ralf Mueller almost 14 years ago
Hi Pierre-Antoine!
This sound strange and if lowpass does not show these straps, that might be an implementation issue. Nevertheless it would be helpfull to have your input data to reproduce this behaviour. So please upload it, if possible.
kind regards
ralf
RE: Problem with filtering - Added by Ralf Mueller almost 14 years ago
As stated in the documententation the frequency parameter is used in terms of years. So, for a period of 6 month, I suggest using
cdo highpass,0.5instead of
cdo highpass,22 is interpreted as a frequency with a period of 2 years, but you only have 1 year of data in your input file.
HTH
Ralf
RE: Problem with filtering - Added by Pierre-Antoine Bretonnière almost 14 years ago
Hi,
Thank you for your answer. Here is my input data: ftp.cerfacs.fr/pub/chipmunk/pabreto/moyenne.nc
Still, I don't understand your last post. Reading the documentation, I
had understood that the number behind highpass was the frequency related
to a period in YEAR so for a period of 0.5year, that meant a frequency
of 1/0.5=2.
However, if I do
cdo highpass,0.5 moyenne.nc out.nc
the output is exactly the same than the input, which would be coherent
if 0.5 was a frequency (=> period of 2years)
highpass,0.5 = keep frequencies greater than 0.5 = keep periods smaller
than 2 years = keep all the signal
Did I understand something wrong?
Thank you,
Pierre-Antoine
RE: Problem with filtering - Added by Cedrick Ansorge almost 14 years ago
Dear Pierre-Antoine,
indeed, you're perfectly right. Maybe the formulation in the documentation is somewhat miss-leading, but the frequency is interpreted as 1/year, i.e. 2 is right if you want the Heavyside jump at frequencies of 6 months.
I am just downloading your data from the ftp sever to check, what's going on there and if I can reproduce your problems. My first guess would be that it has to do with a missing detrend (or did you do one?) but I will let you know once i've checked.
Regards,
Cedrick
RE: Problem with filtering - Added by Cedrick Ansorge almost 14 years ago
Dear Pierre-Antoine,
sorry, when using highpass,2 I am getting the same problem. I will try to find the problem.
Cheers,
Cedrick
highpass.pdf (292 KB) highpass.pdf | cdo -setctomiss,0 -highpass,0.5 -detrend moyenne.nc moyenne_detrend_hp0.5m.nc | ||
time_series.tiff (81.8 KB) time_series.tiff | Time-series of variable qflx_cor at various points on the grid |
RE: Problem with filtering - Added by Cedrick Ansorge almost 14 years ago
Files attached to previous post are actually the wrong ones. Here is the one I get.
highpass.jpg (194 KB) highpass.jpg |
RE: Problem with filtering - Added by Cedrick Ansorge almost 14 years ago
Dear Pierre-Antoine,
the problem has to do with an optimization we where using when carrying out the fft.
I thank you very much for reporting that bug. Next release will include a fix.
Thank you,
Cedrick