⇐ ⇒

[CF-metadata] Request for standard_name="sea_binary_mask"

From: Christopher Barker <Chris.Barker>
Date: Tue, 04 Jan 2011 10:49:42 -0800

On 1/4/11 10:15 AM, John Caron wrote:
>> So exactly how much does NetCDF-Java do for you? Can I ask it for a
>> land-sea mask and it will look for the multiple ways that might be
>> stored and give it back to me? If so, pretty cool!
>
> It cant do that right now, but that functionality could be provided in a
> standard API, and there is a framework for implementing the API by
> different dataset conventions. This idea of providing a common API is
> pretty much the idea of the "Common Data Model" or CDM.

well, there is a data model, and then there are conventions. Having the
library understand the conventions is a great idea. For this simple
example, it would solve the problem, and doing it in one place, rather
than separately in all client code. I've thought of working on a CF
python package to build on Jeff Whittaker's NetCDF4 package -- putting
all the CF convention stuff in one place.

> IFAIU, Python cant interact directly with Java (ie link to it).

Correct. It can potentially work with it through the JNI.

Here is a package to make that easier:

JCC 2.7: a C++ code generator for calling Java from C++/Python

http://pypi.python.org/pypi/JCC/2.7

Another option is GNU CNI -- have you tried to compile any of your code
with gcj? That would have the advantage of not having to run a JVM at all.

> We have
> an experimental project here to write a C library that communicates
> across a socket to a "CDM stack" in Java, presumably much easier than
> duplicating the CDM in C.

yup -- though then you have to running a server of some wort in Java,
yes? And does this work well across platforms (i.e. Windows?). It could
be pretty cool, though.

> One of the pieces of that project is to put a
> Python layer on top of that, as a way of making it immediately useful
> and to get feedback on the API.

Sounds good -- Python is better for test code, too.

> We are thinking of making Python an
> important component of Unidata data access technologies (resources
> permitting, etc, etc).

Also sounds good -- Python use is really growing in the scientific
community.

Another option is to duplicate the CDM in Python -- easier than C for
sure, probably easier than JAVA (though you've already got JAVA), but
not so useful to C/C++/Fortran developers.

There is also Jython, which can work directly with JAVA classes -- that
would be a fine way to do some scripting and testing, but not much use
to most Scientific Python users, who rely on the "cpython" interpreter,
and other C packages, like numpy.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception
Chris.Barker at noaa.gov
Received on Tue Jan 04 2011 - 11:49:42 GMT

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:41 BST

⇐ ⇒