[ncl-talk] stream function calculation

Dennis Shea shea at ucar.edu
Wed May 1 19:21:45 MDT 2019


NCL uses *Spherepack*
<https://www2.cisl.ucar.edu/resources/legacy/spherepack> written in f77.
The arrays passed must be 'global' [cover the sphere].
I have not looked at the Spherepack code in about 20+ years so I have no
expertise to help.
Google prevented me from attaching the spherepack library. However, I have
put it on the CGD ftp area.

ftp ftp.cgd.ucar.edu
anonymous
your_email
cd pub/shea
get SPHEREPACK_NCL.tar.gz
quit

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.

      u/v(lat,lon)   ==> sf(lat,lon), vp(lat,lon)
      u/v(level,lat,lon)   ==> sf(level,lat,lon), vp(level,lat,lon)
      u/v(time,lat,lon)   ==> sf(time,lat,lon), vp(time,lat,lon)
      u/v(time,level,lat,lon)   ==> sf(time,level,lat,lon),
vp(time,level,lat,lon)

Good luck



On Wed, May 1, 2019 at 5:29 PM Gang Lu <ganglu at ucar.edu> wrote:

>
> I am trying to calculate and plot stream function for ionosheric plasma
> drifts (2D vector field similar to wind field), and I come across this NCL
> function (uv2sfvpf) which seems to be what I need.
> But I am not a NCL user and I am using IDL to write my own analysis codes.
> I wonder if you could point me to the source code behind the "uv2sfcpf"
> function so that I can modify it for my purpose.
>
> Rick Brownrigg kindly pointed me to "sph2W.c" and "sp2_util_dp.f" on Github. However these
>
> are not the source codes for calculating the stream function.
>
> I apologize if this is not the right group for posting such a question. But
>
> I would appreciate nay help that you might offer.
>
> Thanks,
>
> -------------------------------------------------------------------
> Gang Lu
> High Altitude Observatory
> National Center for Atmospheric Research
> 3080 Center Green Drive, Boulder, CO 80301
> email: ganglu at ucar.edu
> Phone: 303-497-1554 (office); 303-495-9990 (cell)
> Fax: 303-497-1589
> ------------------------------------------------------------------
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190501/ca97e704/attachment.html>


More information about the ncl-talk mailing list