Project

General

Profile

compressed short type results in _Numeric conversion not representable_

Added by Marco van Hulten about 5 years ago

I have files with short variables with offsets and scale factors, so for instance:

        short atmco2(time, y, x) ;
                atmco2:_FillValue = -32768s ;
                atmco2:valid_range = -32767s, 32767s ;
                atmco2:actual_range = 278., 278. ;
                atmco2:scale_factor = 1. ;
                atmco2:add_offset = 278. ;
                atmco2:units = "ppm" ;
                atmco2:long_name = "Atmospheric CO2" ;
                atmco2:coordinates = "plon plat" ;
                atmco2:cell_measures = "area: parea" ;

When I try to do cdo mergetime on such files, I get the netCDF error Numeric conversion not representable.

How can I handle such variables correctly?

I understand that these short types are used to save disk space (so it is a compression method), while still having a reasonable precision. I don't mind if my output files from CDO use more space.


Replies (2)

RE: compressed short type results in _Numeric conversion not representable_ - Added by Marco van Hulten about 5 years ago

With -b 64 the error is not given. I don't know why.

RE: compressed short type results in _Numeric conversion not representable_ - Added by Karin Meier-Fleischer about 5 years ago

Hi Marco,

the use of '-b 32' or '-b 64' convert the variable from type short to type float or double.

-Karin

    (1-2/2)