If I attempt to open a dataset produced by cdscan from a group of netCDF files containing a variable of type unsigned byte, the cdms2.open() function fails with the exception "TypeError: 'Not implemented for this type'". The unsigned byte type is interpreted as character type and the values are converted to single-character strings. The exception is thrown at line 136 in the file avariable.py when numpy.isnan() is called with the value of the missing_value attribute for the variable, which has been converted into a string, as an argument. CDL for the variable in question is included below. This variable is not being used by the calling code, but it is processed by the cdms2.open() function because it is present in the files. The problem is not seen when opening an individual netCDF file from group (as opposed to opening the cdscan XML output file).
byte qa_of_seaice_conc_cdr(time=1, ygrid=448, xgrid=304);
:_FillValue = 0B; // byte
:valid_range = 1S, 255S; // short
:_Unsigned = "true";
:long_name = "Passive Microwave Daily Northern Hemisphere Sea Ice Concentration QC flags";
:standard_name = "sea_ice_area_fraction status_flag";
:coordinates = "longitude latitude time";
:flag_masks = 1B, 2B, 4B, 8B, 32B, -128B; // byte
:flag_meanings = "BT_source_for_CDR NT_source_for_CDR no_ice_allowed_per_climatology grid_cell_near_to_coast concentration_below_fifty_percent melt_start_detected";
:missing_value = 0B; // byte
:datum = "+ellps=urn:ogc:def:crs:EPSG::4326";
:grid_mapping = "projection";
If I attempt to open a dataset produced by cdscan from a group of netCDF files containing a variable of type unsigned byte, the cdms2.open() function fails with the exception "TypeError: 'Not implemented for this type'". The unsigned byte type is interpreted as character type and the values are converted to single-character strings. The exception is thrown at line 136 in the file avariable.py when numpy.isnan() is called with the value of the missing_value attribute for the variable, which has been converted into a string, as an argument. CDL for the variable in question is included below. This variable is not being used by the calling code, but it is processed by the cdms2.open() function because it is present in the files. The problem is not seen when opening an individual netCDF file from group (as opposed to opening the cdscan XML output file).