Attempt to kerchunk classic netcdf file not working. #55
-
I'm trying to get started with some of the concepts used by this project. I was able to do some simple things with xarray and xpublish, but all my attempts to use kerchunk have failed so far. For example, looking at this file: When I check it with ncdump -k it says "classic" so I try:
I get the following error: TIA |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You need to open it with "rb" mode because it is a binary file. You also may need to use the latest GitHub revision of the main branch because we had to submit a few PRs to properly process legacy netcdf3 files |
Beta Was this translation helpful? Give feedback.
-
Thank you... Is this what you mean by "the latest version of the main branch'?
I started with 'rb' as below, but the mode is already set in the call internal to kerchunk.
File "/home/users/rhs/kerchunk/kerchunk/kerchunk/netCDF3.py", line 64, in init The mode is set here:
Using kerchunk source, and removing the mode from that line and passing in 'rb', returns an error:
So, I'm still stuck. Thanks, |
Beta Was this translation helpful? Give feedback.
Ah right, i remember now.
NetCDF3ToZarr
uses fsspec internally, so you only have to pass the filename and storage options are optional. I got stuck on this when first using the netcdf3 function too, its definitely inconsistent. I just downloaded your file and was successful using this code: