Re: [netcdf-java] netcdf version options

  • To: Bob Simons - NOAA Federal <bob.simons@xxxxxxxx>
  • Subject: Re: [netcdf-java] netcdf version options
  • From: Ben Caradoc-Davies <ben@xxxxxxxxxxxx>
  • Date: Fri, 29 Apr 2016 11:33:32 +1200
Bob,

please keep discussions on-list so that the community can benefit.

To write a NetCDF-3 file with large file support (64-bit offsets) using the pure Java implementation, call NetcdfFileWriter.setLargeFile(true) while in define mode. The default is to write a classic NetCDF-3 file.

Kind regards,
Ben.

On 29/04/16 11:14, Bob Simons - NOAA Federal wrote:
Given your interpretation, then is there no pure-java way to make netcdf3
with 64bit extensions?
I thought the 64bit extensions were supported before libnetcdf4 existed.


On Thu, Apr 28, 2016 at 4:02 PM, Ben Caradoc-Davies <ben@xxxxxxxxxxxx>
wrote:

Bob,

here is an excerpt from the source (slightly reformatted):


public enum Version {

netcdf3(".nc"), // java iosp

netcdf4(".nc4"), // jni netcdf4 iosp mode = NC_FORMAT_NETCDF4

netcdf4_classic(".nc"), // jni netcdf4 iosp mode =
NC_FORMAT_NETCDF4_CLASSIC

netcdf3c(".nc"), // jni netcdf4 iosp mode = NC_FORMAT_CLASSIC   (nc3)

netcdf3c64(".nc"), // jni netcdf4 iosp mode = NC_FORMAT_64BIT     (nc3 64
bit)

ncstream(".ncs");  // ncstream iosp


 From this it looks to me like netcdf3 and netcdf3c will both write
NetCDF-3 files. The difference is that netcdf3 will use the pure Java
implementation whereas netcdf3c will use JAI to call the native (compiled
C) libnetcdf4 with options to write a 32-bit-offset NetCDF-3 file (just
like libnetcdf 3.5.1 and earlier). These will in theory produce the same
output but might have slight differences. The pure Java version will be
most portable, and the native libnetcdf4 version may be a much faster.

Yes, these docs could be better. Library users should not have to read the
source.

Kind regards,
Ben.


On 29/04/16 10:16, Bob Simons - NOAA Federal wrote:

Can you please add more descriptive descriptions of the netcdf version
options at

http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/javadoc/ucar/nc2/NetcdfFileWriter.Version.html
?
Notably, what is the difference between netcdf3 and netcdf3c?
Thank you.



_______________________________________________
netcdf-java mailing list
netcdf-java@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/


--
Ben Caradoc-Davies <ben@xxxxxxxxxxxx>
Director
Transient Software Limited <http://transient.nz/>
New Zealand





--
Ben Caradoc-Davies <ben@xxxxxxxxxxxx>
Director
Transient Software Limited <http://transient.nz/>
New Zealand



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