[gradsusr] Gribmap error with ECMWF open data
Robert Hart
rhart at fsu.edu
Sun Jul 23 20:52:52 EDT 2023
For those interested in an alternative (hopefully temporary) solution, the eccodes package from ECMWF provides the grib_set command which allows you to convert the AEC/CCSDS-compressed grib2 file into one that wgrib2/g2ctl/grads can read. My experience is that no compilation is required to install eccodes on most OSs, as most package managers (yum, etc) have it compiled as needed already.
Once installed, the command to convert the grib2 file is:
grib_set -r -w packingType=grid_ccsds -s packingType=grid_simple input.grib2 output.grib2
This conversion leads to a near doubling of the file size given the destination packing type is "simple". Perhaps other destination packing types available by grib_set compatible with wgrib2/g2ctl/grads can produce smaller files.
This command has worked reliably for me, but I cannot speak for its lifetime support.
Best,
Bob Hart, FSU
________________________________
From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Andrew Revering <andy at f5data.com>
Sent: Wednesday, June 28, 2023 11:12 PM
To: GrADS Users Forum <gradsusr at gradsusr.org>
Subject: Re: [gradsusr] Gribmap error with ECMWF open data
Wesley solved this problem for me.... I did the bold line of code below in his response to convert the file to a format readable by gribmap and it worked flawlessly. I didn't even have to recompile, my existing wgrib2 worked just fine.
Per Wesley Ebisuzaki at NOAA:
ECMWF has started distributing files using AEC compression. GrADS/gribmap use
NCEP's g2clib for reading grib2. AFAIK g2clib doesn't support AEC compression.
The work around is to get a version of wgrib2 that was built with AEC support.
The default build doesn't include AEC support because it requires a recent
version of CMake to build. Once you get a version of wgrib2 with AEC support,
you convert the file from AEC compression to something that GrADS supports.
wgrib2 IN.grb -set_grib_type c3 -grib_out OUT.grb
Unfortunately not all sites support CMake. For example, CMake is not
available on CPC local workstations.
I am not aware of any efforts to add AEC support to g2clib.
Wesley
PS building wgrib2
https://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/compile_questions.html<https://urldefense.com/v3/__https://geotrack.email/ext/l?idx=quKrbNPRrLCJcODnKcWv&ret=https*3A*2F*2Fwww.cpc.ncep.noaa.gov*2Fproducts*2Fwesley*2Fwgrib2*2Fcompile_questions.html__;JSUlJSUlJQ!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7hsWPUeiA$>
Andrew Revering
Convective Development, Inc.
dba F5Weather
Minneapolis, MN USA
http://www.f5weather.com/<https://urldefense.com/v3/__https://geotrack.email/ext/l?idx=quKrbNPRrLCJcODnKcWv&ret=http*3A*2F*2Fwww.f5weather.com*2F__;JSUlJQ!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7iJTGD-sg$>
[GeoTrack]<https://urldefense.com/v3/__https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7hEo0-Kqw$> Sender notified with GeoTrack<https://urldefense.com/v3/__https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7hEo0-Kqw$>
[GeoTrack]<https://urldefense.com/v3/__https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7hEo0-Kqw$> Sender notified with GeoTrack<https://urldefense.com/v3/__https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7hEo0-Kqw$>
On Wed, Jun 28, 2023 at 9:46 AM Brian Gaze <brianw.gaze at googlemail.com<mailto:brianw.gaze at googlemail.com>> wrote:
ECMWF has changed the encoding used in GRIB2 products as part of the recent upgrade. This appears to cause a problem for Gribmap, for example:
gribmap -i 81_2mtemp.grib.ctl
Returns:
gribmap: scanning GRIB2 file: 81_2mtemp.grib
getdrstemplate: DRS Template 5.42 not defined.
gribmap: ERROR! g2_getfld failed: ierr=12
This is gribmap for GrADS Version 2.1.a2.oga.1
Does anyone know a workaround or solution to this?
Brian
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr<https://urldefense.com/v3/__http://gradsusr.org/mailman/listinfo/gradsusr__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7jDIJIDNQ$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20230724/ade0fe7c/attachment-0001.html>
More information about the gradsusr
mailing list