<div dir="ltr"><div>NCL's 'taper' function is almost directly from <br></div><div><br></div><div>Peter Bloomfield</div><div>Fourier Analysis of Time Series: An Introduction<br>Wiley-Interscience, 1976</div><div><br></div><div>There is a 2nd edition (2000) that contains S-PLUS (Think 'R') functions<br></div><div>The 1976 has fortran subroutines.</div><div><br></div><div>I am sure this functionality has been replicated in other languages: C, R, Python.</div><div>It is necessary to perform tapering on non-cyclic data prior to invocation of the FFT.<br></div><div>-----</div><div>I've attached a simple f77 version of the code used by NCL.</div><div>Note that NCL uses a C-language interface to the fortran subroutine.</div><div>It is the C code that creates the returned ("output") array to the NCL environment.<br></div><div>----</div><div><br></div><div>The 'taper' function was in the 4.2.0 version (2001).... many years ago.</div><div>Some options were introduced in the 6.2.1 versions (Sept 2014):   <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/taper.shtml"><b>taper</b></a></div><div><br></div><div>The options were implemented in the C-interface. The C-code is too complicated to attach.   :-)<br></div><div><br></div><div>If you can create a simple debug script that replicates your issue, I will take a look.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 23, 2021 at 11:58 AM Orhan Eroglu via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello Koichi,<div><br></div><div>Thanks for your email and detailed explanation, as well as I am sorry to hear the inconveniences you have been having!</div><div><br></div><div>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. </div><div><br></div><div>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. </div><div><br></div><div>The community developers are more than welcome to offer any solutions/bug-fixes to such NCL issues.</div><div><br></div><div>I hope this helps understand our situation and the tool's maintenance plan.</div><div><br></div><div>Regards,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 22, 2021 at 11:06 AM Sakaguchi, Koichi via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11pt">Dear NCL support staff and users,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">I provided more details in the NCL github issues<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><a href="https://github.com/NCAR/ncl/issues/171" target="_blank">https://github.com/NCAR/ncl/issues/171</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">I posted a bug report about a month ago following
<a href="https://www.ncl.ucar.edu/Support/posting_guidelines.shtml" target="_blank">https://www.ncl.ucar.edu/Support/posting_guidelines.shtml</a>, 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.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Koichi<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">--------------------------------<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Koichi Sakaguchi, Ph.D.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Earth Scientist<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">ATMOSPHERIC SCIENCES & GLOBAL CHANGE <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Pacific Northwest National Laboratory<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">3200 Innovation Blvd<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">PO Box 999, MSIN: K9-24<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Richland, WA 99352 USA<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Phone: 509-375-7385<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Fax: 509-375-6448<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><a href="mailto:Email%3Akoichi.sakaguchi@pnnl.gov" target="_blank">Email:koichi.sakaguchi@pnnl.gov</a></span><u></u><u></u></p>
</div>
</div>

_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>