createVariableCopy() upcasting variables open from cdml catalog files. #186
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.
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)
The text was updated successfully, but these errors were encountered: