home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 443284388

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/2583#issuecomment-443284388 https://api.github.com/repos/pydata/xarray/issues/2583 443284388 MDEyOklzc3VlQ29tbWVudDQ0MzI4NDM4OA== 2448579 2018-11-30T17:51:18Z 2018-11-30T17:51:18Z MEMBER

The problem is that attrs['_Unsigned'] = 'false' which always triggers UnsignedIntegerCoder https://github.com/pydata/xarray/blob/0d6056e8816e3d367a64f36c7f1a5c4e1ce4ed4e/xarray/coding/variables.py#L269

That line expects unsigned to be bool and ends up casting the signed integer to an unsigned integer and things go haywire.

opendap is setting the _Unsigned attribute but it isn't present in the downloaded file.

ncdump -h http://www.ncei.noaa.gov/thredds/dodsC/avhrr-patmos-x-cloudprops-noaa-asc-fc/files/2003/patmosx_v05r03_NOAA-17_asc_d20030101_c20140314.nc byte cloud_fraction(time, latitude, longitude) ; cloud_fraction:_Unsigned = "false" ; cloud_fraction:standard_name = "cloud_area_fraction" ; cloud_fraction:long_name = "cloud fraction computed over a 3x3 pixel array at the native resolution centered on this pixel" ; cloud_fraction:coordinates = "latitude longitude" ; cloud_fraction:actual_range = 0.f, 1.f ; cloud_fraction:valid_range = -127s, 127s ; cloud_fraction:scale_factor = 0.003937008f ; cloud_fraction:add_offset = 0.5f ; cloud_fraction:_FillValue = -128b ; cloud_fraction:scaled = 1b ; cloud_fraction:_ChunkSizes = 1, 361, 361 ;

ncdump -h patmosx_v05r03_NOAA-17_asc_d20030101_c20140314.nc byte cloud_fraction_uncertainty(time, latitude, longitude) ; cloud_fraction_uncertainty:long_name = "cloud fraction uncertainty computed over a 3x3 array" ; cloud_fraction_uncertainty:coordinates = "latitude longitude" ; cloud_fraction_uncertainty:actual_range = 0.f, 1.f ; cloud_fraction_uncertainty:valid_range = -127b, 127b ; cloud_fraction_uncertainty:scale_factor = 0.003937008f ; cloud_fraction_uncertainty:add_offset = 0.5f ; cloud_fraction_uncertainty:_FillValue = -128b ; cloud_fraction_uncertainty:scaled = 1b ;

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  386268842
Powered by Datasette · Queries took 159.825ms · About: xarray-datasette