<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
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. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Once installed, the command to convert the grib2 file is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">grib_set -r -w packingType=grid_ccsds -s packingType=grid_simple<span class="ContentPasted0"> input.grib2 </span></span><span style="font-family: Calibri, sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">output.grib2</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">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.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div style="color: rgb(0, 0, 0);" class="elementToProof"><font face="Calibri, sans-serif"><span style="font-size: 14.6667px;">This command has worked reliably for me,  but I cannot speak for its lifetime support.</span></font></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">Best,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">Bob Hart, FSU </span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<span class="_Entity _EType_OWA_VirtualEdit_Placeholder _EId_OWA_VirtualEdit_Placeholder _EReadonly_0" style="height: 21px;"><br>
</span>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> gradsusr <gradsusr-bounces@gradsusr.org> on behalf of Andrew Revering <andy@f5data.com><br>
<b>Sent:</b> Wednesday, June 28, 2023 11:12 PM<br>
<b>To:</b> GrADS Users Forum <gradsusr@gradsusr.org><br>
<b>Subject:</b> Re: [gradsusr] Gribmap error with ECMWF open data</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div><font face="arial, sans-serif">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.</font></div>
<font face="arial, sans-serif">
<div><font face="arial, sans-serif"><br>
</font></div>
Per Wesley <span style="color:rgb(31,31,31)">Ebisuzaki at NOAA:</span></font>
<div><br>
</div>
<div>
<div class="x_gmail_default">ECMWF has started distributing files using AEC compression.  GrADS/gribmap use</div>
<div class="x_gmail_default">NCEP's g2clib for reading grib2. AFAIK g2clib doesn't support AEC compression.</div>
<div class="x_gmail_default"><br>
</div>
<div class="x_gmail_default">The work around is to get a version of wgrib2 that was built with AEC support.</div>
<div class="x_gmail_default">The default build doesn't include AEC support because it requires a recent</div>
<div class="x_gmail_default">version of CMake to build.  Once you get a version of  wgrib2 with AEC support,</div>
<div class="x_gmail_default">you convert the file from AEC compression to something that GrADS supports.</div>
<div class="x_gmail_default"><br>
</div>
<div class="x_gmail_default">   <b>wgrib2 IN.grb -set_grib_type c3 -grib_out OUT.grb</b></div>
<div class="x_gmail_default"><br>
</div>
<div class="x_gmail_default">Unfortunately not all sites support CMake.  For example, CMake is not</div>
<div class="x_gmail_default">available on CPC local workstations.</div>
<div class="x_gmail_default"><br>
</div>
<div class="x_gmail_default">I am not aware of any efforts to add AEC support to g2clib.</div>
<div class="x_gmail_default"><br>
</div>
<div class="x_gmail_default">Wesley</div>
<div class="x_gmail_default"><br>
</div>
<div class="x_gmail_default">PS  building wgrib2</div>
<div class="x_gmail_default"><a href="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$" target="_blank">https://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/compile_questions.html</a></div>
<div class="x_gmail_default"><br>
</div>
<div class="x_gmail_default"><br>
</div>
<div class="x_gmail_default"><br>
</div>
<div class="x_gmail_default"><br>
</div>
<div>
<div dir="ltr" class="x_gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div dir="ltr" style="font-size:small">Andrew Revering</div>
<div dir="ltr" style="font-size:small">Convective Development, Inc.<br>
<div><span style="font-size:12.8px">dba F5Weather</span></div>
<div>Minneapolis, MN USA<span style="font-size:12.8px"><br>
</span></div>
<div><a href="https://urldefense.com/v3/__https://geotrack.email/ext/l?idx=quKrbNPRrLCJcODnKcWv&ret=http*3A*2F*2Fwww.f5weather.com*2F__;JSUlJQ!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7iJTGD-sg$" target="_blank" style="color:rgb(17,85,204)">http://www.f5weather.com/</a></div>
</div>
</div>
</div>
</div>
<br>
<div>
<div>
<table border="0" cellpadding="8" cellspacing="0">
<tbody>
<tr id="x_m_-9058100891220814463trSig">
<td style="vertical-align:middle; padding:0"><a href="https://urldefense.com/v3/__https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7hEo0-Kqw$" target="_blank" style="text-decoration:none"><img alt="GeoTrack" width="24" height="24" style="margin-top:5px" src="https://geotrack.email/img/icon32.png"></a></td>
<td style="vertical-align:middle; padding-left:3px"><span style="color:#777">Sender notified with</span>
<a href="https://urldefense.com/v3/__https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7hEo0-Kqw$" target="_blank" style="color:#b22222">
GeoTrack</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="x_geotrack-signature">
<table border="0" cellpadding="8" cellspacing="0" style="">
<tbody>
<tr id="x_trSig">
<td style="vertical-align:middle; padding:0"><a href="https://urldefense.com/v3/__https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7hEo0-Kqw$" style="text-decoration:none"><img alt="GeoTrack" width="24" height="24" style="margin-top:5px" src="https://geotrack.email/img/icon32.png"></a></td>
<td style="vertical-align:middle; padding-left:3px"><span style="color:#777">Sender notified with</span>
<a href="https://urldefense.com/v3/__https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7hEo0-Kqw$" class="x_geoLink" style="color:#b22222">
GeoTrack</a></td>
</tr>
</tbody>
</table>
</div>
</div>
<img class="x_trackfx" height="0" width="0" alt="12" title="tfx-quKrbNPRrLCJcODnKcWv-dG9ybmFkb2VzQGdtYWlsLmNvbQ==" src="https://geotrack.email/ext/quKrbNPRrLCJcODnKcWv.png?gtk=dG9ybmFkb2VzQGdtYWlsLmNvbQ%3D%3D"></div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Wed, Jun 28, 2023 at 9:46 AM Brian Gaze <<a href="mailto:brianw.gaze@googlemail.com" target="_blank">brianw.gaze@googlemail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">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:
<div><br>
</div>
<div>gribmap -i 81_2mtemp.grib.ctl<br>
</div>
<div><br>
</div>
<div>Returns:</div>
<div><br>
</div>
<div>gribmap: scanning GRIB2 file: 81_2mtemp.grib<br>
getdrstemplate: DRS Template 5.42 not defined.<br>
gribmap: ERROR! g2_getfld failed: ierr=12<br>
</div>
<div><br>
</div>
<div>This is gribmap for GrADS Version 2.1.a2.oga.1</div>
<div><br>
</div>
<div><br>
</div>
<div>Does anyone know a workaround or solution to this?</div>
<div><br>
</div>
<div>Brian </div>
</div>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="https://urldefense.com/v3/__http://gradsusr.org/mailman/listinfo/gradsusr__;!!PhOWcWs!1UpEfaSu3dA_2LlZHvg8AsmxkmMGPAwN10l25PCveGJo3jTPUUb30v696NmVgBPeu7jDIJIDNQ$" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote>
</div>
</div>
</body>
</html>