2007 Unidata NetCDF Workshop for Developers and Data Providers > Using NetCDF-4 Features, Part 1
12.8 New Atomic Types in NetCDF-4
New types have been added to netCDF-4.
- In netCDF-4 jargon, there are atomic types, and user defined
types.
- Atomic types are those which can't be further subdivided.
- All six classic model types (BYTE, CHAR, SHORT, INT, FLOAT,
DOUBLE) are atomic, and fully supported in netCDF-4.
- The following new atomic types have been added in netCDF-4: UBYTE,
USHORT, UINT, INT64, UINT64, STRING.
- Use these just like the classic model types, for example, use this
function to write an attribute of UINT64:
EXTERNL int
nc_put_att_ulonglong(int ncid, int varid, const char *name, nc_type xtype,
size_t len, const unsigned long long *op);
- Take care when using the unsigned types, as they are not supported
in Java or Fortran. Who can read an unsigned long long? Only C/C++.
- The string type will efficiently store arrays of variable length
strings.
2007 Unidata NetCDF Workshop for Developers and Data Providers > Using NetCDF-4 Features, Part 1