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

BUG: NETCDF4_CLASSIC #1689

Closed
cpelley opened this issue May 28, 2015 · 1 comment
Closed

BUG: NETCDF4_CLASSIC #1689

cpelley opened this issue May 28, 2015 · 1 comment

Comments

@cpelley
Copy link

cpelley commented May 28, 2015

Inability to save to NETCDF4_CLASSIC.

import iris
cube = iris.cube.Cube([1])
iris.save(cube, 'tmp.nc', netcdf_format='NETCDF4_CLASSIC')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/h05/cpelley/git/iris/lib/iris/io/__init__.py", line 350, in save
    saver(source, target, **kwargs)
  File "/home/h05/cpelley/git/iris/lib/iris/fileformats/netcdf.py", line 1758, in save
    least_significant_digit)
  File "/home/h05/cpelley/git/iris/lib/iris/fileformats/netcdf.py", line 763, in write
    least_significant_digit=least_significant_digit)
  File "/home/h05/cpelley/git/iris/lib/iris/fileformats/netcdf.py", line 1502, in _create_cf_data_variable
    fill_value=fill_value, **kwargs)
  File "netCDF4.pyx", line 1676, in netCDF4.Dataset.createVariable (netCDF4.c:19077)
  File "netCDF4.pyx", line 2203, in netCDF4.Variable.__init__ (netCDF4.c:24529)
RuntimeError: NetCDF: Attempting netcdf-4 operation on strict nc3 netcdf-4 file

Any hints on how to debug this would be great. Looks like this never actually worked. Since I doubt this would have been unnoticed, I think there may be a bug with the version of the underlying netCDF library??

@cpelley
Copy link
Author

cpelley commented May 28, 2015

Argh, it was because my data was 64bit. The netCDF library does NOT give a suitable error whatsoever!

@cpelley cpelley closed this as completed May 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant