NOAA-EMC / NCEPLIBS-g2

Utilities for coding/decoding GRIB2 messages.
Other
6 stars 15 forks source link

bug which causes problems for UPP but is fixed in wgrib2? #730

Open edwardhartnett opened 3 months ago

edwardhartnett commented 3 months ago

@webisu says:

Note: wgrib2 encode routines are aware of g2 decode bugs and can create WMO compliant grib2 that avoids the g2 decode bugs. The NCEP post is aware of the same g2lib bug and has code to avoid triggering the bug. Yes, the relevant person was informed of all bugs that I found.

Is this bug currently listed in the g2 issues list? Is it #46?

Everyone on NCEPLIBS team who worked on GRIB is now gone - retired. Whatever was communicated in the past via email is lost to us.

All bugs need to get an issue in the relevant repo to prevent loss of important info. If the bug you refer to is not #46, then can you identify it? We will fix it as soon as we know about it.

webisu commented 3 months ago

No. Problem #46 was fixed in wgrib2 (dec_png_clone.c) in 4/2021. Someone in DOD informed me about the problem in a separate email.

The problem that I alluded to dates back to 2008. You cannot blindly fix the problem without making a horrible mess.

https://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/g2clib.html

Wgrib2 has been printing warnings about this error for years. As a result people have learned to fix their code to avoid the wgrib2 errors.

Wesley

On Fri, Jul 5, 2024 at 9:45 AM Edward Hartnett @.***> wrote:

@webisu https://github.com/webisu says:

Note: wgrib2 encode routines are aware of g2 decode bugs and can create WMO compliant grib2 that avoids the g2 decode bugs. The NCEP post is aware of the same g2lib bug and has code to avoid triggering the bug. Yes, the relevant person was informed of all bugs that I found.

Is this bug currently listed in the g2 issues list? Is it #46 https://github.com/NOAA-EMC/NCEPLIBS-g2/issues/46?

Everyone on NCEPLIBS team who worked on GRIB is now gone - retired. Whatever was communicated in the past via email is lost to us.

All bugs need to get an issue in the relevant repo to prevent loss of important info. If the bug you refer to is not #46 https://github.com/NOAA-EMC/NCEPLIBS-g2/issues/46, then can you identify it? We will fix it as soon as we know about it.

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

webisu commented 3 months ago

The constant field bug probably wasn't added to github because it predates EMC's use of github. The problem with fixing the bug, you can have problems with reading decades of old files. If you fix the bug, then other people's software which assumed the bug existed would start to give bad results. The first step to fix the libraries so to avoid triggering the constant field bug (like wgrib2 and ncep post have done). As for fixing the reading of files with the constant field bug, good luck on that. You have decades of old grib files. The model reads in fixed grib files like climotologies. You will have to ensure that none are grib2 files with the constant field bug.

On Fri, Jul 5, 2024 at 9:45 AM Edward Hartnett @.***> wrote:

@webisu https://github.com/webisu says:

Note: wgrib2 encode routines are aware of g2 decode bugs and can create WMO compliant grib2 that avoids the g2 decode bugs. The NCEP post is aware of the same g2lib bug and has code to avoid triggering the bug. Yes, the relevant person was informed of all bugs that I found.

Is this bug currently listed in the g2 issues list? Is it #46 https://github.com/NOAA-EMC/NCEPLIBS-g2/issues/46?

Everyone on NCEPLIBS team who worked on GRIB is now gone - retired. Whatever was communicated in the past via email is lost to us.

All bugs need to get an issue in the relevant repo to prevent loss of important info. If the bug you refer to is not #46 https://github.com/NOAA-EMC/NCEPLIBS-g2/issues/46, then can you identify it? We will fix it as soon as we know about it.

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

edwardhartnett commented 3 months ago

@webisu you say:

The first step to fix the libraries so to avoid triggering the constant field bug (like wgrib2 and ncep post have done).

Can you tell me more about this?