Next: , Previous: NF_LONG and NF_INT, Up: C interface changes from NetCDF 2 to NetCDF 3


B.6 What's Missing?

The new C interface omits three "record I/O" functions, ncrecput, ncrecget, and ncrecinq, from the netCDF-2 interface, although these functions are still supported via the netCDF-2 compatibility interface.

This means you may have to replace one record-oriented call with multiple type-specific calls, one for each record variable. For example, a single call to ncrecput can always be replaced by multiple calls to the appropriate NF_PUT_VAR functions, one call for each variable accessed. The record-oriented functions were omitted, because there is no simple way to provide type-safety and automatic type conversion for such an interface.

There is no function corresponding to the nctypelen function from the version 2 interface. The separation of internal and external types and the new type-conversion interfaces make nctypelen unnecessary. Since users read into and write out of native types, the sizeof operator is perfectly adequate to determine how much space to allocate for a value.

In the previous library, there was no checking that the characters used in the name of a netCDF object were compatible with CDL restrictions. The ncdump and ncgen utilities that use CDL permit only alphanumeric characters, "_" and "-" in names. Now this restriction is also enforced by the library for creation of new dimensions, variables, and attributes. Previously existing components with less restrictive names will still work OK.