Skip to content
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

File saved as netcdf-4 despite choosing format='NETCDF3_CLASSIC' #40

Closed
dopplershift opened this issue Feb 26, 2014 · 5 comments
Closed

Comments

@dopplershift
Copy link
Member

From sourish....@gmail.com on February 19, 2010 07:40:14

What steps will reproduce the problem? 1. Store the attached file AL20_ROBS_1979 and the script Convert.py in the
same directory.
2. From ipython shell, '%run Convert'
3. Check the format of the input and output files using 'ncdump -k
AL20_ROBS_1979' and 'ncdump -k AL20_ROBS_1979-processed.nc' What is the expected output? What do you see instead? I expect the input and output files to have the same format, namely
NETCDF3_CLASSIC, since the output file was created with an explicit
'format=' parameter to match the input file format. However, the output
file is a netcdf-4 file. The same thing happens if on line 8 of Convert.py
I explicitly specify format='NETCDF3_CLASSIC'. The output file is still
netcdf-4. What version of the product are you using? On what operating system? netcdf-4.1-rc1
netCDF4-0.9
64-bit ubuntu linux

Attachment: AL20_ROBS_1979 Convert.py

Original issue: http://code.google.com/p/netcdf4-python/issues/detail?id=40

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on February 19, 2010 07:57:46

When I run your script, I get the expected result

[mac28:/Downloads] jwhitaker% ncdump -k AL20_ROBS_1979-processed.nc
classic
[mac28:
/Downloads] jwhitaker% ncdump -k AL20_ROBS_1979
classic

this is with netcdf-4.1 (the buggy release that was recently pulled from the ftp site).
I don't have 4.1rc1 on this machine, but I doubt that would make a difference.

@dopplershift
Copy link
Member Author

From sourish....@gmail.com on February 23, 2010 04:01:22

I asked a colleague of mine, and she has the same problem as I do -- the script saves
a netcdf4 file. For her, the versions are:

In [9]: netCDF4.version
Out[9]: '0.8.2'

In [10]: netCDF4.getlibversion()
Out[10]: '4.1-beta2 of Oct 22 2009 17:33:27 $'

whereas for me the versions are:

3: '4.1-rc1 of Feb 14 2010 07:56:44 $'

So the common thing seems to be the 4.1-blah version of the underlying library. I
will try today with 4.0.1 and see if I still have the same problem.

@dopplershift
Copy link
Member Author

From sourish....@gmail.com on February 23, 2010 04:42:10

I just installed netcdf-4.0.1 and python-netcdf4 on top of it, and my problem
disappeared! Now the output file shows a 'classic' format as well. If and when you
have the time and opportunity to install 4.1-rc1, could you please verify?

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on February 23, 2010 04:55:16

It works correctly for me with 4.1-rc1/HDF5 1.8.4

-Jeff

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on February 25, 2014 18:04:09

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant