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

Comments

Projects
None yet
1 participant
@doutriaux1
Member

doutriaux1 commented Jun 15, 2015

>>> 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

This comment has been minimized.

Member

doutriaux1 commented Oct 14, 2015

@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)

@doutriaux1 doutriaux1 closed this Oct 14, 2015

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