<div dir="ltr"><div dir="ltr"><div><div>NCL uses <a href="https://www2.cisl.ucar.edu/resources/legacy/spherepack"><b>Spherepack</b></a> written in f77. The arrays passed must be 'global' [cover the sphere].</div><div><span>I have not looked at the Spherepack code in about 20+ years so I have no expertise to help.</span></div><div><span>Google prevented me from attaching the spherepack library. However, I have put it on the CGD ftp area.</span></div><div><span><br></span></div><div><span>ftp <a href="http://ftp.cgd.ucar.edu">ftp.cgd.ucar.edu</a></span></div><div><span>anonymous</span></div><div><span>your_email</span></div><div><span>cd pub/shea</span></div><div><span>get SPHEREPACK_NCL.tar.gz<br></span></div><div><span>quit<br></span></div><span></span></div><div dir="ltr"><div><span><br></span></div><div><span>NCL (written in C) uses hidden C-interfaces between the high-level NCL code and the low-level computational fortran subroutines. The C-interfaces do much of the dirty work. They query the input variable for sizes, shapes and types; create needed work arrays; etc. Also,the interfaces will iterate over multiple levels and time steps.</span></div><div><span><br></span></div><div><span> u/v(lat,lon) ==> sf(lat,lon), vp(lat,lon)<br></span><div><span> u/v(level,lat,lon) ==> sf(level,lat,lon), vp(level,lat,lon)<br></span></div><div><span> u/v(time,lat,lon) ==> sf(time,lat,lon), vp(time,lat,lon)<br></span></div><div><div><span> </span><span>u/v(time,level,lat,lon) ==> sf(time,level,lat,lon), vp(time,level,lat,lon)<br></span><span></span><div><span> <br></span></div><div><span>Good luck</span></div><div><span><br></span></div><div><span><br></span></div></div><span></span></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 1, 2019 at 5:29 PM Gang Lu <<a href="mailto:ganglu@ucar.edu">ganglu@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><pre><br>I am trying to calculate and plot stream function for ionosheric plasma<br>drifts (2D vector field similar to wind field), and I come across this NCL <br>function (uv2sfvpf) which seems to be what I need.<br>But I am not a NCL user and I am using IDL to write my own analysis codes.<br>I wonder if you could point me to the source code behind the "uv2sfcpf"<br>function so that I can modify it for my purpose.<br><br>Rick Brownrigg kindly pointed me to "sph2W.c" and "sp2_util_dp.f" on Github. However these<br></pre><pre>are not the source codes for calculating the stream function.<br><br></pre><pre>I apologize if this is not the right group for posting such a question. But<br></pre><pre>I would appreciate nay help that you might offer.<br></pre><pre>Thanks,</pre><div><div dir="ltr" class="gmail-m_-6417279164135554533gmail_signature"><div dir="ltr"><div><div><div><div>-------------------------------------------------------------------<br>Gang Lu<br></div>High Altitude Observatory<br></div>National Center for Atmospheric Research<br></div>3080 Center Green Drive, Boulder, CO 80301<br></div><div>email: <a href="mailto:ganglu@ucar.edu" target="_blank">ganglu@ucar.edu</a><br></div><div>Phone: 303-497-1554 (office); 303-495-9990 (cell)<br></div><div>Fax: 303-497-1589<br>------------------------------------------------------------------<br></div></div></div></div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>