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. A list of applications that can read netCDF4 if compiled with HDF5 libraries is below. 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 do NOT support any netCDF application ourselves. Please contact the individual application support directly and/or read Unidata's netCDF webpage. If you are using the R package, they have specific instructions on their web site for dealing with NetCDF4 files: ncdf4.pdf Page 19 of the PDF document has a working example for R.
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 increase the size of the file. In the case of most of the files in our archive, the NC3 size will be double the NC4 size. Also, OPeNDAP might be useful, as it 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.ncYou can also use OPeNDAP and nccopy to download and convert at the same time.
nccopy -k 64-bit-offset filenetcdf4.nc filenetcdf3.nc
nccopy -k 1 http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis.dailyavgs/pressure/air.2014.nc air.2014.ncThis will result in a larger netCDF3 file (about twice as big). CDO (climate data operators) will also convert:
cdo -f nc filenetcdf4.nc filenetcdf3.nc
Applications/languages that can read netCDF4 (netCDF software/apps)
Applications/languages that can't read netCDF4
Datasets that have been transitioned to netCDF4
|20th Century Reanalysis V2||Aug 14,2014|
|NCEP/NCAR Reanalysis I||Oct 20,2014|
|NOAA High Resolution SST||Aug 18,2014|
|CMAP Precipitation||Jul 29,2014|
|NOAA ERSST||Aug 21,2014|
|U of Delaware precipitation and temperature||Jul 29,2014|