NOAA-EMC / NCEPLIBS-g2c

This library contains C decoder/encoder routines for GRIB edition 2.
Other
17 stars 11 forks source link

ECMWF GRIB Decode Success with new AEC/CCSDS Library? #461

Open JKrobNESDIS opened 7 months ago

JKrobNESDIS commented 7 months ago

All,

With the release of the new AEC/CCSDS Decode Library, I have been trying to decode the public ECMWF GRIB data...with no success.

https://data.ecmwf.int/forecasts/

Function m_split in 'decode.c' keeps responding with "return M_ERROR - 5"

I'm calling g2c_aecunpackf from the fortran gf_unpack.f & I can see all my arguments are passed intact so....

If someone could test out the ECMWF GRIB from the pure C routines to confirm/deny whether it works correctly would be most helpful.

Thanks in advance, Jeff Krob NOAA/NESDIS

EricEngle-NOAA commented 7 months ago

Hi @JKrobNESDIS, can you pass along or point me to the ECMWF GRIB2 files you are working with? Even if just 1 message from the file?

EricEngle-NOAA commented 7 months ago

@JKrobNESDIS I quickly read earlier and did not notice the link. I will download a file and take a look.

EricEngle-NOAA commented 7 months ago

I have been looking at this over the last couple of days. I can confirm that this is a bug in the implementation of the AEC compression in the g2c library. I have identified the bug and am working a fix immediately.

@edhartnett would we be able to issue a v1.8.1 patch release?

edwardhartnett commented 6 months ago

We can do a new release if you need it.

JKrobNESDIS commented 6 months ago

Edward, Eric,

I've been following this thread & am I correct to presume the issue has been fixed & the ECMWF GRIB data processes correctly? Because I put Eric's changes in 'aecunpack.c' into my code...and still get the same errors returned...just checking.

Thanks, Jeff

On Fri, Dec 15, 2023 at 8:29 AM Edward Hartnett @.***> wrote:

We can do a new release if you need it.

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-g2c/issues/461#issuecomment-1857883497, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBCEF7EIY72GUAIIFEN655DYJRGB3AVCNFSM6AAAAABACU7DOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJXHA4DGNBZG4 . You are receiving this because you were mentioned.Message ID: @.***>

EricEngle-NOAA commented 6 months ago

Hi @JKrobNESDIS. Would you be willing to share your code? Or least the portion that does the ECMWF GRIB2 reading/unpacking using g2c?

JKrobNESDIS commented 6 months ago

Hey Eric,

How would I go about doing that without posting on GitHub?

Jeff

On Sun, Dec 17, 2023 at 11:01 AM Eric Engle @.***> wrote:

Hi @JKrobNESDIS https://github.com/JKrobNESDIS. Would you be willing to share your code? Or least the portion that does the ECMWF GRIB2 reading/unpacking using g2c?

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-g2c/issues/461#issuecomment-1859210142, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBCEF7HKZEVFAJ3PXU4BL2LYJ4JODAVCNFSM6AAAAABACU7DOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGIYTAMJUGI . You are receiving this because you were mentioned.Message ID: @.***>

EricEngle-NOAA commented 6 months ago

Feel free to share with me via NOAA email or through the NOAA Google Drive.

edwardhartnett commented 2 weeks ago

Should this issue be closed?

JKrobNESDIS commented 2 weeks ago

Hey Edward,

I have yet to get it to work for me with GRIB data from ECMWF. Every GRIB message processed consistently fails in the 'aec_decode' function. Since C is not my 'native language', I have no idea what the issue is. I was working with Eric Engle back in December with the issue...but it kinda fell by the wayside :-/ I don't know if anyone else has had success with this libaec library processing the ECMWF GRIB.

Thanks, Jeff

On Mon, Jun 17, 2024 at 2:58 AM Edward Hartnett @.***> wrote:

Should this issue be closed?

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-g2c/issues/461#issuecomment-2172441404, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBCEF7B7RT4BYWABDGGLOI3ZH2CHZAVCNFSM6AAAAABJNMN7VOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZSGQ2DCNBQGQ . You are receiving this because you were mentioned.Message ID: @.***>

JKrobNESDIS commented 2 weeks ago

Edward,

Details from above:

In function 'int aec_decode', the following 'do' loop is reporting an 'M_ERROR'

do { status = state->mode(strm); } while (status == M_CONTINUE);

Jeff

On Mon, Jun 17, 2024 at 5:35 AM Jeffrey Krob - NOAA Federal < @.***> wrote:

Hey Edward,

I have yet to get it to work for me with GRIB data from ECMWF. Every GRIB message processed consistently fails in the 'aec_decode' function. Since C is not my 'native language', I have no idea what the issue is. I was working with Eric Engle back in December with the issue...but it kinda fell by the wayside :-/ I don't know if anyone else has had success with this libaec library processing the ECMWF GRIB.

Thanks, Jeff

On Mon, Jun 17, 2024 at 2:58 AM Edward Hartnett @.***> wrote:

Should this issue be closed?

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-g2c/issues/461#issuecomment-2172441404, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBCEF7B7RT4BYWABDGGLOI3ZH2CHZAVCNFSM6AAAAABJNMN7VOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZSGQ2DCNBQGQ . You are receiving this because you were mentioned.Message ID: @.***>

EricEngle-NOAA commented 2 weeks ago

I will try to devote some time to this in the next couple of weeks. We are spinning up development on NBM v5.0.

JKrobNESDIS commented 2 weeks ago

Sounds great, thanks for the update! I appreciate the help.

Jeff

On Mon, Jun 17, 2024 at 8:00 AM Eric Engle @.***> wrote:

I will try to devote some time to this in the next couple of weeks. We spinning up development on NBM v5.0.

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-g2c/issues/461#issuecomment-2173196711, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBCEF7BQITIXGTMQU733N3TZH3FTXAVCNFSM6AAAAABJNMN7VOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTGE4TMNZRGE . You are receiving this because you were mentioned.Message ID: @.***>