NetCDF and Python

Paul Hein writes

 > With all the discussion about adding the Java interface and with
 > Rob Managan <managan@xxxxxxxx> mention about a Python interface.
 > I thought I would bring up the tool SWIG which allows one to take
 > C (and C++) code and interface with Tcl, Perl, Python, or Guile.

Someone has already made a start at this (see below), and I've hired
an engineering co-op student to work on Python and netCDF starting in
September.  We are  (like Jon Meek) fans of the Perl interface,
but the additonal attractions of Python include rapidily growing
matrix and image processing libraries (see this month's Computers in
Physics or look at 
ftp://ftp-icf.llnl.gov/pub/python/numerical_python.ps and
extending_python.ps), portability across Mac and Windows 1995 as well as
Unix, and several graphics packages (we might also try SWIG for a
NCAR graphics/Python wrapper to replace NCL).

We'd be interested in hearing from others thinking about netCDF and Python.

_______________________________
Archived mail message:


        Tom Schwaller <tschwal@xxxxxxxxxx>


I haven't turned up anything on NetCDF and Python.  

However I processed a slightly modified NetCDF header with David
Beazley's recently announced SWIG (Simplified Wrapper and Interface
Generator)

        http://www.cs.utah.edu/~beazley/SWIG

It does produce something that looks like a module.  I didn't even try
to compile it, I'm running out of time and I've decided to make do
with the NetCDF fan utilities for initial prototyping (at least until the
matrix stuff gets into solid Beta).

SWIG generated code that would at least allow you to get at the byte
streams that make up the data.  If someone is keen, they could
probably wrap the low level SWIG module with something that would
return python matrix objects etc.  On the surface, at a glance, off
the top of my head, with only superficial knowledge of everything
involved, this looks technically reasonably easy :)

I will probably have a go at this once the matrix stuff is more polished
(if no one else has done it by then). 

Michael

  • 1996 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: