This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: "Dr . Kalyani " <address@hidden> >Subject: kalyani >Organization: . >Keywords: 199805211036.EAA14515 Hi Dr. Kalyani, > I have few doubts about netcdf usage can you help me in solving > the following problems > > 1. I want to append 3 or 4 Netcdf files each file is of a size 220mb. is > any specific command is available like ncegen and ncdump for appending > netcdf files. If you just want to package several different netCDF files together as one file that can later be split up again, you can use the Unix "tar" command. If the files have a similar structure (same variables, dimensions, attributes), you can create a single larger netCDF file that contains all the data with one of the programs ncecat, ncks, or ncrcat from the freely-available NCO (netCDF operators) package described at http://www.unidata.ucar.edu/packages/netcdf/software.html#NCO Another utility that may be of use is nccat, Chuck Denham's program to concatenate two netCDF files along their record dimension. The files must be identical in variable names and dimensions. Each variable must have a leftmost NC_UNLIMITED record dimension. This program is part of the User-Contributed netCDF software described and available from http://www.unidata.ucar.edu/packages/netcdf/contrib.html under the entry "nccat.c". > 2. can we compress netcdf files using any specfic command( i have > compressed a file using gzip command,I am able to compress a file which is > of size 220 mb to 107 mb, but I don't know whether it is of practise to > compress files like that or not) if not why? Yes, you can compress netCDF files using gzip, but you will have to uncompress a file before reading it. The netCDF library can't read netCDF files while they are still compressed. If you need to be able to read files while they are compressed, Bill Noon has written and made available a set of modifications to the netCDF 3.3.1 library source that allows transparent access to both compressed and uncompressed netCDF files. You just have to relink against the znetcdf library. Creating compressed netCDF files requires only one additional flag in invoking the nccreate routine. A more complete explanation, the source changes, instructions on how to patch the netcdf-3.3.1 source, and some performance numbers are available from http://snow.cit.cornell.edu/noon/z_netcdf.html --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu