Closed gaci0703 closed 2 years ago
Hi @gaci0703,
Thanks for using JGribX!
It seems that the link you provided is a directory. For convenience, I'll use this particular file for testing this issue.
It appears that you're encountering a currently unsupported feature within a GDS. It seems that the number of points along a parallel (Ni) is being read as -1. This indicates that the GDS is a quasi-regular grid, with each row having a variable number of points along the parallel.
Interestingly, I also checked with zyGrib and it also fails with a similar error:
DBG Grib2Record.cpp: 103: Grib2Record(): Record 1: Ni=-1 Nj=73 terminate called after throwing an instance of 'std::bad_array_new_length' what(): std::bad_array_new_length
I guess they also do not support this :)
I'll need some time to add support for quasi-regular grids, will keep you posted!
Thank you so much for your quick response.
I will keep checking for your updates!!
Hi @gaci0703,
The quasi-regular grid implementation is almost complete, but sadly I see that there is another feature which is currently not supported (JPEG2000 packing in DRS). Once again, I need some more time to implement this.
Thank you. I am hoping that url that contains the grib2 files is helping you with the updates.
Hi @gaci0703,
I finally have a new version for you to test. Could you try it out? It requires JRE 8 or higher.
Hello @spidru, It works perfectly on the gfs wind data from this directory - https://tgftp.nws.noaa.gov/SL.us008001/ST.opnl/MT.gfs_CY.00/RD.20220705/PT.grid_DF.gr2/. When I try the new update on RAP or NAM wind data, I get the NoValidGribException. I would assume GFS, RAP, and NAM are all in the same format. https://tgftp.nws.noaa.gov/SL.us008001/ST.opnl/MT.rap_CY.06/RD.20220725/PT.grid_DF.gr2/ - for RAP and https://tgftp.nws.noaa.gov/SL.us008001/ST.opnl/MT.nam_AR.ak_CY.06/RD.20220725/PT.grid_DF.gr2/ for NAM
Hi @gaci0703,
Thanks for confirming that at least the original issue (i.e. unsupported quasi-regular grids and JPEG 2000 encoded data) has been resolved. I would therefore like to close this issue and kindly ask you to open a new one.
But to already give some feedback, I noticed that all 3 gr2 files you linked in your last message do not work for me. Could you resend them (in a new issue) as attachments? Thanks!
I opened a new issue - Thank you!!!
Merged to master with b99d8a5.
Hello. I currently pull my grib2 data from https://tgftp.nws.noaa.gov/SL.us008001/ST.opnl/MT.gfs_CY.00/RD.20220705/PT.grid_DF.gr2/. When I put this data into a GribFile, I get the NoValidGribException. I am using the current version of the JGribX.jar. After downloading one of these records from this url, I also checked using java -jar JGribX.jar -i grib2.grb and I get the same NoValidGribException. Can you please tell me what is wrong with this data?
Thank you.