Opened 14 years ago

Closed 13 years ago

#225 closed defect (fixed)

Bug in ropp_pp_spectra

Reported by: Ian Culverwell Owned by: Ian Culverwell
Priority: normal Milestone: 5.1
Component: ropp_pp Version: 4.1
Keywords: ropp_pp_spectra Cc:

Description

User João Francisco Galera Monico

has discovered this bug in ropp_pp_spectra:

! 3.4.1 Compute wave number

IF (ic == 1) k = 2.0_wp * pi * f_L1 / C_Light

IF (ic == 1) k = 2.0_wp * pi * f_L2 / C_Light (It would not be (ic==2)

?????

ic is channel number, so the 2nd line should say IF(ic == 2) ...

This is what's done in OCC (thanks to Kjartan Kinch at DMI for checking).

João Francisco finds that correcting this makes some significant differences to his results - see attached. (I think he means it changes L2 results, not L1.)

Attachments (3)

SUBROUTINE ropp_pp_spectra.docx (11.3 KB ) - added by Ian Culverwell 14 years ago.
SUBROUTINE ropp_pp_spectra.docx
ropp_pp_spectra_dt_cntl.gif (99.9 KB ) - added by Ian Culverwell 13 years ago.
ropp_pp_spectra_dt_test.gif (103.5 KB ) - added by Ian Culverwell 13 years ago.

Download all attachments as: .zip

Change history (7)

by Ian Culverwell, 14 years ago

SUBROUTINE ropp_pp_spectra.docx

comment:1 by Ian Culverwell, 14 years ago

Component: ROPP (all)Preproc

comment:2 by Ian Culverwell, 14 years ago

Summary: Buf in ropp_pp_spectraBug in ropp_pp_spectra

comment:3 by Ian Culverwell, 13 years ago

Milestone: 6.05.1

This is an obvious bug. Correcting it makes a significant (~10-20%) difference to the L1 power spectrum |ln U| almost everywhere. (I was wrong before: it is the L1 results that are wrong.) The differences in the phase are just about discernible by eye (see the left hand panels):

before

after

Happily, it doesn't cause any failures to the standard ropp_pp test procedures.

Implement in ROPP5.1.

by Ian Culverwell, 13 years ago

Attachment: ropp_pp_spectra_dt_cntl.gif added

by Ian Culverwell, 13 years ago

Attachment: ropp_pp_spectra_dt_test.gif added

comment:4 by Ian Culverwell, 13 years ago

Resolution: fixed
Status: newclosed

Afterword: I've updated the reference figures for the "make test" part of ropp_pp accordingly.

Note: See TracTickets for help on using tickets.