<div dir="ltr"><div><div><div>Mary,<br><br></div>This is an amazing work you have done regarding this issue (for me). Yes, now it looks it is working. I highly appreciate your responsiveness and your effort on this. I will let you know if I get any further issues. Thank you so much again.<br><br></div>regards,<br><br></div>Dipti<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 7, 2017 at 1:41 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></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">Dipti,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'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'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 "ncl" 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/<wbr>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" target="_blank">ftp.ucar.edu</a></font></div><div class="gmail_default"><font face="monospace, monospace"> <log in as "anonymous"></font></div><div class="gmail_default"><font face="monospace, monospace"> <Use email address as password></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 "nclcfix.exe" 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="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 21, 2017 at 8:31 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></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'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's Linux subsystem instead of Cygwin for your UNIX environment. I'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/Downlo<wbr>ad/windows_linux_subsystem.<wbr>shtml</a><span class="m_1678344683239512340HOEnZb"><font color="#888888"><br></font></span></div><span class="m_1678344683239512340HOEnZb"><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="m_1678344683239512340HOEnZb"><div class="m_1678344683239512340h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 20, 2017 at 6:05 PM, Kevin Hallock <span dir="ltr"><<a href="mailto:hallock@ucar.edu" target="_blank">hallock@ucar.edu</a>></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_1678344683239512340m_-6343790672883160568h5"><br>
> On Apr 19, 2017, at 12:23 PM, Dipti Sharma <<a href="mailto:sdipti596@gmail.com" target="_blank">sdipti596@gmail.com</a>> wrote:<br>
><br>
> Dear All,<br>
><br>
> 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 "segmentation fault (core dumped)" 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>
><br>
> So, could you please suggest me how I solve this problem?<br>
><br>
> Thanks in advance.<br>
><br>
> Dipti S.<br>
><br>
> THE CODE is here and the data is attached in the email,<br>
><br>
> load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl"<br>
> load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl"<br>
> load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/contributed.ncl"<br>
> load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/shea_util.ncl"<br>
> load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/shea_util.ncl"<br>
><br>
> ;-----------------------------<wbr>------------------------------<wbr>---------<br>
> ; CREATE SAME WAVELET FIGURE AS TORRENCE & COMPO using seasonal Nino3<br>
> ; from 1871-1997<br>
> begin<br>
> ninoseas = asciiread("C:\diptic\sst\sst_n<wbr>ino3.dat",-1,"float")<br>
> ninoseas!0 = "time"<br>
> ntime = dimsizes(ninoseas)<br>
> timeo = fspan(1871.25,1996.,ntime)<br>
> print(ntime)<br>
> ninoseas&time = timeo<br>
> ninomam = dim_avg_Wrap(ninoseas(0::4))<br>
> ninojja = dim_avg_Wrap(ninoseas(1::4))<br>
> ninoson = dim_avg_Wrap(ninoseas(2::4))<br>
> ninodjf = dim_avg_Wrap(ninoseas(3::4))<br>
> ninoseas(0::4) = ninoseas(0::4) - ninomam<br>
> ninoseas(1::4) = ninoseas(1::4) - ninojja<br>
> ninoseas(2::4) = ninoseas(2::4) - ninoson<br>
> ninoseas(3::4) = ninoseas(3::4) - ninodjf<br>
> time = timeo<br>
> N = dimsizes(time)<br>
> ;_FillValue=1e+36<br>
> ;printMinMax(ninoseas,False)<br>
> ;return<br>
> ;*****************************<wbr>*******<br>
> ; compute wavelet<br>
> ;*****************************<wbr>*******<br>
> mother = 0<br>
> param = 6.0<br>
> dt = 0.25 ;timesteps in units of years<br>
> s0 = dt<br>
> dj = 0.25<br>
> jtot = 1+floattointeger(((log10(N*dt/<wbr>s0))/dj)/log10(2.))<br>
> npad = N<br>
> nadof = 0.0<br>
> noise = 1<br>
> siglvl = 0.05<br>
> isigtest= 0<br>
> print(nadof)<br>
> w =wavelet(ninoseas,mother,dt,pa<wbr>ram,s0,dj,jtot,npad,noise,isig<wbr>test,siglvl,nadof)<br>
> printVarSummary(w)<br>
> return<br>
> end<br>
> ;;; This is the output I received,<br>
><br>
> Variable: ntime<br>
> Type: integer<br>
> Total Size: 4 bytes<br>
> 1 values<br>
> Number of Dimensions: 1<br>
> Dimensions and sizes: [1]<br>
> Coordinates:<br>
> (0) 504<br>
> (0) min=-1.8504 max=2.49921<br>
><br>
> Variable: nadof<br>
> Type: float<br>
> Total Size: 4 bytes<br>
> 1 values<br>
> Number of Dimensions: 1<br>
> Dimensions and sizes: [1]<br>
> Coordinates:<br>
> (0) 0<br>
> Segmentation fault (core dumped)<br>
><br>
><br>
</div></div>> <sst_nino3.dat>_______________<wbr>______________________________<wbr>__<br>
<div class="m_1678344683239512340m_-6343790672883160568HOEnZb"><div class="m_1678344683239512340m_-6343790672883160568h5">> 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>
<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>
</div></div></blockquote></div><br></div>