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

Re: Basic NetCDF questions...



Hi,

The netCDF 3 file format doesn't support structures so you can't currently create/write structures. (You should be able to once netCDF 4 comes out.) What you can do structure-wise with netCDF 3 fils is think of all the variables that use the record (unlimited) dimension as a structure. The creation (in the netCDF-java object model, not on file) of a "record" structure variable is what the addRecordStructure() method does. So, to use structures in netCDF 3 files, you need to write the files with an unlimited dimension and when you read the files use the addRecordStructure().

Here is a recently (or soon to be) released document on structures in netCDF 3 files (sorry if this is what Russ already sent you):

http://www.unidata.ucar.edu/packages/netcdf-java/formats/RecordsInNetcdf3.html

Hope this helps,

Ethan

Russ Rew wrote:

Thanks for the pointers. I have been reading through the Structures examples and that looks like what I need to do. Do you happen to have any example of how to create and write structures using the Java NetCDF API? I haven't used the Java library before and addRecordStructure() is always returning false, 2.2 alpha build.

Sorry, I don't know of any examples for that.  I'm CC:ing Ethan Davis
and John Caron, in case they have an example they could point to or
know why addRecordStructure() might be returning false.

--Russ

--
Ethan R. Davis                                Telephone: (303) 497-8155
Software Engineer                             Fax:       (303) 497-8690
UCAR Unidata Program Center                   E-mail:    address@hidden
P.O. Box 3000
Boulder, CO  80307-3000                       http://www.unidata.ucar.edu/
---------------------------------------------------------------------------