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

Re: netCDF Java question...



>To: address@hidden
>From: "Matt Pearce" <address@hidden>
>Subject: Re: 20010829: netCDF Java question...
>Organization: Autometric
>Keywords: 200108291739.f7THdj121367

Matt,

> OK... Given that there are no functions to map directly to XDR
> representation, can you point me to documentation that describes the
> XDR format (and how I can read it/write it)?  I maybe able to write
> some basic I/O code that reads/writes out the XDR in large buffered
> blocks.  Of course, you guys probably do something similar deep in
> the netCDF library itself.  I did try the suggestion in the e-mail
> below with MultiArrayImpl, but it is still somewhat slow.

The format for XDR is described here:

  http://www.faqs.org/rfcs/rfc1832.html

but it may be enough to say the representation of integer quantities
is BigEndian and for floats and doubles it uses IEEE single and double
precision floats.  The format for netCDF in terms of XDR is specified
here:

  http://www.unidata.ucar.edu/packages/netcdf/guidec/guidec-18.html#HEADING18-0

or in an equivalent PDF document.

> I have a feeling that even if I were to use reshape(), it still is
> performance inefficient.  Writing out the data element by elements is also
> real inefficient.

The ucar.nc2.NetcdfFileWriteable.write() method in the version 2
interface doesn't write an element at a time, but instead writes a
block of values.

Our java-netcdf expert will be back from vacation after Labor Day, so
may have a better suggestion if you can wait until next week ...

--Russ