-
Notifications
You must be signed in to change notification settings - Fork 2
Actual prototype of AS input parameters construction starting from a netCDF4 file, going via Zarr #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bnlawrence
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer that rather than changing the test, you added a test with the new functionality. (At some point we actually want to run these tests).
Also, it would be good eventually if the "business code" was in methods of Active rather than in the tests themselves. The business code following your changes here could skip the actual operation, the first desired result would be to return the numbers (version=1 in Active) ... although the code here is sort. of version -1 (return the addresses and shapes which we need to use to load the numbers).
|
(We also need to ensure that somewhere one of our methods inspects the variable to find out what type it is, so we know how to interpret the bytes coming back from the offsets, range, size -> shape steps.) |
|
@bnlawrence very good points indeed! I'll be tweaking this today. The info on the variable should be encoded in the reference dict that kerchunk spits out - at the moment parts of it are either ignored or hardcoded in my implementation, which is not good, but will change. One thing I am still struggling with - and have to inspect kerchunk to understand - is how do we read the file in kerchunk without the need for the file to be on the client disk |
|
@bnlawrence @davidhassell I think we've finally got to town with this: here's the stack explained:
This basically sets the streamlined stack for what we need to do, I am rather happy with it 😆 Would you have some time look at it and we can discuss it with voice! |
So this isa a somewhat changed setup of the test that @bnlawrence wrote but this PR achies the following:
kerchunk, and is currently impressively ugly;slice_coords: (offset, size)of each needed slice directly from Zarr, while fooling Zarr that it doesn't need data, all it needs is data structure (chunks, data shape, data type etc) and love;