Re: Ruby + NCL

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue, 27 May 2008 15:36:34 -0600

Hi Saji,

To follow up a bit on what Mary said, there is actually a C API for
NCL that can
be used to create an interface to NCL from other languages. Very
basic bindings
have been created for Perl and Python -- not this is not what PyNCL
or PyNGL uses,
but it is a possible approach.
Check out http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/
NclApi.shtml.

If you want to see examples of *very basic* uses of this API to
implement Perl or
Python interfaces to NCL, let me know.
  -dave

On May 27, 2008, at 10:08 AM, Mary Haley wrote:

> On Tue, 27 May 2008, Saji N. Hameed wrote:
>
>> Dear NCL Developers and all,
>>
>> We are developing a Ruby Rails + NCL based web application to
>> serve our climate forecast products. So far so good... we
>> use the "system" and similar functions in ruby to run NCL as a child
>> process.
>>
>> Having heard about PyNCL I was wondering if a similar interface
>> to NCAR graphics could be made using Ruby. As a first step,
>> we have succeeded in using NArray and friends in ruby to
>> facilitate I/O and basic array operations.
>
> Hi Saji and others,
>
> Just to make sure things are clear here: PyNCL is something that Jeff
> Whitaker of NOAA created which allows you to create NCL plots of CDMS
> variables:
>
> http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/python/pyncl.html
>
> Jeff has created several really useful Python modules, including an
> interface to Spherepack, a GRIB2 reader, and a nice mapping
> interface that ties into matplotlib:
>
> http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/
>
> PyNGL (developed by Fred Clare and myself) is a set of Python bindings
> that mimic some of the generic gsn_xxxx plotting functions. These
> functions were written in C, and swig was used to wrap some of the
> underlying low-level codes (the routines in the HLU API library, to
> name a few).
>
> http://www.pyngl.ucar.edu/
>
> PyNIO (developed by Dave Brown) gives you a similar file I/O handling
> interface that NCL has, allowing you to open NetCDF, HDF4, GRIB1/GRIB2
> files with a single "Nio.open_file" call (similar to NCL's
> "addfile").
>
> http://www.pyngl.ucar.edu/Nio.shtml
>
> In the next release of PyNIO, we'll have some extensive coordinate
> subscripting capability.
>
>> We are aware that SWIG (http://www.swig.org/) can be used to
>> connect C programs with higher-level languages including
>> Ruby and Python. Could somebody provide advice and if possible
>> some help to develop a ruby binding for NCAR graphics?
>
> Unfortunately, developing Ruby interfaces is not something that we
> have time to add to our list right now. Developing NCL and the Python
> bindings have kept us pretty busy so far!
>
> When we go fully open source with PyNGL and PyNIO, you will be able to
> download the C programs we used for creating the plotting routines,
> and perhaps you can wrap these for Ruby.
>
> By the way, we are very interested in hearing people's ideas on these
> various scripting languages, especially as they are used in the
> scientific genre. If you don't want to post back to ncl-talk, feel
> free
> to email your comments to me, and I'll share them with the other
> NCL developers.
>
> --Mary
>
>
>> cheers,
>> saji
>>
>> --
>> Saji N. Hameed
>>
>> APEC Climate Center +82 51 668 7470
>> National Pension Corporation Busan Building 12F
>> Yeonsan 2-dong, Yeonje-gu, BUSAN 611705 saji_at_apcc21.net
>> KOREA
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue May 27 2008 - 15:36:34 MDT

This archive was generated by hypermail 2.2.0 : Fri May 30 2008 - 15:30:01 MDT