Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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)