Re: Memory size

> I have a cdl file : toto.cdl  (size 13823 Ko)
> I run : ncgen -o toto.nc toto.cdl
> The toto.nc size is 18929 Ko !
>  
> Is it normal ? Thanks
>  
> Note : Some data are missing :
> DRB = 21965.1738, 21252.8848, 20571.7363, 19866.0234, 19171.2129, 18475.25, 
>     17783.791, 17098.75, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 
>     _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 
>     _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 
>     _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,  
> .....

A CDL file man be either larger or smaller than the corresponding
netCDF file.

Usually the CDL file is larger, because the character string
representing a numeric value with associated punctuation requires more
bytes than the binary representation of the same value.  In this case
with many missing values, only three bytes ("_, ") in CDL are needed
for each value, but four bytes (for float) or eight bytes (for double)
are required for each value in the binary netCDF file.  So with enough
missing values, the CDL file will be smaller.  This would also happen
with a large number of single-digit integer values, for which the CDL
representation would similarly be more compact.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
russ@xxxxxxxxxxxxxxxx                     http://www.unidata.ucar.edu

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