-
Notifications
You must be signed in to change notification settings - Fork 10
Can 2.8.0 still create netCDF3 Classic ? #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
it's possible something changed in Netcdf 4.4 should be an easy fix. @dnadeau4 we should look into a new default (NC3 classic?) looks like people are typing this all the time. |
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!
|
@jypeter Thanks! This is great! I will work carefully on it tomorrow, today I have to release CMOR 3.2.2 which will take all day. |
@dnadeau4 and @doutriaux1 If I run the script at the end of #98 , I expect to get netCDF3 Classic because I have specified:
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?
The text was updated successfully, but these errors were encountered: