Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Can 2.8.0 still create netCDF3 Classic ? #99
If I run the script with my old 2.1.0, I do get NetCDF3 Classic
But If I use 2.8.0, I get netCDF-4 classic
Note that if I comment out the cdms2.set lines in the script and run it with 2.1.0, I also get netCDF-4 (as expected)
Is this a bug in 2.8.0? Or is there a new flag you have to use if you want netCDF3?
OK, so the message I get when I don't set anything is the following
I have experimented with different options' combinations:
So I think that the following information line should be after all four options rather than only after the first 2 options
I wonder if the last line displayed in the warning is not some kind of bug, or left-over, because it seems odd:
This is a very useful warning, because I never remember all the options I should use, so I wonder if you could use some indentation to make it more readable, and display the warning without starting with /home/share/unix_files/cdat/miniconda2/envs/cdatm14/lib/python2.7/site-packages/cdms2/dataset.py:1884:
Should you use returns instead of returning?
Should you use set the compression level instead of set different values of compression?
If I take what's above and several extra changes, I get the following text, which I find slightly better (but I may be wrong)
That said, I have other questions... I'm not sure I understand fully what setNetcdf4Flag does. And when you write NetCDF4 file with no shuffling or deflate and noclassic will be open for parallel i/o, it seems equivalent to having
and you get NetCDF3 and not the advertised NetCDF4!
My last question is: when do you disable the printing of the warning for the first write operation? It is not printed when you explicitely set all the options to 0, but it is printed when you set all options to 1! It is also still printed when I use different options combinatations
Hmmm, I've browsed quickly cdms/Lib/dataset.py and it seems there is a function that could also help the user force netcdf3 output, except that it is missing the cdms2.setNetcdf4Flag(0) option!