home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 828159821

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/5223#issuecomment-828159821 https://api.github.com/repos/pydata/xarray/issues/5223 828159821 MDEyOklzc3VlQ29tbWVudDgyODE1OTgyMQ== 6503378 2021-04-28T05:40:46Z 2021-04-28T05:40:46Z NONE

Please could I ask once more — forgive me if I'm missing something but I did ask this a week ago and still don't understand #5200 (comment):

Is there a specific reason _FillValue needs to be in the attrs? (I'm not a big netcdf user so there may be)

Sorry, overlooked that one. I'll dig in the simlab code.

Why is xarray not ignoring the _FillValue in attrs?

It's trying to serialize it, as it would any other attrs.

Ok, that would make sense if '_FillValue' would just be an ordinary attr. But it seems it is not. If I set it to a string 'NaT' netcdf complains.

``` lib/python3.8/site-packages/scipy/io/netcdf.py in _get_encoded_fill_value(self) 1030 """ 1031 if '_FillValue' in self._attributes: -> 1032 fill_value = np.array(self._attributes['_FillValue'], 1033 dtype=self.data.dtype).tobytes() 1034 if len(fill_value) == self.itemsize():

ValueError: could not convert string to float: b'NaT' ```

If I set it to 0 I do not get an error. But then - after reloading the netcdf file - my NaT becomes array(['1970-01-01T00:00:00.000000000'], dtype='datetime64[ns]')

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