[ncl-talk] Serious bug in the taper (and taper_n) function with option 1

Dennis Shea shea at ucar.edu
Mon Aug 23 12:48:15 MDT 2021


NCL's 'taper' function is almost directly from

Peter Bloomfield
Fourier Analysis of Time Series: An Introduction
Wiley-Interscience, 1976

There is a 2nd edition (2000) that contains S-PLUS (Think 'R') functions
The 1976 has fortran subroutines.

I am sure this functionality has been replicated in other languages: C, R,
Python.
It is necessary to perform tapering on non-cyclic data prior to invocation
of the FFT.
-----
I've attached a simple f77 version of the code used by NCL.
Note that NCL uses a C-language interface to the fortran subroutine.
It is the C code that creates the returned ("output") array to the NCL
environment.
----

The 'taper' function was in the 4.2.0 version (2001).... many years ago.
Some options were introduced in the 6.2.1 versions (Sept 2014):   *taper*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/taper.shtml>

The options were implemented in the C-interface. The C-code is too
complicated to attach.   :-)

If you can create a simple debug script that replicates your issue, I will
take a look.


On Mon, Aug 23, 2021 at 11:58 AM Orhan Eroglu via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hello Koichi,
>
> Thanks for your email and detailed explanation, as well as I am sorry to
> hear the inconveniences you have been having!
>
> As you already mentioned, NCL is in maintenance mode, and we are doing our
> best to provide support for it (prioritizing Conda installation related
> issues). However, even those types of issues are leading us to spend days
> most of the time, sometimes without finding a solution. Since we have
> several other toolkits in our GeoCAT stack that need to be planned,
> developed, deployed, and maintained in our daily workflow, sometimes, we
> can't even check and respond to NCL issues even though we wouldn't like to
> oversee any support ticket such a vibrant community has.
>
> With all that being said, we are noting down such issues for being
> addressed in a future bug fix release (the date of which is not current as
> of today), if the community itself does not resolve the issue with the help
> of other users/developers.
>
> The community developers are more than welcome to offer any
> solutions/bug-fixes to such NCL issues.
>
> I hope this helps understand our situation and the tool's maintenance plan.
>
> Regards,
>
> On Sun, Aug 22, 2021 at 11:06 AM Sakaguchi, Koichi via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Dear NCL support staff and users,
>>
>>
>>
>> I found a bug in the ncl function taper (and taper_n) such that when the
>> option 1 is chosen the function does not copy all the values of the input
>> array to the output array, except for the portions that are tapered. In my
>> environment (NERSC and PNNL computing facilities), the uncopied values in
>> the output array are all zero. This bug had a serious impact on my work.
>>
>>
>>
>> The function works correctly when option 0 is chosen. This difference
>> arises because the output array is not initialized properly in the
>> underlying fortran code (taper.f) when option 1 is selected.
>>
>> I provided more details in the NCL github issues
>>
>> https://github.com/NCAR/ncl/issues/171
>>
>>
>>
>>
>>
>> I posted a bug report about a month ago following
>> https://www.ncl.ucar.edu/Support/posting_guidelines.shtml, but no
>> responses have been provided, so I am reporting here in the ncl-talk. I see
>> a few even older postings without responses from the developers there... I
>> am aware that NCL is in the maintenance mode without further development,
>> but I think more close and regular attention should be paid to the issues
>> posted on NCL github because NCL is still very widely used.
>>
>>
>>
>> Best regards,
>>
>>
>>
>> Koichi
>>
>>
>>
>> --------------------------------
>>
>> Koichi Sakaguchi, Ph.D.
>>
>> Earth Scientist
>>
>> ATMOSPHERIC SCIENCES & GLOBAL CHANGE
>>
>>
>>
>> Pacific Northwest National Laboratory
>>
>> 3200 Innovation Blvd
>>
>> PO Box 999, MSIN: K9-24
>>
>> Richland, WA 99352 USA
>>
>> Phone: 509-375-7385
>>
>> Fax: 509-375-6448
>>
>> Email:koichi.sakaguchi at pnnl.gov
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210823/6a5fc78a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: taper_ncl.f
Type: application/octet-stream
Size: 1361 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210823/6a5fc78a/attachment.obj>


More information about the ncl-talk mailing list