-
Notifications
You must be signed in to change notification settings - Fork 2
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
Array Interface? #1
Comments
Hi, sorry for the late response. |
Ok my memory of how grib works is shaky, I've only really used it from Haskel years ago. How are you actually retrieving 2d raster data? |
I don't know how ecCodes works internally, and the GRIB standard is complicated. The interface ecCodes provides is basically an iterator that returns pointers to message handles, and get/set functions that take a message handle pointer, a string that is the key you want to get/set, and a pointer to an array. To get the 2d raster data, you iterate through the file (using the function Edited with more details |
Hi, I was pleased to find this package existed!
At some stage I want to add a GRIB wrapper to GeoData.jl, leveraging this package. It will give a common interface and conversion to NetCDF, GeoTiff, grd and other formats.
It's much easier to write a reliable interface, and do a lot of other things if there is already an
Array
interface wrapping access to the underlying data as if it is a regular julia array. This can still happen inside a safe function, dispatching on the type that is passed into the do block/anonymous function.NCDatasets.jl does this quite well for their
Variable
type:https://github.com/Alexander-Barth/NCDatasets.jl/blob/master/src/NCDatasets.jl#L1063-L1130
Anyway, just a thought if you are doing any more work on this package
Cheers
Edit: in case its not clear, using indexing woudl be to allow loading subsets of the data from disk without loading the whole file, which can be much quicker when you have to load a lot of files.
The text was updated successfully, but these errors were encountered: