The table below lists the postfix character(s) to add to a number literal for type cohesion. To use the new netcdf4 types nco must be compiled/linked to the netcdf4 library and the Output file must be hdf5.
n1[$time]=1UL; // n1 will now by typeNC_UINT
n2[$lon]=4b; // n2 will be of typeNC_BYTE
n3[$lat]=5ull; // n3 will be of typeNC_UINT64
n3@a1=6.0d; // attribute will be typeNC_DOUBLE
n3@a2=-666L; // attribute will be typeNC_INT
A floating point number without a postfix will default to NC_DOUBLE
. An integer without a postfix will default to type NC_INT
. Thre is no postfix for characters. Use a quoted string.
n4[$rlev]=.1 // n4 will be of typeNC_DOUBLE
n5[$lon_grd]=2. // n5 will be of typeNC_DOUBLE
n6[$gds_crd]=2e3; // n6 will be of typeNC_DOUBLE
n6@a1=41; // attribute will be typeNC_INT
n6@a2=-21; // attribute will be typeNC_INT
n6@units="kelvin" // attribute will be typeNC_CHAR
NC_BYTE
a signed 1 byte integer
NC_CHAR
a ISO/ASCII character
NC_SHORT
a signed 2 byte integer
NC_INT
a signed 4 byte integer
NC_FLOAT
a single precision floating point number
NC_DOUBLE
a double precision floating point number
NC_UBYTE
a unsigned 1 byte int
NC_USHORT
a unsigned 2-byte int
NC_UINT
a unsigned 4-byte int
NC_INT64
a signed 8-byte int
NC_UINT64
a unsigned 8-byte int