<div dir="ltr"><div><div>Correct. Only a few selected functions were created in NCL.<br><br></div>Most other computationally intense functions are in fortran or C.<br><br></div>Good Luck<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 14, 2017 at 6:20 AM, <span dir="ltr"><<a href="mailto:qinmingyue@mail.iap.ac.cn" target="_blank">qinmingyue@mail.iap.ac.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yeah right! I found the ncl versions.<div>But it seems not all built-in functions are included in this script SHEA_UTIL.NCL. For example EOF is not included.</div><div>So if I can't find the other built-in functions in the script, it means there aren't NCL versions of the fortran code, right?</div><div><br></div><div>Thank you for your kindly help.</div><div><br></div><div>Sophie </div><div><br></div><div><br><blockquote name="replyContent" class="m_8227951316857058087ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0">-----原始邮件-----<br>
<b>发件人:</b><span id="m_8227951316857058087rc_from">"Dennis Shea" <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span><br>
<b>发送时间:</b><span id="m_8227951316857058087rc_senttime">2017-10-14 05:52:38 (星期六)</span><br>
<b>收件人:</b> "Mary Haley" <<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>><br>
<b>抄送:</b> <a href="mailto:qinmingyue@mail.iap.ac.cn" target="_blank">qinmingyue@mail.iap.ac.cn</a>, "<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>" <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
<b>主题:</b> Re: [ncl-talk] ncl built-in function code<div><div class="h5"><br><br><div dir="ltr"><div><div><div><div>A little 'secret' ....<br><br></div>%> less $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util.ncl<br><br></div>Search for SPECX_ANAL and SPECXY_ANAL..<br><br></div>These are (one-dimensional) NCL versions of the fortran code. They may be easier to follow.<br><br></div>Good luck<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 13, 2017 at 1:19 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">Hi Sophie,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">To find the Fortran code for the NCL function, you first need to find the C wrapper for the NCL function, find out what Fortran routine it is calling, and then search for this function in another directory.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Here are the steps:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">1) Clone the NCL source code from:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="https://github.com/NCAR/ncl" target="_blank">https://github.com/NCAR/ncl</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">or download it from:</div><div class="gmail_default"><br></div><div class="gmail_default"><a href="https://www.earthsystemgrid.org/dataset/ncl.640.src/file.html" target="_blank">https://www.earthsystemgrid.or<wbr>g/dataset/ncl.640.src/file.htm<wbr>l</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">2) Look in the ni/src/lib/nfp directory for the C wrapper file that contains this function (using specx_anal as an example):</div><br><font face="monospace, monospace">cd ni/src/lib/nfp<br>grep specx_anal_W *.c </font><br><br>3) Look at the C file (specxW.c) <div class="gmail_default" style="font-size:small;display:inline">for a line like this:</div><div><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline"><font face="monospace, monospace">NhlErrorTypes specx_anal_W( void )</font></div></div><div><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline">and then start searching for a call to NGCALLF to</div> see what Fortran routine this function depends on<div class="gmail_default" style="font-size:small;display:inline">. </div></div><div><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline">In this case, it is:</div></div><div><div><br></div><div><div><font face="monospace, monospace">NGCALLF(dspecx,DSPECX)(dx,&inx<wbr>,iopt,jave,dpct,&scl,work,&ilw<wbr>ork,</font></div><div><font face="monospace, monospace"> frq_tmp,spcx_tmp,&inspc,sinfo<wbr>,&ier);</font></div><div><br></div><div><div class="gmail_default" style="font-size:small">4) Cd to the nfpfort directory and search for this routine in the Fortran file directory:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">cd ../nfpfort<br>grep -i dspecx *.f</font></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><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_8227951316857058087h5">On Thu, Oct 12, 2017 at 8:18 PM, <span dir="ltr"><<a href="mailto:qinmingyue@mail.iap.ac.cn" target="_blank">qinmingyue@mail.iap.ac.cn</a>></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="m_8227951316857058087h5">Hi all,<div> </div><div>Where can i find the code for ncl built-in function like eofunc,specx_anal and so on?</div><div>I want to know the detailed calculation steps of the functions.</div><div><br></div><div>Sophie</div><div>PhD student</div><div>Institute of Atmospheric Physics</div><div><br></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>
<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>
<br></blockquote></div><br></div>
</div></div></blockquote></div></blockquote></div><br></div>