Skip to content

Incorrect spffte documentation #306

@DavidHuber-NOAA

Description

@DavidHuber-NOAA

It looks like the spffte documentation for the G and W arrays is incorrect. According to the documentation

NCEPLIBS-ip/src/spffte.f

Lines 39 to 44 in 2344525

C> @param[out] W complex amplitudes if IDIR>0
C> @param[out] G real values if IDIR<0
C> @param IDIR direction flag
C> - IDIR=0 to initialize trigonometric data
C> - IDIR>0 to transform from Fourier to physical space
C> - IDIR<0 to transform from physical to Fourier space

W should return complex amplitudes in Fourier space if IDIR > 0 or G should return real values if IDIR < 0. However, if IDIR > 0, then the transform should be going from Fourier to real space, and if IDIR < 0, then the transform should be going from real space to Fourier. This implies that either the algorithm is misdocumented (i.e. IDIR > 0 means we are going to Fourier space) or the variables are misdocumented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions