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

createVariableCopy() upcasting variables open from cdml catalog files. #186

Closed
timbedin opened this Issue Jun 3, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@timbedin

timbedin commented Jun 3, 2013

Calling the createVariableCopy() method on a newly created file object seems to create a double rather than a float variable when the variable to copy is open from a cdml catalog.
For example -

import cdms2

incat = cdms2.open('catalog.xml', 'r')  # A catalog made with cdscan.
invar  = incat['var_name'] 
invar.dtype  # dtype(float32)

outfile = cdms2.open('newfile.nc', 'w')
outfile.createVariableCopy(invar)

outvar = outfile['var_name'] 
outvar.dtype # dtype(float64)

Thanks

@ghost ghost assigned doutriaux1 Jun 3, 2013

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Jun 3, 2013

Thx for pointing this out.

@doutriaux1 doutriaux1 added this to the 2.3 milestone Mar 2, 2015

@doutriaux1 doutriaux1 added the cdms2 label Mar 2, 2015

doutriaux1 added a commit that referenced this issue Aug 31, 2015

@doutriaux1 doutriaux1 closed this in 5cf7ff5 Sep 2, 2015

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