Re: Calling interface to NCL from Python - Ethan Alpert Python module.

From: Jeff Whitaker (jsw AT XXXXXX)
Date: Mon Dec 23 2002 - 14:18:35 MST


Lou: How about the source code for those of us who are not running x86
linux?

-Jeff

On Mon, 23 Dec 2002, Louis J. Wicker wrote:

> All:
>
> I have put a small tar file on my web site which demonstrates how to
> create a Python/NCL program where Python is used to create the NCL
> script. This is using a very simple library that Ethan Alpert wrote for
> me a while back at SCD.
>
> You can download it at: http://www.nssl.noaa.gov/~lwicker/testncl.tar
>
> I am simply using one of the demonstration scripts to show how you build
> a simple program.
>
> Now, please check for where your GSUN is defined, the testncl.py script
> defines where it is as part of an ncl load statement.
>
> Also, remember, the ncl.so module is the new library and it is based on
> Python2. So you need to be running that and also be on a RH Linux
> system. I do not know if other Intel-based Linux systems will work.
>
> Here is a quick example of using the lib:
>
> $ python2
>
> >>> import ncl
>
> >>> ncl.command("a = 17.0")
>
> (0) 17
>
> >>>ncl.command("print(a)")
>
> Variable: a
> Type: float
> Total Size: 4 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> (0) 17
>
>
> Merry Xmas, and enjoy. Not sure if this adds a lot to what you already
> have.
>
> Lou Wicker
>
> On Wed, 2002-12-18 at 16:03, Jeff Whitaker wrote:
>
> > Lou: How about posting it on the web somewhere so we all can try it?
> >
> > -Jeff
> >
> > On Wed, 18 Dec 2002, Louis J. Wicker wrote:
> >
> > > I just want to remind everyone, especially those at SCD who are working
> > > on stuff that Ethan Alpert already built me an interface that connects
> > > Python to NCL via a Python module.
> > >
> > > You can compose and assemble NCL scripts in Python and then pass that
> > > script to be executed by the NCL interpreter.
> > >
> > > There is no data being passed from Python to NCL, so its functionality
> > > is limited, however, I found it to be a pretty useful library and was
> > > able to build several interactive scripts with it.
> > >
> > > I have the Python module built for Python 2.x that runs only on Linux
> > > OS. If people want to try it out, let me know.
> > >
> > > Lou Wicker
> > >
> > >
>
>

-- 
Jeffrey S. Whitaker         Phone : (303)497-6313
NOAA/OAR/CDC  R/CDC1        FAX   : (303)497-6449
325 Broadway                Web   : http://www.cdc.noaa.gov/~jsw
Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124

_______________________________________________ ncl-talk mailing list ncl-talk AT ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Mon Dec 30 2002 - 09:26:39 MST