Provides an abstraction for sampled functions between
multidimensional spaces. Samplings of the domain and range are
represented as multidimensional arrays of values called variables (see
ucar.multiarray). The functional relationship between the elements of
the domain and the range is maintained through the use of shared named
dimensions.
For example, suppose we wish to model a
curve in the plane with N samples. We might create a dimension named
"samples" whose length is N. We would then create two
variables, say "x" and "y" which each have a single
dimension, "samples". The relationship between elements of x
and those of y is made explicit through the shared dimension.
An important feature of netCDF is that the individual variables may
have descriptive metadata, called attributes, associated with them.
This might include characteristics such as the unit of measurement (as
a string), identification of values which are to have special
interpretation, or specifying the precision of data. The dataset as a
whole may also have attributes, such as a string describing the
pedigree of the data.
The ucar.netcdf includes the following basic elements
-
Class Dimension - A
named integer value. Used in the construction of ProtoVariable;
specifies the shape of Variables and functional relationships
among Variables
-
Class Attribute - A
name value pair. Contains the metadata
-
Class ProtoVariable -
Used as prototype in the construction of Variables. Has a name, type
specification, an AttributeSet, and an array of Dimensions that
specify its shape
-
Class Variable - A
named MultiArray with Attributes. Has an AttributeSet, and a
DimensionIterator (see below). Instances with working I/O functionality
generally exist in the context of a Netcdf data set.
Type specific containers and iterators of these are visible as the
following interfaces. Each of these have similar interfaces except for
type of the object contained or iterated. It might be useful to think
of these as analogous to template class instantiations.
At the highest level we have two concrete collections and an interface.
-
Class Schema -
Implements set of ProtoVariable, has a DimensionSet and an
AttributeSet. Used as a prototype in the construction of
Netcdf datasets.
-
Interface Netcdf -
Extends set of Variable, has a DimensionSet and an AttributeSet. The
top level interface of this API.
-
Abstract Class AbstractNetcdf
- Partial implementation of interface Netcdf. For use by
implementors, not most clients.
-
Class NetcdfFile -
Extends AbstractNetcdf. Provides connection to netCDF version 1 files.
Annotated examples
are available from our web site.