-
Notifications
You must be signed in to change notification settings - Fork 83
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
scan_grib unable to process spectra data #540
Comments
This seems to be the most critical thing and we should try to understand what's going wrong. In what way was your alternative incomplete? It does mean streaming all the bytes rather than jumping to the next message, but that make no practical difference. |
This could be updated. AFAICT there's no obvious way to figure out what the related "coordinate" vars are, so we'll need some sort of hardcoding here. |
Thanks both for the quick response. @martindurant, swapping out _split_file in this way then generated a kerchunk reference for each grib message, but the co-ordinates, dimensions and data were still incorrect. @dcherian yes it's not obvious how the coordinate variables are constructed. I've spent some time today understanding the cfgrib implementation but haven't reached a point where I could do something similar within kerchunk. Below is my current understanding of how cfgrib generates coordinates and data dimensions.
This is about as far as I've gotten, I haven't gotten around to looking in detail at how the dataset is opened from this index, though there's the combination of header_dimensions and geo_dimensions. Geo dimensions are the usual lat, lon, while header dimensions are our missing frequencyNumber and directionNumber. See this section which starts with the header dimensions, then does the geo dimensions, then combines them. I think currently kerchunk only checks for lat and lon with m["Ny"] and m["Nx"], and additionally level after. |
Hi there! I've been processing 2D wave spectra grib files using kerchunk and have found that it doesn't correctly identify the coordinates, nor the dimensions of the data . The variable d2fd has the dimensions (directionNumber, frequencyNumber, latitude, longitude), so a 2D array per lat/lon point. Xarray and cfgrib read the data format correctly, but kerchunk does not. See the below,
cfgrib
kerchunk
I've been trying to understand the problem but unfortunately haven't reached a solution, here's a few things I've noticed though.
Any suggestions would be greatly appreciated!
The text was updated successfully, but these errors were encountered: