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

[netCDF #XFU-202199]: netcdf files



Hi Amanda,

> I am a researcher at meteo-france and i am contacting you to get some
> advice about generating netcdf files. I would like to generate a netcdf
> output file containing at the same time a map of objects which have
> single value attributes and also an attribute which is a array with a
> variable length. Is it possible to generate this kind of structure? If
> yes, how can I do it?

By "map of objects which have single value attributes" I'm assuming you 
mean a collection of objects, possibly of different types, that each have 
a named attribute of the same name and type.  If each of the objects is 
represented as a netCDF variable accessible by its name, then such a data
type can be represented in a netCDF file as a collection of netCDF variables.
However, this is not a very convenient representation, as the objects each
must have distinct names, and cannot be accessed by their attribute values,
for example.

If you are using netCDF-3 with its simple data model and "classic" data
format, you won't be able to easily represent either of those kinds of data 
structures.  However, using the netCDF-4 enhanced data model, with its 
support for user-defined types, variable-length types, and groups, I think
it is possible to represent what you want.  Alternatively, you may want to 
also look at HDF5, which supports a "reference" type.  An array of references
pointing to other data objects may but what you want for the map data structure,
and netCDF-4 does not include support for HDF5 references.

--Russ


Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: XFU-202199
Department: Support netCDF
Priority: Normal
Status: Closed