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

Re: 20001031: netCDF file format



>From: "Byung S. Lee" <address@hidden>
>Subject: netCDF file format
>Organization: University of Vermont
>Keywords: 200010310035.e9V0Zd410279 netCDF

Hi Byung,

> I wonder if I may ask a few basic questions to confirm or correct my
> understanding ...
> 
> 1. Does NetCDF handle simulation mesh data generated in a sequence of
> time steps?

NetCDF can handle multidimensional arrays that represent variables
defined on a rectangular mesh with space and time dimensions.  Spacing
along each axis need not be regular.  Data for variables along one
dimension, conventionally time, can be appended to; that's why it's
referred to as the "unlimited" (or "record") dimension.  In any
particular dataset all the other dimensions are fixed but the
unlimited dimension can grow.

However, netCDF alone does not directly support triangular meshes,
nested meshes, or other non-rectangular topologies.  It may be
possible to represent these kind of data structures with netCDF, but
you would need to design and adopt some conventions for how to
represent such data structures with an underlying abstraction of
simple multidimensional arrays with at most a single varying dimension
per netCDF dataset.

For an example of such a set of conventions for representing more
complex topologies with netCDF, including even a mesh representation
of the classic teapot, see Lloyd Treinish's post to the netcdfgroup
mailing list:

  http://www.unidata.ucar.edu/glimpse/netcdfgroup-list/1225

> 2. How does NetCDF distinguish between time and space in its
> coordinates?

It doesn't.  Any dimension can have an associated variable with the
same name, which makes it a "coordinate dimension" and the associated
variable is then a "coordinate variable".  Any variable can have an
associated "units" attribute that specifies the units used, which can
include units of length or time.  There is a closely associated
package, udunits, that is useful for representing units, converting to
and from string representations to an internal binary representation,
and performing operations on values with associated units, including
arithmetic on commensurable units and conversion between compatible
units.  It's possible with this udunits package to easily determine
whether any particular unit is a unit of length or duration.

Some netCDF datasets may have multiple time dimensions, for example
the time a model was run and the simulation times for model output.

> 3. How significant is mesh data among all objects handled by NetCDF?

I don't think netCDF is used much for finite element methods, because
their meshes tend to vary with time or use more complex topologies
than simple multidimensional rectangular arrays.  However, as Lloyd
Treinish's posting demonstrates, it is possible with suitable
conventions to use netCDF for irregular grids and meshes.

--Russ