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

Re: Greetings



> Date: Wed, 27 Jan 1999 05:42:46 -0800
> From: Scottie Swenson <address@hidden>
> To: address@hidden, address@hidden
> Subject: Greetings

Hi Scottie,

> I have been working with the netCDF java packages and have become a bit
> confused as to what exactly I am trying to do... ;^)
> 
> I do not fully understand the meaning behind the rank and lengths in the
> Variable class. Additionally the concept of copyout leaves me scratching
> my head. I can not find adequate documentation for what is meant by
> origin[] and shape[].

"Rank" is just the dimensionality or number of dimensions for a
multidimensional variable.  A scalar is rank 0, a vector is rank 1, a
2-dimensional array is rank 2 and so on.  The ideas behind origin[]
and shape[] are described pretty well with examples in the NetCDF User's
Guide for C, section 3.2: Data Access, 3.2.1: Forms of Data Access, and
3.2.2: An Example of Array-Section Access.  You can read these online
at

  http://www.unidata.ucar.edu/packages/netcdf/guidec/guidec-8.html#HEADING8-64

and the description of the C functions nc_put_vara_TYPE and
nc_get_vara_TYPE at

  
http://www.unidata.ucar.edu/packages/netcdf/guidec/guidec-12.html#HEADING12-480
  
http://www.unidata.ucar.edu/packages/netcdf/guidec/guidec-12.html#HEADING12-991

Where the Java documentation uses "origin[]", the C documentation uses
"start[]" and where the Java documentation uses "shape[]", the C
documentation uses "count[]" but the idea is exactly the same.

> I have found some small problems with the ucar.netcdf classes that make
> external use difficult if not impossible. So I would like to know which
> of you two is better to collaborate with on the modifications. I have
> also finished writing the new classes to allow byte arrays to be used as
> files and netCDF look ups. I would like to offer these up for inclusion
> in the ucar packages.
> 
> You can call me directly or reply by email.

Glenn is the one you want to send your suggested changes to.  I've
explained to him that you found some private methods and constructors
that need to be made public or at least protected to do what you
needed to do to adapt netCDF to read from a ByteInputStream.

As for the problem of how to "interlace" the x and y values from large
1-dimensional x- and y-variables into a single 2-dimensional "point"
variable with alternating x and y values, we think this can be done
using the copyin and copyout methods and the MultiArray DecimateMap.
I'll try to generate a small example and send it in the next message.

--Russ