netCDF 4.2.1.1
Large File Support

It is possible to write netCDF files that exceed 2 GiByte on platforms that have "Large File Support" (LFS).

Such files are platform-independent to other LFS platforms, but trying to open them on an older platform without LFS yields a "file too large" error.

Without LFS, no files larger than 2 GiBytes can be used. The rest of this section applies only to systems with LFS.

The original binary format of netCDF (classic format) limits the size of data files by using a signed 32-bit offset within its internal structure. Files larger than 2 GiB can be created, with certain limitations. See Classic Limitations.

In version 3.6.0, netCDF included its first-ever variant of the underlying data format. The new format introduced in 3.6.0 uses 64-bit file offsets in place of the 32-bit offsets. There are still some limits on the sizes of variables, but the new format can create very large datasets. See 64 bit Offset Limitations.

NetCDF-4 variables and files can be any size supported by the underlying file system.

The original data format (netCDF classic), is still the default data format for the netCDF library.

The following table summarizes the size limitations of various permutations of LFS support, netCDF version, and data format. Note that 1 GiB = 2^30 bytes or about 1.07e+9 bytes, 1 EiB = 2^60 bytes or about 1.15e+18 bytes. Note also that all sizes are really 4 bytes less than the ones given below. For example the maximum size of a fixed variable in netCDF 3.6 classic format is really 2 GiB - 4 bytes.

Limit No LFS v3.5 v3.6/classic v3.6/64-bit offset v4.0/netCDF-4

Max File Size 2 GiB 8 EiB 8 EiB 8 EiB ??

Max Number of Fixed Vars > 2 GiB 0 1 (last) 1 (last) 2^32 ??

Max Record Vars w/ Rec Size > 2 GiB 0 1 (last) 1 (last) 2^32 ??

Max Size of Fixed/Record Size of Record Var 2 GiB 2 GiB 2 GiB 4 GiB ??

Max Record Size 2 GiB/nrecs 4 GiB 8 EiB/nrecs 8 EiB/nrecs ??

For more information about the different file formats of netCDF See Which Format.

 All Data Structures Files Functions Variables Typedefs Defines

Generated on Tue Aug 6 2013 11:40:57 for netCDF. NetCDF is a Unidata library.