home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 719585877

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/4548#issuecomment-719585877 https://api.github.com/repos/pydata/xarray/issues/4548 719585877 MDEyOklzc3VlQ29tbWVudDcxOTU4NTg3Nw== 73609114 2020-10-30T14:29:48Z 2020-10-30T14:45:29Z NONE

Yes your sparse answer did help. But to apply the fix to all add_offset for the different DataArrays within the DataSet I have to loop through them. So what I am doing to 'open' a file is. ``` python ds = xr.open_dataset('XYZ.hdf.hdfeos',mask_and_scale=False, engine='pynio')

for dataarray in ds.data_vars: if hasattr(getattr(ds, dataarray),'add_offset'): fix_offset=-getattr(getattr(ds, dataarray),'add_offset')*(getattr(getattr(ds,dataarray),'scale_factor')) getattr(ds,dataarray).attrs['add_offset']=fix_offset

ds = xr.decode_cf(ds) ```

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