question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FillValue issues with kerchunk 1e37=> 9.99999993e+36

See original GitHub issue

In my original NetCDF4 file (HDF5 under the hood) the fill value _FillValue is set to 1.e+37 for 32bit floats, and when loaded into xarray with decode_cf=True, the data values with 1e37 are correctly interpreted as fill values and set to NaN.

In the kerchunk JSON, the _FillValue in the JSON is set to 9.99999993e+36 and when loaded into xarray with decode_cf=True, the data values are not interpreted as fill values, and show up as 9.99999993e+36 (not 1e37 and not NaN).

Pretty confused on what is going on here!

Here is a Reproducible Notebook

cc @peterm790

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:26 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
martindurantcommented, Jun 17, 2022

OK, so kerchunk is happy to fill in the _FillValue attribute. I anticipate that in any tool that is not xarray, or with cf decoding off, this will simply be ignored. I’ll make that change, we can rerun the fail case and see if all is good. Next week… 😃

1reaction
ajelenakcommented, Jun 17, 2022
with xarray.netcdf_and_cf_context as ds:
    answer = yes
Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found