-
Notifications
You must be signed in to change notification settings - Fork 74
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
grib2: Support for General Unstructured Grid (template 101) #1427
grib2: Support for General Unstructured Grid (template 101) #1427
Conversation
Test seems to fail after I updated the branch to the latest version, before it was fine. According to the log, the underlying reason seems to be:
|
First off, thank you for your contribution!
It looks like the gradle testcontainers ran into an issue pulling a base image from dockerhub due to too many unauthenticated requests - I will look into getting that fixed.
We run nightly integration testing that requires access to ~100 GiB of test data, and that set of extended test data would be a good place to store a file of that size. You can mark the test with With regards to your contribution, my immediate first thought is concerning |
Thanks! Regarding the test file, this is the copyright we should probably mention somewhere in a readme where the file is stored: “CC BY 4.0 Source: Deutscher Wetterdienst” Regarding the UnstructuredProjection, I created this because no other ProjectionImpl was really fitting. The grib2 template is “unstructured data” so it is explicitly not based on latitudes and longitudes. Also the UnstructuredProjection contains parameters vital for working with the unstructured data later and then be able to associate it with geo coordinates:
If another ProjectionImpl works better, please let me know, I’m open for suggestions. One more thing, I’ll send another commit right now that will improve reading compressed files by 300%. It’s just a small change and hope we can include it in this PR. |
PS: Regarding the performance improvement, it is basically using a BufferedReader... |
I've also prepared the test method for the real file and am waiting for you to let me know the file location. Thanks. |
Ok, now that I've pulled down your PR locally and played around with the sample GRIB message, I think I better see why you needed to go with In terms of the test dataset, use the following for the location:
|
Thank you. I'll push the changes in a minute.
Not exactly construct, but it is enough to find the needed information. As far as I understand it, the UUID corresponds to The grid itself consists of icosahedron and looks approximately like this: To map this to actual lat/lon variables one has to load another file and then use the same indices to get lat/lon. In the example link you load the file |
As far as I understand, in general there also could be other grid structures than icosahedron for unstructured data. |
Thank you for the additional information. I think at this point you have it right - this will at least allow users to load the data, and they will need to use more information to make full use of it. For now, I just don't see us shipping a 1.7 GiB netCDF file to be able to work with these particular files in geophysical space. Perhaps at some point in the future we will have a better way of dealing with the actual grid information, but that will take much more thought. Thank you again for your contribution! |
Thank you! Yes, and that one netCDF file is just for one specific grid specification and there are many others. |
Description of Changes
Added support for grib2 template 101 for General Unstructured Grid.
As this is unstructured data, there was no fitting projection, so I also added an UnstructuredProjection.
Added a unit test as well. One test is synthetic, so no file needed. There is a 2nd test method (testIconGrib2FileRead) prepared, but the file is 5.9 MB and so this is why I didn't enable it. Please advise on how to handle this.
Last but not least, the motivation for adding template 101 is that the ICON model of the German weather service (DWD) is using this template and otherwise those files cannot be read.
PR Checklist
until ready for review