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

cdms2 (NetCDF) maximum dimension name length is 256 #158

Closed
doutriaux1 opened this issue Aug 16, 2017 · 1 comment
Closed

cdms2 (NetCDF) maximum dimension name length is 256 #158

doutriaux1 opened this issue Aug 16, 2017 · 1 comment
Assignees

Comments

@doutriaux1
Copy link
Contributor

import cdms2
import MV2

a = MV2.ones((12,12))
ax = cdms2.createAxis(MV2.arange(12))
ax.id = "1234567890"*26
print len(ax.id)
a.setAxis(0,ax)


with cdms2.open("bad.nc","w") as f:
    f.write(a)

seems to be limited by C variable MAX_NC_NAME which likely comes from NetCDF

@dnadeau4
Copy link
Contributor

/software/anaconda2/envs/tests/lib/python2.7/site-packages/cdms2/dataset.py:1452: UserWarning: axis name has more than 127 characters, name will be truncated
  warnings.warn(msg, UserWarning)
<cdms2.fvariable.FileVariable object at 0x7f5eb0761b90>

@doutriaux1 please close

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

2 participants