[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pycdf and NetCDF-java

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: Re: Pycdf and NetCDF-java
  • Date: Fri, 16 Dec 2005 12:03:57 -0600

The only way I could see Python accessing Java would be through JNI.

Jython is an implementation of Python language that is run by the Java Virtual Machine, and therefore can work with Java classes directly. We have found it to be very effective and useful; however, it is a few revs behind Python and therefore does not have all the current Python library methods available (Jython 2.2 is being worked now). In addition, Jython cannot directly access any C/Fortran libraries.

I should also note that both IDL and Matlab can directly use Java classes, although IDL is quite a bit more cumbersome that Matlab.

Regards,

tom


John Caron wrote:
Can python access java code? is that what jpython is/does?

Rich Signell wrote:
NetCDF-Java Folk,

Is there a way to access the neat stuff in NetCDF-Java from Python?

My colleague Rob Hetland is interested in extending Pycdf with higher level CF-functionality that would determine what the coordinate variables are, time conventions, vertical coordinates, etc.

He could do all the logic in Pycdf, perhaps stealing some code from the CF-checker (which is in python) but is there a way to utilize the NetCDF-Java library where much of this logic has already been coded?

If there was a way to do this, it would allow him to access all the higher level functionality built into the existing nj22 and harness the future development of NetCDF-Java as well.

Thanks,
Rich