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.region.domain: variable loses unit attribute #9

Closed
chengzhuzhang opened this issue Feb 23, 2017 · 2 comments
Closed

cdutil.region.domain: variable loses unit attribute #9

chengzhuzhang opened this issue Feb 23, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@chengzhuzhang
Copy link

After applying cdutil.region.domain, the transient variable lost the unit attributes

@doutriaux1
Copy link
Contributor

import cdms2
import cdutil
import vcs
vcs.download_sample_data_files
f=cdms2.open(vcs.sample_data+"/clt.nc")
s=f("clt")
AA = cdutil.region.AAZ()
s2=s(AA)
print s.units
print s2.units

fails with:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-14-5cf75df63c22> in <module>()
      7 s2=s(AA)
      8 print s.units
----> 9 print s2.units

AttributeError: 'TransientVariable' object has no attribute 'units'

@doutriaux1
Copy link
Contributor

actually loses all attributes from s

@doutriaux1 doutriaux1 added this to the 2.10 milestone May 8, 2017
@doutriaux1 doutriaux1 added the bug label May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants