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