Skip to content
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

DRS Template 5.42 #204

Open
ghassan-alaka opened this issue Jun 28, 2023 · 2 comments
Open

DRS Template 5.42 #204

ghassan-alaka opened this issue Jun 28, 2023 · 2 comments

Comments

@ghassan-alaka
Copy link

ghassan-alaka commented Jun 28, 2023

Describe the bug
ECMWF recently upgraded the GRIB2 compression method to CCSDS (using data representation template 5.42). This is resulting in an error while attempting to read ECMWF-produced GRIB2 files in NCL. NCL does not exit with this error, but my script quickly fails because no GRIB2 data is actually read. The full error is:

getdrstemplate: DRS Template 5.42 not defined.
warning:Error unpacking GRIB record section 5.

Provide the following:

  • NCL script:
f=addfile("/DATA/PATH/20230627120000-0h-oper-fc.grib2","r")
print(f)

Computing environment

  • OS: Linux (NOAA)
  • OS version: CentOS Linux 7 (Core)
  • NCL Version: 6.6.2
  • Installation method: binary from NCAR website

Additional context
I think this problem might be resolved by adding the correct table information in this sub-directory, but I'm not sure exactly what to change/add:
${NCARG_ROOT}/lib/ncarg/grib2_codetables/ecmwf/5/

I am in the process of migrating from NCL to Python. It would be nice to continue to process ECMWF data using NCL until that migration is complete.

@ghassan-alaka
Copy link
Author

NCL uses g2clib to read GRIB2. Does anyone know if g2clib can currently handle the CCSDS compression method? If so, how would I make that updated library available in NCL v6.6.2?

@cacraig
Copy link

cacraig commented Jul 2, 2023

Found this on a google search, as I ran into this issue as well (not with NCL, but with GDAL). Looks like you can use the ecCodes tool to decompress the data and get it into a usable format by NCL or GDAL or whatever.

grib_set -r -w packingType=grid_ccsds -s packingType=grid_simple ccsds_compressed_grib.grib output.grib

Hope this workaround helps you, and other strangers that search for this issue.

rouault added a commit to rouault/gdal that referenced this issue Jul 17, 2023
rouault added a commit to rouault/gdal that referenced this issue Jul 21, 2023
elpaso pushed a commit to elpaso/gdal that referenced this issue Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants