<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Stuart,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You are making an inventory by</div><div class="gmail_default" style="font-size:small"><br>   wgrib2 ecmwf_grib.grib2 > 1ecmwf.inv</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The inventory looks like</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail-aLF-aPX-K0-P6 gmail-aLF-aPX-av4-aPV" style="left: 140.7px; top: 56px;"><div class="gmail-aLF-aPX-K0-Jz" role="document" aria-label="Displaying 1ecmwf.inv" tabindex="0" style="text-align:left;width:999px;height:auto" dir="ltr"><pre class="gmail-aLF-aPX-K0-aPE">1:0:d=2022020200:var discipline=0 master_table=27 parmcat=0 parm=17:surface:anl:
2:609046:d=2022020200:var discipline=2 master_table=27 parmcat=0 parm=2:0-0.07 m below ground:anl:
3:1218092:d=2022020200:var discipline=0 master_table=27 parmcat=3 parm=5:250 mb:anl:<br>...<br><span class="gmail_default" style="font-size:small"><br><span style="font-family:arial,sans-serif">Normally "var discipline=X ...parm=Z"  would have a name like SKINT for the 1st line. TSOIL<br></span></span></pre><pre class="gmail-aLF-aPX-K0-aPE"><span style="font-family:arial,sans-serif"><span class="gmail_default" style="font-size:small">for the second name. Not having the variable name is very strange.  Did you get a development<br></span></span></pre><pre class="gmail-aLF-aPX-K0-aPE"><span style="font-family:arial,sans-serif"><span class="gmail_default" style="font-size:small">version from <a href="https://ftp.cpc.ncep.noaa.gov/wd51we/tmp/">https://ftp.cpc.ncep.noaa.gov/wd51we/tmp/</a>?  This version is for moving files<br></span></span></pre><pre class="gmail-aLF-aPX-K0-aPE"><span style="font-family:arial,sans-serif"><span class="gmail_default" style="font-size:small">between developer environments.  Maybe you are using a version when  "-name ECMWF"<br></span></span></pre><pre class="gmail-aLF-aPX-K0-aPE"><span style="font-family:arial,sans-serif"><span class="gmail_default" style="font-size:small">was being developed.  Did the wgrib2 source code come from github?  There is more than<br></span></span></pre><pre class="gmail-aLF-aPX-K0-aPE"><span style="font-family:arial,sans-serif"><span class="gmail_default" style="font-size:small">one github repository with wgrib2 source code.  Can you send me the build configuration?<br><br></span></span></pre><pre class="gmail-aLF-aPX-K0-aPE"><span style="font-family:arial,sans-serif"><span class="gmail_default" style="font-size:small">     $ wgrib2 -config<br><br></span></span></pre><pre class="gmail-aLF-aPX-K0-aPE"><span style="font-family:arial,sans-serif"><span class="gmail_default" style="font-size:small">Wesley<br></span></span></pre></div></div></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><span style="font-family:arial,sans-serif"><span class="gmail_default" style="font-size:small"></span>On Wed, Feb 2, 2022 at 4:32 PM CW Weather <<a href="mailto:weatherstu@chorleyweather.com">weatherstu@chorleyweather.com</a>> wrote:</span><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Tahoma,Arial,Helvetica,sans-serif">
<p>Thanks Wesley,</p>
<p><br></p>
<p>I've done as requested and run code as follows to inv the data with wgrib (windows user btw):</p>
<p><br></p>
<p>@ECHO Please wait, concentrating grb files...<br>cat *.grb > ecmwf_grib.grib2<br>@ECHO Please wait, creating ctl file...<br>perl <a href="http://g2ctl.pl" target="_blank">g2ctl.pl</a> -verf ecmwf_grib.grib2 > ecmwf_grib.ctl<br>@ECHO Please wait, creating idx file...<br>gribmap -i ecmwf_grib.ctl -e</p>
<p><br>wgrib2 ecmwf_grib.grib2 > 1ecmwf.inv<br>wgrib2 ecmwf_grib.grib2 -set_metadata 1ecmwf.inv -grib 1ecmwf_new.grib2<br>@ECHO Please wait, creating ctl file...<br>perl <a href="http://g2ctl.pl" target="_blank">g2ctl.pl</a> -verf 1ecmwf_new.grib2 > 1ecmwf_new_grib.ctl<br>@ECHO Please wait, creating idx file...<br>gribmap -i 1ecmwf_new_grib.ctl -e</p>
<p><br></p>
<p>However i get error creating the new ctl & new.grib2 with the inv, error - ***fatal error set_var: could not find var discipline=0 master_table27 parmcat=0 parm17***   </p>
<p><br></p>
<p>Inv attached as a text file, struggling to see why its an error tbh. </p>
<p><br></p>
<p>regards, </p>
<p>stu. </p>
<p><br></p>
<p><br></p>
<p id="gmail-m_-5170866927391868830reply-intro">On 02-02-2022 18:48, Wesley Ebisuzaki - NOAA Federal wrote:</p>
<blockquote type="cite" style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div id="gmail-m_-5170866927391868830replybody1">
<div dir="ltr">
<div dir="ltr">
<div style="font-size:small">Hi Stuart,</div>
<div style="font-size:small"> </div>
<div style="font-size:small"><span style="font-size:small"></span>|  but as you can see on the attached image the control file hasn't got the variable </div>
<div style="font-size:small">|  names or values correct and TP (total precip) isn't possible to fathom on the file.</div>
<div style="font-size:small">|  Ive managed to guess most variable like pressure, t2m wind ect.</div>
<div style="font-size:small"> </div>
<div style="font-size:small">You probably are using an old version of wgrib2 which doesn't include a</div>
<div style="font-size:small">copy of the ECMWF grib tables.  Try to get wgrib2 v3.1.0 which includes</div>
<div style="font-size:small">more of the ECMWF table.</div>
<div style="font-size:small"> </div>
<div>W<span style="font-size:small">grib2 v3.1.0 can use the ECMWF grib names (-names ECMWF) with some</span></div>
</div>
<div><span style="font-size:small">limitations which are  given in</span></div>
<div><span style="font-size:small"> </span></div>
<div><span style="font-size:small">    <a href="https://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/names.html" rel="noopener noreferrer" target="_blank">https://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/names.html</a></span></div>
<div><span style="font-size:small"> </span></div>
<div><span style="font-size:small">However, g2ctl and alt_g2ctl haven't been updated to use ecmwf or dwd names.</span></div>
<div><span style="font-size:small">So you will have to use the ncep names or change the .ctl to use other names.<br></span></div>
<div><span style="font-size:small"> </span></div>
<div><span style="font-size:small">Wesley <br></span></div>
<div><span style="font-size:small"> </span></div>
<div><span style="font-size:small"> </span></div>
<div dir="ltr">
<div>
<div dir="ltr">On Wed, Feb 2, 2022 at 11:10 AM CW Weather <<a href="mailto:weatherstu@chorleyweather.com" rel="noreferrer" target="_blank">weatherstu@chorleyweather.com</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="font-size:10pt;font-family:Tahoma,Arial,Helvetica,sans-serif">
<p>Hi Bill, </p>
<p>Yes i've scrolled through the page and that's where I found out you can call for single parameters but through the bytes in the idx file, which is useless unless you use python i suspect. </p>
<p><br></p>
<p>Thanks all the same,</p>
<p><br></p>
<p>Stu</p>
<p><br></p>
<p><br></p>
<p><br></p>
<p id="gmail-m_-5170866927391868830v1gmail-m_-3020649830925695788gmail-m_-1321450097446092358reply-intro">On 02-02-2022 15:19, Bill Reilly wrote:</p>
<blockquote style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div style="margin:0px;padding:0px;font-family:monospace"><span style="white-space:nowrap">Hello:</span><br><br>I had a look and tried using the data as well but had problems, so I checked out the User Documentation page for this data:<br><br><span style="white-space:nowrap"><a href="https://confluence.ecmwf.int/display/UDOC/ECMWF+Open+Data+-+Real+Time" rel="noopener noreferrer" target="_blank">https://confluence.ecmwf.int/display/UDOC/ECMWF+Open+Data+-+Real+Time</a></span><br><br><span style="white-space:nowrap">Maybe something on that page is useful to you.</span><br><br>Bill<br><br><span style="white-space:nowrap">--</span><br><br><span style="white-space:nowrap">Bill Reilly</span><br><br><span style="white-space:nowrap">(+34) 686-110-748</span><br><br><span style="white-space:nowrap"><a href="mailto:bill@passageweather.com" rel="noreferrer" target="_blank">bill@passageweather.com</a></span><br><span style="white-space:nowrap"><a href="http://www.passageweather.com" rel="noopener noreferrer" target="_blank">www.passageweather.com</a></span><br><br><span style="white-space:nowrap">On 02/02/2022 11:49, CW Weather wrote:</span>
<blockquote style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px"><br><span style="white-space:nowrap">Hello all,</span><br><br><br>ECMWF have made some data freely available on top of the WMO data sets. The link is here <a href="https://data.ecmwf.int/forecasts/" rel="noopener noreferrer" target="_blank">https://data.ecmwf.int/forecasts/</a>. I have downloaded via wget for exmaple - <a href="https://data.ecmwf.int/forecasts/20220202/00z/0p4-beta/oper/20220202000000-6h-oper-fc.grib2" rel="noopener noreferrer" target="_blank">https://data.ecmwf.int/forecasts/20220202/00z/0p4-beta/oper/20220202000000-6h-oper-fc.grib2</a> and then run a simple perl command as follows;<br><br><span style="white-space:nowrap">@ECHO Please wait, concetenating grb files...</span><br><span style="white-space:nowrap">cat *.grb > ecmwf_grib.grib2</span><br><span style="white-space:nowrap">@ECHO Please wait, creating ctl file...</span><br><span style="white-space:nowrap">perl <a href="http://g2ctl.pl" rel="noopener noreferrer" target="_blank">g2ctl.pl</a> -verf ecmwf_grib.grib2 > ecmwf_grib.ctl</span><br><span style="white-space:nowrap">@ECHO Please wait, creating idx file...</span><br><span style="white-space:nowrap">gribmap -i ecmwf_grib.ctl -e</span><br><br><br><span style="font-size:small"></span>but as you can see on the attached image the control file hasn't got the variable names or values correct and TP (total precip) isn't possible to fathom on the file. Ive managed to guess most variable like pressure, t2m wind ect.<br><br><br>There is a way to download single variable per time step but you would have to input the length and/or bytes from the idx file for example - |wget <a href="https://data.ecmwf.int/forecasts" rel="noopener noreferrer" target="_blank">https://data.ecmwf.int/forecasts</a> <<a href="https://data.ecmwf.int/forecasts/20220202/00z/0p4-beta/oper/20220202000000-6h-oper-fc.grib2" rel="noopener noreferrer" target="_blank">https://data.ecmwf.int/forecasts/20220202/00z/0p4-beta/oper/20220202000000-6h-oper-fc.grib2</a>>/||20220125||/00z/0p4-beta/oper/||20220125000000||-24h-oper-fc.grib2 --header=||"Range: bytes=17459800-18068845"|<br><br>However the range values will change on every time step and every forecast and as such wont be viable to run automatically. I know its possible in python but like others I dont use python so my question is, is there a way to use wgrib or maybe .inv to breakdown the gribs into readable format using a perl code?<br><br><br>-- Kind regards,<br><br><span style="white-space:nowrap">*Stuart Markham*</span><br><br><span style="white-space:nowrap">//</span><br><br><span style="white-space:nowrap">/Founder of CW Weather/</span><br><br><span style="white-space:nowrap">/Website: <a href="http://chorleyweather.com" rel="noopener noreferrer" target="_blank">chorleyweather.com</a> <<a href="https://www.chorleyweather.com/" rel="noopener noreferrer" target="_blank">https://www.chorleyweather.com/</a>>/</span><br><br><br>_______________________________________________<br><span style="white-space:nowrap">gradsusr mailing list</span><br><span style="white-space:nowrap"><a href="mailto:gradsusr@gradsusr.org" rel="noreferrer" target="_blank">gradsusr@gradsusr.org</a></span><br><span style="white-space:nowrap"><a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noopener noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></span></blockquote>
<br>_______________________________________________<br><span style="white-space:nowrap">gradsusr mailing list</span><br><span style="white-space:nowrap"><a href="mailto:gradsusr@gradsusr.org" rel="noreferrer" target="_blank">gradsusr@gradsusr.org</a></span><br><span style="white-space:nowrap"><a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noopener noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></span></div>
</blockquote>
<p><br></p>
<div id="gmail-m_-5170866927391868830v1gmail-m_-3020649830925695788gmail-m_-1321450097446092358signature">-- <br>
<p>Kind regards,</p>
<p><b>Stuart Markham</b></p>
<p><i><img src="http://./?_task=mail&_id=128074833061faee7d0b28f&_action=display-attachment&_file=rcmfile30871643835005064685600" width="78" height="51"></i></p>
<p><i>Founder of CW Weather</i></p>
<p><i>Website: <a href="https://www.chorleyweather.com/" rel="noopener noreferrer" target="_blank">chorleyweather.com</a></i></p>
</div>
</div>
_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" rel="noreferrer" target="_blank">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noopener noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></blockquote>
</div>
</div>
</div>
</div>
<br>
<div style="margin:0px;padding:0px;font-family:monospace">_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noopener noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></div>
</blockquote>
<p><br></p>
<div id="gmail-m_-5170866927391868830signature">-- <br>
<p>Kind regards,</p>
<p><b>Stuart Markham</b></p>
<p><i><img src="cid:17ebfd69ca96dc6d4101" width="78" height="51"></i></p>
<p><i>Founder of CW Weather</i></p>
<p><i>Website: <a href="https://www.chorleyweather.com/" target="_blank">chorleyweather.com</a></i></p>
</div>
</div>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div></div>