<div dir="ltr"><div class="gmail_default" style="font-size:small">Dipti,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I&#39;m responding back to ncl-talk on this one because I think I found the source of the problem.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It looks like it&#39;s a simple memory issue that fails under 32-bit Cygwin.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I had to reduce the amount of memory that the wavelet Fortran subroutine was requesting, and this seemed to make it work.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I compiled a new &quot;ncl&quot; executable for you to try.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">To get the new executable, use wget or anonymous ftp:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">     wget ftp.ucar.edu:/pub/scd/haley/nclcfix.exe</font></div><div class="gmail_default"><br></div><div class="gmail_default">or</div><div class="gmail_default"><br></div><div class="gmail_default"><font face="monospace, monospace">     ftp <a href="http://ftp.ucar.edu">ftp.ucar.edu</a></font></div><div class="gmail_default"><font face="monospace, monospace">     &lt;log in as &quot;anonymous&quot;&gt;</font></div><div class="gmail_default"><font face="monospace, monospace">     &lt;Use email address as password&gt;</font></div><div class="gmail_default"><font face="monospace, monospace">     cd /pub/scd/haley</font></div><div class="gmail_default"><font face="monospace, monospace">     get nclcfix.exe</font></div><div class="gmail_default"><font face="monospace, monospace">     quit</font></div><div class="gmail_default"><br></div><div class="gmail_default">Once you have the file, move it to $NCARG_ROOT/bin and make sure it is executable:</div><div class="gmail_default"><br></div><div class="gmail_default"><font face="monospace, monospace">    chmod gou+x nclcfix.exe</font></div><div class="gmail_default"><font face="monospace, monospace">    mv nclcfix.exe $NCARG_ROOT/bin/.</font></div><div class="gmail_default"><br></div><div class="gmail_default">Now you can try this new &quot;nclcfix.exe&quot; executable instead of the one already installed on your system:</div><div class="gmail_default"><br></div><div class="gmail_default"><font face="monospace, monospace">    nclcfix  your_wavelet_script.ncl</font></div><div class="gmail_default"><br></div><div class="gmail_default">If you are comfortable that this executable works, you can replace your old ncl executable with this new one. You should first make a copy of your old one:</div><div class="gmail_default"><br></div><div class="gmail_default"><font face="monospace, monospace">   mv $NCARG_ROOT/bin/ncl.exe $NCARG_ROOT/bin/nclold.exe</font></div><div class="gmail_default"><font face="monospace, monospace">   mv $NCARG_ROOT/bin/nclcfix.exe $NCARG_ROOT/bin/ncl.exe</font></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Please respond back to ncl-talk and let us know if this fixes the problem.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 21, 2017 at 8:31 AM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Dear Dipti,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I was able to reproduce this problem on my Cygwin system at home, but I didn&#39;t have much time to debug it. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Kevin tried your script on a Mac system, and I tried it on both a 32-bit and 64-bit Linux system and it worked fine.  So, it seems to be limited to Cywgin.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I will look into this over the weekend.  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Meanwhile, is your system a 64-bit system running Windows 10?  If so, then you might want to consider using Window&#39;s Linux subsystem instead of Cygwin for your UNIX environment.  I&#39;m guessing that your wavelet program might work under this system.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Please see this link for more information:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Download/windows_linux_subsystem.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Download/windows_linux_<wbr>subsystem.shtml</a><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 20, 2017 at 6:05 PM, Kevin Hallock <span dir="ltr">&lt;<a href="mailto:hallock@ucar.edu" target="_blank">hallock@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dipti,<br>
<br>
I tried to run your script on my Mac, but it ran successfully without a segfault. We will find a Windows system with cygwin to test your script on and will respond again soon.<br>
<br>
Kevin<br>
<div><div class="m_-6343790672883160568h5"><br>
&gt; On Apr 19, 2017, at 12:23 PM, Dipti Sharma &lt;<a href="mailto:sdipti596@gmail.com" target="_blank">sdipti596@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Dear All,<br>
&gt;<br>
&gt; I am trying to understand how to do the wavelet analysis using NCL. I am using ncl v6.4.0 in cygwin/x. I started using an example code and the data that are available online. But I got an error message as &quot;segmentation fault (core dumped)&quot; when I ran the program. I have given the code that I used as below for you to review. Also I have attached the data I used in the email.<br>
&gt;<br>
&gt; So, could you please suggest me how I solve this problem?<br>
&gt;<br>
&gt; Thanks in advance.<br>
&gt;<br>
&gt; Dipti S.<br>
&gt;<br>
&gt; THE CODE is here and the data is attached in the email,<br>
&gt;<br>
&gt;  load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl&quot;<br>
&gt;  load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl&quot;<br>
&gt;  load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/contributed.ncl&quot;<br>
&gt;  load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/shea_util.ncl&quot;<br>
&gt;  load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/shea_util.ncl&quot;<br>
&gt;<br>
&gt; ;-----------------------------<wbr>------------------------------<wbr>---------<br>
&gt; ; CREATE SAME WAVELET FIGURE AS TORRENCE &amp; COMPO using seasonal Nino3<br>
&gt; ; from 1871-1997<br>
&gt; begin<br>
&gt; ninoseas = asciiread(&quot;C:\diptic\sst\sst_n<wbr>ino3.dat&quot;,-1,&quot;float&quot;)<br>
&gt;   ninoseas!0 = &quot;time&quot;<br>
&gt;   ntime = dimsizes(ninoseas)<br>
&gt;   timeo = fspan(1871.25,1996.,ntime)<br>
&gt;   print(ntime)<br>
&gt;   ninoseas&amp;time = timeo<br>
&gt;   ninomam = dim_avg_Wrap(ninoseas(0::4))<br>
&gt;   ninojja = dim_avg_Wrap(ninoseas(1::4))<br>
&gt;   ninoson = dim_avg_Wrap(ninoseas(2::4))<br>
&gt;   ninodjf = dim_avg_Wrap(ninoseas(3::4))<br>
&gt;   ninoseas(0::4) = ninoseas(0::4) - ninomam<br>
&gt;   ninoseas(1::4) = ninoseas(1::4) - ninojja<br>
&gt;   ninoseas(2::4) = ninoseas(2::4) - ninoson<br>
&gt;   ninoseas(3::4) = ninoseas(3::4) - ninodjf<br>
&gt;   time  = timeo<br>
&gt;   N     = dimsizes(time)<br>
&gt; ;_FillValue=1e+36<br>
&gt; ;printMinMax(ninoseas,False)<br>
&gt; ;return<br>
&gt; ;*****************************<wbr>*******<br>
&gt; ; compute wavelet<br>
&gt; ;*****************************<wbr>*******<br>
&gt;   mother  = 0<br>
&gt;   param   = 6.0<br>
&gt;   dt      = 0.25    ;timesteps in units of years<br>
&gt;   s0      = dt<br>
&gt;   dj      = 0.25<br>
&gt;   jtot    = 1+floattointeger(((log10(N*dt/<wbr>s0))/dj)/log10(2.))<br>
&gt;   npad    = N<br>
&gt;   nadof   = 0.0<br>
&gt;   noise   = 1<br>
&gt;   siglvl  = 0.05<br>
&gt;   isigtest= 0<br>
&gt; print(nadof)<br>
&gt; w =wavelet(ninoseas,mother,dt,pa<wbr>ram,s0,dj,jtot,npad,noise,isig<wbr>test,siglvl,nadof)<br>
&gt; printVarSummary(w)<br>
&gt; return<br>
&gt; end<br>
&gt; ;;; This is the output I received,<br>
&gt;<br>
&gt; Variable: ntime<br>
&gt; Type: integer<br>
&gt; Total Size: 4 bytes<br>
&gt;             1 values<br>
&gt; Number of Dimensions: 1<br>
&gt; Dimensions and sizes:   [1]<br>
&gt; Coordinates:<br>
&gt; (0)     504<br>
&gt; (0)     min=-1.8504   max=2.49921<br>
&gt;<br>
&gt; Variable: nadof<br>
&gt; Type: float<br>
&gt; Total Size: 4 bytes<br>
&gt;             1 values<br>
&gt; Number of Dimensions: 1<br>
&gt; Dimensions and sizes:   [1]<br>
&gt; Coordinates:<br>
&gt; (0)      0<br>
&gt; Segmentation fault (core dumped)<br>
&gt;<br>
&gt;<br>
</div></div>&gt; &lt;sst_nino3.dat&gt;_______________<wbr>______________________________<wbr>__<br>
<div class="m_-6343790672883160568HOEnZb"><div class="m_-6343790672883160568h5">&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>