[ncl-talk] Netcdf-4 simple storage methods

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Fri Mar 20 12:52:57 MDT 2015


Wei,

Thanks for your reply.  The workaround is to create empty definitions for
contiguous variables with ncgen, then insert data with NCL.  An NCL option
would make nicer code.  It's not important.

--Dave

On Fri, Mar 20, 2015 at 10:26 AM, Wei Huang <huangwei at ucar.edu> wrote:

> Dave,
>
> At the current NCL code stands, as shuffle is on by default,
> so the nc file written from NCL with "NetCDF4Classic",
> will always be "Chunked", shuffled. And there is no way to turn
> off the deflatelevel info (as shuffle is on).
>
> So, NCL can not produce a file similar to the example.
>
> Wei
>
> ================================================
> 1850 Table Mesa Dr.
> Boulder, CO 80307
> Phone: 303-497-8924
>
> On Thu, Mar 19, 2015 at 10:42 AM, Dave Allured - NOAA Affiliate <
> dave.allured at noaa.gov> wrote:
>
>> NCL team,
>>
>> Here is the ncdump -s of an actual Netcdf-4 classic file made with ncgen:
>>
>> netcdf simple {
>> dimensions:
>>     lon = 4 ;
>>     lat = 3 ;
>>     time = UNLIMITED ; // (5 currently)
>> variables:
>>     float lat(lat) ;
>>         lat:_Storage = "contiguous" ;
>>     float lon(lon) ;
>>         lon:_Storage = "contiguous" ;
>>     double time(time) ;
>>         time:_Storage = "chunked" ;
>>         time:_ChunkSizes = 5 ;
>>
>> // global attributes:
>>         :_Format = "netCDF-4 classic model" ;
>> data:
>>
>>  lat = _, _, _ ;
>>
>>  lon = _, _, _, _ ;
>>
>>  time = _, _, _, _, _ ;
>> }
>>
>> This file can also be made with custom C code using the Netcdf-C API.  Is
>> it possible to create this exact file with NCL?  In particular:
>>
>> * Can the storage method "contiguous" be selected?
>>
>> * For chunked variables, is it possible to omit the special attributes
>> _DeflateLevel, _Shuffle, and _Endianness, as this file demonstrates?
>>
>> My objective is simply to reduce clutter in file dumps.  NCL always adds
>> _DeflateLevel = 0 by default.  I am aware that this is functionally
>> equivalent to contiguous.
>>
>> --Dave
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150320/61849f44/attachment.html 


More information about the ncl-talk mailing list