Opened 12 years ago

Closed 12 years ago

#299 closed defect (fixed)

Bug in ropp_pp_fourier_filter

Reported by: Ian Culverwell Owned by: Ian Culverwell
Priority: normal Milestone: 6.1
Component: ropp_pp Version: 6.0
Keywords: fourier filter Cc:

Description

Stig's Tdry branch contains the following change, due originally to Kjartan:

  DO k=1,n/2-1 
   FFk = 0.0_wp 
   if ( (Pi*k*window/N)**2/4 < 500.0_wp) then 
     FFk    = Exp(-(Pi*k*window/N)**2/4) 
   endif 
   data(k)   = data(k)*FFk 
   data(N-k) = data(N-k)*FFk 
 End Do 
 data(N/2) = data(N/2)*FFk

should be

  DO k=2,n/2
   FFk = 0.0_wp 
   if ( (Pi*(k-1)*window/N)**2/4 < 500.0_wp) then 
     FFk    = Exp(-(Pi*(k-1)*window/N)**2/4) 
   endif 
   data(k)   = data(k)*FFk 
   data(N-k+2) = data(N-k+2)*FFk 
 End Do 
 data(N/2+1) = data(N/2+1)*FFk

In the first case we cover generate data(1:N-1); in the second we generate data(2:N). According to Kjartan (via Stig), the change is not strictly necessary, but it then follows Michael Gorbunov's OCC exactly.

Bundle it up with the Tdry changes.

Change history (3)

comment:1 by Ian Culverwell, 12 years ago

Owner: set to Ian Culverwell
Status: newassigned

comment:2 by Ian Culverwell, 12 years ago

Included in ROPP6.1.

comment:3 by Ian Culverwell, 12 years ago

Resolution: fixed
Status: assignedclosed

Interestingly, this change makes a fair difference to the results - so much so that we have decided that our new ropp_pp reference (as agreed by SG), should be ROPP6.0.5 - ie ropp6.0 with this change. We then get very close agreement between 6.1 and ref. Sadly it's not big enough to explain the OCC-vs-ROPP difference.

After this change it works fine in test folder, so close ticket.

Note: See TracTickets for help on using tickets.