<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">Dear Mary,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">Thank you very much for your kind reply.  I&#39;ve found the reason why the function crashed with segfault - because there were errors in the data.  Now I&#39;ve fixed the data and the function worked with no problem.  Thank you very much again.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">Best,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000"><span class="" id=":1fn.1" tabindex="-1" style="">Meina</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 31, 2017 at 12:29 PM, 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">Hi Meina,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Can you provide us with the script and data so we can run it here and see what&#39;s going on?  You can use our anonymous ftp, if the data file is not too huge:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP" target="_blank">http://www.ncl.ucar.edu/<wbr>report_bug.shtml#HowToFTP</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">Thanks,</div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Jul 28, 2017 at 12:34 AM, Meina Wang <span dir="ltr">&lt;<a href="mailto:mnawang@ucdavis.edu" target="_blank">mnawang@ucdavis.edu</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">Dear <span id="m_8714549645695898195m_8001066358567545586:4wz.1">NCL</span> users,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">I ran into the segmentation fault when using the vinth2p to convert CAM hybrid levels to pressure levels.  The error message is:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default"><p style="color:rgb(0,0,0);font-family:Menlo;margin:0px;font-size:12px"> <a href="http://KP.GT" target="_blank">KP.GT</a>.<span id="m_8714549645695898195m_8001066358567545586:4wz.2">KLEVI</span> IN P2HBD.  KP,<span id="m_8714549645695898195m_8001066358567545586:4wz.3">KLEVI</span>=    31   30</p>
<p style="color:rgb(0,0,0);font-family:Menlo;margin:0px;font-size:12px">Segmentation fault</p><p style="color:rgb(0,0,0);font-family:Menlo;margin:0px;font-size:12px"><br></p><p style="margin:0px"><font face="arial, helvetica, sans-serif"><font color="#000000">I found the source code from <a href="https://github.com/yyr/ncl/blob/master/ni/src/lib/nfpfort/vinth2p_nodes_dp.f" target="_blank">online</a>, but didn&#39;t quite understand why the function gave me this error message.  Since I called this function in a time loop, the number of vertical levels (30 levels) for all the time steps are the same, still it crashed mid-way through the time loop.  </font></font></p></div><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">​Here are the code where I called this function to interpolate the <span id="m_8714549645695898195m_8001066358567545586:4wz.4">geopotential</span> height to 700hPa from hybrid coordinate:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"><br></div><p style="margin:0px;font-size:12px;font-family:Menlo"><span id="m_8714549645695898195m_8001066358567545586:4wz.5">interp</span> = 1</p><p style="margin:0px;font-size:12px;font-family:Menlo">
</p><p style="margin:0px;font-size:12px;font-family:Menlo"><span id="m_8714549645695898195m_8001066358567545586:4wz.6">extrap</span> = False</p>
<p style="margin:0px;font-size:12px;font-family:Menlo"><span id="m_8714549645695898195m_8001066358567545586:4wz.7">pnew</span> = (/700./)</p>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"><span style="font-family:Menlo;font-size:12px;color:rgb(34,34,34)"><span id="m_8714549645695898195m_8001066358567545586:4wz.8">HGTp</span> = vinth2p(HGT,<span id="m_8714549645695898195m_8001066358567545586:4wz.9">hyam</span>,<span id="m_8714549645695898195m_8001066358567545586:4wz.10">hybm</span>,<span id="m_8714549645695898195m_8001066358567545586:4wz.11">pnew</span>,PS,<span id="m_8714549645695898195m_8001066358567545586:4wz.12"><wbr>interp</span>,P0mb,1,<span id="m_8714549645695898195m_8001066358567545586:4wz.13">extrap</span>)</span>​</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">Any thoughts on this is much appreciated since I&#39;ve never ran into this problem before.  Thank you.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)">Best regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:rgb(0,0,0)"><span id="m_8714549645695898195m_8001066358567545586:4wz.14">Meina</span></div></div><br>
</div>
<br></div></div>______________________________<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>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">Meina Wang</font><div><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">PhD candidate in Atmospheric Science</font></div><div><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">Department of Land, Air and Water Resources</font></div><div><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">University of California, Davis</font></div><div><font size="2" color="#000000" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif">Davis, CA 95616</font></div></div></div></div></div>
</div>