NetCDF4 Files at PSD
We have decided at PSD to switch our file format from netCDF3 to netCDF4-classic wherever possible. New datasets will be created in netCDF4 and we will be converting older files to netCDF4-classic. NetCDF4 has the advantage that files may read faster (much faster sometimes) in some applications (e.g. NCL). It also has the advantage that we will not need to pack the data using a scale and offset and users will not need to unpack data. NetCDF4 provides compression that is comparable to the use of short integers (~50% for most files). The compression they use is lossless, also an advantage.
Most applications should be able to read netCDF4-classic if they are compiled against the latest NetCDF library, and that library was built with NetCDF4 support enabled, requiring HDF5 libraries. Unidata's NetCDF website has explicit instructions for building NetCDF correctly. You may need to change your code if you explicitly unpack the data. NCL's short2flt routine will not need to be changed if you use that. In some cases, users have had issues if their application wasn't compiled with HDF libraries correctly. We o NOT support any netCDF application ourselves. Please contact the individual application support directly and/or read Unidata's netCDF webpage. Unidata has a program called nccopy that will convert NetCDF 4 files to NetCDF 3. If you are not able to get an application to work, you may find that useful though it will likely increase the size of the file by 100%. Also, OPeNDAP might be useful, as it of renders the file as if it were NetCDF3 Classic. See our OPeNDAP web page for details. You may contact us if all the above doesn't help.To determine a file type:
ncdump -k file.ncTo convert a netCDF4 file to netCDF3, try one of these, depending on what you want your output to be:
nccopy -k classic filenetcdf4.nc filenetcdf3.nc
nccopy -k 64-bit-offset filenetcdf4.nc filenetcdf3.nc
nccopy -k enhanced-nc3 filenetcdf4.nc filenetcdf3.nc