[netcdf-java] [Q] Type mismatch between attribute value and variable for unsigned byte data?


  ToolsUI ncdump returns negative values for unsigned byte attribute
values from the following OPeNDAP resource:


    Along_swath_lines_500m = 4060;
    Cross_swath_pixels_500m = 2708;
    byte Snow_Cover(Along_swath_lines_500m=4060, Cross_swath_pixels_500m=2708);
      :_Unsigned = "true";
      :coordinates = "Latitude Longitude";
      :long_name = "Snow covered land";
      :units = "none";
      :format = "I3";
      :coordsys = "cartesian";
      :valid_range = 0B, -2B; // byte
      :_FillValue = -1B; // byte

  Should this be regarded OK because java-netcdf explicitly set
_Unsigned = "true"?

  Or is it the problem of netcdf-java client (like IDV/Panoply) if the
client cannot visualize this data properly? Here, I assume that
java-client misinterpreted valid_range attribute values [0B, -2B] as
they are without checking the _Unsigned = "true".

  Or should the hdf4_handler add a special attribute _Unsigned=true?
If so, will  netcdf-java return correct valid_range = 0B, 254B?


Are your big (Earth) data in HDF(-EOS)?

  • 2014 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: