Re: [netcdfgroup] file sizes when using netCDF 4 with UNLIMITED dimension

a single integer is in its own chunk. bit of overhead there.

On 6/2/2011 9:32 AM, Upendra Dadi wrote:
Hi All,
I am running into a strange issue when using UNLIMITED dimension with netCDF 4. The size of the file blows up by a big factor when using UNLIMITED as compared to using a definite value. To give an example, I have a cdl file like this:

--------------test.cdl-------------------------
 netcdf test {
dimensions:
        dim = 3169;
variables:
        int var(dim) ;
data:

 var = .........;
}
----------------------------------------------

The size of the netCDF file created by converting this text file to netCDF is 17776 bytes:

   $ ncgen -k 4 -o test.nc test.cdl
   $ ls -l test.nc
   -rw-r--r-- 1 test test 17776 Jun  2 15:19 test.nc

After changing the dimension dim to UNLIMITED and recreating the netCDF file, the size of the file blows up to 138910 bytes:

    $ ncgen -k 4 -o test.nc test.cdl
    $ ls -l test.nc
    -rw-r--r-- 1 test test 138910 Jun  2 15:12 test.nc

What is going on here? When using 1 with -k option in ncgen, the size of the file remains same(12756 bytes) whether using UNLIMITED or not. So it looks like a netCDF 4 issue. Is there a way to avoid this?


Upendra


_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/



  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: