NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi, A potentially serious bug has been discovered in large file support in netCDF-3.6.0: http://www.unidata.ucar.edu/packages/netcdf/docs/known_problems.html#cdf2-bug Until you can upgrade, avoid rewriting in place any large (> 2 GiByte) netCDF files that use the new 64-bit offset format under the conditions described below. You can upgrade the 3.6.0 library with this patch that adds one line to the file libsrc/v1hpg.c: http://www.unidata.ucar.edu/packages/netcdf/patches/patch-3.6.0-cdf2 or get the patched version 3.6.0-p1 from one of ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf.tar.Z ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf.tar.gz or install the current beta release (3.6.1-beta3) from one of ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-beta.tar.Z ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-beta.tar.gz The bug occurs following this sequence of steps: 1. A large netCDF file is created using the new 64-bit offset format variant (also known as the version 2 format) and the file is closed. 2. Later the file is opened for writing, followed by either of the following operations: - enter define mode (calling nc_redef(), nf_redef(), or nf90_redef(), in C, Fortran-77, or Fortran-90 interface, for example) to add a new dimension, variable, or attribute; or - write a new value for an existing attribute (either a global or a variable-specific attribute). Under these conditions, after you leave define mode or close the file, the file header is written out in the "classic" (version 1) netCDF format, chopping the leading bits off any variable offsets that were large enough to require more than 32 bits. If there were no such huge variable offsets, the file is undamaged and remains readable as a classic netCDF file. If there were any huge variable offsets (> 2 GiB), data for the first such variable and all subsequent variables will not be accessed correctly. It is possible to restore the header for such a file to the correct 64-bit offset form so that the data can subsequently be accessed correctly, if no data values have been overwritten since the file header was changed to classic format. Feel free to contact us for help restoring the file headers if this applies to you. If you have any large 64-bit offset format netCDF files that might have mistakenly been rewritten with classic format headers, please be careful not to write any more data into them, as it could overwrite data that could not subsequently be recovered. To determine if a 64-bit offset file has been converted by this bug into a classic format file, see the FAQ "How can I tell if a netCDF file uses the classic format or new 64-bit offset format?" from http://www.unidata.ucar.edu/packages/netcdf/faq.html We're very sorry for any problems and inconvenience caused by this bug. Our testing just missed it, but we've added more extensive testing in version 3.6.1. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program russ@xxxxxxxxxxxxxxxx http://www.unidata.ucar.edu/staff/russ
netcdfgroup
archives: