Conventions for metadata attributes in netCDF for compound data types

Viewed 158

NetCDF allows (at least in its version 4 format based on HDF5) to create compound data types (very similar to a C struct). Each component has a label and a type and a position in the compound type. For example, for a data set of statistics, we could use the compound type defined by [('min', 'float'), ('max', 'float'), ('avg', 'float'), ('std', 'float')] has as its second component a float labeled max.

Now, netCDF also allows for adding metadata. These typically follow cenventions, such as the NetCDF Climate and Forecast (CF) Metadata Conventions. This is useful so that other users of the generated netCDF file can easily understand the metadata.

But I have not found conventions specifically dealing with compound data types, e.g., to give metadata specifically for one component of the compound data.

  • Are there such conventions?
  • If not or also, what is being used in practice?
  • If this is not used, what do you advise and why? (I was thinking of using multi-line attributes, so separated by \n, with a component-specific label to start each line, such as [avg] or #avg.)
1 Answers
Related