<div dir="ltr"><div class="gmail_default" style="font-size:small">The wrf_xxxx computational functions are built-in functions, which means they are part of the "ncl" executable, and not NCL scripting code.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In this case, they are part of the "wrf_user.f" Fortran code that's in $NCARG/ni/src/lib/nfpfort.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">"wrf_tk" is associated with the "dcomputetk" subroutine and "wrf_td" is "dcomputetd".</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">For the bulk of the scientific computational routines built into "ncl", the C wrappers are in $NCARG/ni/src/lib/nfp, and the Fortran code in $NCARG/ni/src/lib/nfpfort. The way to find the Fortran code associated with a C wrapper is to:</div><div class="gmail_default" style="font-size:small"><ul><li> Search for the NCL function name in $NCARG/ni/src/lib/nfp:</li></ul></div><div class="gmail_default" style="font-size:small"><font face="courier new, monospace"> cd $NCARG/ni/src/lib/nfp</font></div><div class="gmail_default" style="font-size:small"><font face="courier new, monospace"> grep wrf_tk *.c</font></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">[Ignore the "wrapper.c" file, because this is just a prototyping routine for all wrappers.]</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You will see that "wrf_tk" is referenced in "wrfW.c". </div><div class="gmail_default" style="font-size:small"><ul><li>Open wrfW.c with a UNIX editor and search for:<br></li></ul></div><div class="gmail_default" style="font-size:small">
<p class=""><font face="courier new, monospace">NhlErrorType<span class="">s</span><span class=""> </span><span class="">wrf_tk</span></font></p><p class="">This is the main wrapper code for "wrf_tk".</p><p class=""></p><ul><li>In this code, search for any calls to "NGCALLF", which is the macro that calls the Fortran routine from this C wrapper:<br></li></ul><p></p><p class=""><font face="courier new, monospace">/* * Call Fortran routine. <br> */ <br><span class=""> NGCALLF</span>(dcomputetk,DCOMPUTETK)(tmp_t,tmp_p,tmp_theta,&inx);</font></p><p class=""></p><ul><li>Now that you have the Fortran routine name, you can cd to "../nfpfort" to search for this Fortran subroutine:<br></li></ul><p></p><p class=""><font face="courier new, monospace"> cd ../nfpfort<br> grep -i dcomputetk *.f</font></p><p class="">--Mary</p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 3, 2014 at 4:08 PM, 李嘉鹏 <span dir="ltr"><<a href="mailto:lijpbasin@126.com" target="_blank">lijpbasin@126.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thomas, you can search for files containing wrf_td or wrf_tk, if they are not in $NCARG_ROOT/lib/ncarg/nclscripts/, then they are probably builtins.<br>
<br>
grep -e wrf_tk -e wrf_td -R $NCARG_ROOT/lib/ncarg/nclscripts<br>
<br>
于 2014年11月4日 格林尼治标准时间+0800上午5时29分16秒, Thomas Robinson <<a href="mailto:ter@hawaii.edu">ter@hawaii.edu</a>> 写到:<br>
<div><div class="h5">>Hello All,<br>
>I am wondering where the functions wrf_td and wrf_tk are in the ncl<br>
>file<br>
>directory. I found this<br>
> $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl<br>
>which has wrf_getvar and calls wrf_td, but not wrf_td. Does anyone<br>
>know<br>
>where wrf_td and wrf_tk are installed?<br>
><br>
> -Tom<br>
><br>
><br>
</div></div>>------------------------------------------------------------------------<br>
><br>
>_______________________________________________<br>
>ncl-talk mailing list<br>
>List instructions, subscriber options, unsubscribe:<br>
><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br></div>