Re: [netcdfgroup] Ann: NCL/PyNIO now have support for netCDF-4 classic format (fwd)

Hi Ed,

Yes we realize that NetCDF 4 allows per variable decisions about compression, but we are guessing that most NCL and PyNIO users will be happy just to compress everything in the file. Again this is in the interest of keeping things simple.

If and when someone comes up with a use case where individual decisions about the compression of each variable are important, we will be happy to revisit this currently
missing capability.

---------- Forwarded message ----------
Date: Mon, 27 Aug 2007 10:38:17 -0600
From: Ed Hartnett <ed@xxxxxxxxxxxxxxxx>
To: Jeff Whitaker <jswhit@xxxxxxxxxxx>
Cc: Mary Haley <haley@xxxxxxxx>, netcdfgroup@xxxxxxxxxxxxxxxx
Subject: Re: [netcdfgroup] Ann: NCL/PyNIO now have support for netCDF-4 classic
Jeff Whitaker <jswhit@xxxxxxxxxxx> writes:

Mary Haley wrote:
Hi all,

This is a bit of a late announcement, but NCL V4.3.1 and PyNIO V1.2.0
have support built-in for reading and writing netCDF-4 classic files
on systems where netcdf-4.0-beta1 is supported.

With NCL, you can write a netCDF-4 classic file by calling the
"setfileoption" procedure with the "format" option before you call
"addfile" to create a netCDF-4 classic 4 file:

   a = addfile("","c")

You can further specify a compression level:


Similar code exists for PyNIO:

import Nio
opt                  = Nio.options()
opt.Format           = "netcdf4classic"
opt.CompressionLevel = 5

fout = Nio.open_file("","c",opt)

For more information, see the NCL "setfileoption" or PyNIO documentation: setfileoption.shtml

For download:



Mary:  Can you turn the shuffle filter on with setfileoption?  I've
found that it can really improve the compression ratios when used in
conjunction with zlib compression in netcdf-4 files.


Howdy Mary and Jeff!

Just wanted to point out that compression is a per-variable feature,
not a per-file feature.

That is, different variables in the file can have different
compression factors (or none at all).



Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx