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

Iris always save netCDF files with Conventions=CF-1.5 #1769

Closed
ocefpaf opened this issue Sep 5, 2015 · 1 comment
Closed

Iris always save netCDF files with Conventions=CF-1.5 #1769

ocefpaf opened this issue Sep 5, 2015 · 1 comment

Comments

@ocefpaf
Copy link
Member

ocefpaf commented Sep 5, 2015

According to the docs iris support CF.15, but it would be nice if iris could preserve the original metadata.

I have a bunch of CF-1.6 files that, after processing them with iris, are downgraded to CF-1.5.

Here is an example:

>>> import iris
>>> cube = iris.cube.Cube([1, 2, 3])
>>> units = iris.unit.Unit('m')
>>> metadata = dict(featureType='timeSeries', Conventions='CF-1.6')
>>> cube.attributes = metadata
>>> print(cube)
unknown / (unknown)                 (-- : 3)
     Attributes:
          Conventions: CF-1.6
          featureType: timeSeries
>>> iris.FUTURE.netcdf_no_unlimited=True
>>> iris.save(cube, 'tmp.nc')
>>> cube = iris.load_cube('tmp.nc')
>>> print(cube)
unknown / (1)                       (-- : 3)
     Attributes:
          Conventions: CF-1.5
          featureType: timeSeries
@ocefpaf
Copy link
Member Author

ocefpaf commented Sep 6, 2016

I guess that even though reading 1.6 is OK saving will always be 1.5. Closing then.

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