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_UINTn2[$lon]=4b; // n2 will be of typeNC_BYTEn3[$lat]=5ull; // n3 will be of typeNC_UINT64n3@a1=6.0d; // attribute will be typeNC_DOUBLEn3@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_DOUBLEn5[$lon_grd]=2. // n5 will be of typeNC_DOUBLEn6[$gds_crd]=2e3; // n6 will be of typeNC_DOUBLEn6@a1=41; // attribute will be typeNC_INTn6@a2=-21; // attribute will be typeNC_INTn6@units="kelvin" // attribute will be typeNC_CHAR
NC_BYTE, a signed 1-byte integer
NC_CHAR, an ISO/ASCII character
NC_SHORT, a signed 2-byte integer
NC_INT, a signed 4-byte integer
NC_FLOAT, a single-precision (4-byte) floating point number
NC_DOUBLE, a double-precision (8-byte) floating point number
NC_UBYTE, an unsigned 1-byte integer
NC_USHORT, an unsigned 2-byte integer
NC_UINT, an unsigned 4-byte integer
NC_INT64, a signed 8-byte integer
NC_UINT64, an unsigned 8-byte integer