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

cdutil climos fail on file variables. #1391

Closed
doutriaux1 opened this issue Jun 15, 2015 · 1 comment
Closed

cdutil climos fail on file variables. #1391

doutriaux1 opened this issue Jun 15, 2015 · 1 comment
Assignees
Milestone

Comments

@doutriaux1
Copy link
Contributor

>>> o3tor_anom = cdutil.ANNUALCYCLE.departures(o3tor) this is where I get the error. 


Here is the complete error stack:

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/usr/local/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cdutil/times.py", line 1303, in departures

    u=self.month_fix(slab)

  File "/usr/local/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cdutil/times.py", line 1257, in month_fix

    t.toRelativeTime("months since "+str(tc))

  File "/usr/local/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cdms2/axis.py", line 852, in toRelativeTime

    self[i]=tmp2

  File "/usr/local/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cdms2/axis.py", line 1903, in __setitem__

    return apply(self._obj_.setitem,(index,numpy.ma.filled(value)))

IOError: cdunif: write access to read-only file


The complete info for the "o3tor" variable is given below, just in case you think there is something wrong with the variable:
@doutriaux1 doutriaux1 self-assigned this Jun 15, 2015
@doutriaux1 doutriaux1 added this to the 2.3 milestone Jun 15, 2015
@doutriaux1
Copy link
Contributor Author

@durack1 I can't reproduce, the following works for me. Please re-open if you can still reproduce.

import cdms2
import cdat_info
import os
import cdutil

pth = cdat_info.get_sampledata_path()

print pth

f=cdms2.open(os.path.join(pth,"tas_dnm-95a.xml"))

s=f["tas"]

dep = cdutil.times.ANNUALCYCLE.departures(s)

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