<div dir="ltr">Thanks David. Do I need to read the file as &quot;binary&quot; ?<div><br></div><div>Debasish</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 6:12 PM, David Brown <span dir="ltr">&lt;<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am afraid there have been some misunderstandings.<br>
First of all the file &quot;ngac.t00z.aerf24.grib2&quot; (actually called<br>
ngac.t00z.aerf24 on the ftp site if anyone else wants to download it)<br>
is<br>
not a GRIB file at all. A simple test if you suspect something is not GRIB:<br>
<br>
strings &lt;filename&gt; | grep GRIB<br>
<br>
If this produces nothing then it&#39;s definitely not a GRIB file (of<br>
course the presence of &quot;GRIB&quot; does not prove it is a GRIB file).<br>
To digress for a moment, if it is a GRIB file then the command,<br>
<br>
strings &lt;filename&gt; | egrep &#39;GRIB|7777&#39;<br>
<br>
will produce alternating instances of &#39;GRIB&#39; and &#39;7777&#39;. These strings<br>
mark the beginning and end of each GRIB record. This is true for both<br>
GRIB 1 and 2.<br>
<br>
strings ngac.t00z.aerf24 |grep GRIB<br>
produces nothing so it is not GRIB.<br>
<br>
Second, the warning messages that are emitted when an ngac file that<br>
is valid GRIB is read by NCL such as:<br>
<br>
warning: Entry (62006) not found in code table file<br>
/Users/shea/devel/lib/ncarg/grib2_codetables/ncep/4/4.3.table<br>
<br>
refer to entries not found in table 4.3 which is &quot;type of generating<br>
process&quot;. This is not the same as table 4.233 &quot;Aerosol Type&quot;<br>
and so the number 62006 in this context has nothing to do with 62006<br>
(&quot;Sulphate Dry&quot;) in the Aerosol Type table<br>
<br>
62006 as a type of generating processing is not documented in the 4.3<br>
table and hence the message. Since type of generating process is<br>
usually of less concern to users I am considering eliminating the<br>
error message in this case.<br>
<br>
It is true that NCL does not yet make use of the 4.233 table. That is<br>
because it is an auxiliary table that needs to be used in the context<br>
of certain GRIB2 product templates that address aerosols. It does not<br>
contain actual parameters. Rather a parameter might be named, e.g.<br>
&quot;Aerosol optical thickness&quot; and based on the template there is another<br>
piece of metadata called &quot;Aerosol Type&quot; which is as documented in the<br>
&quot;Aerosol Types&quot; table. A small extension to our GRIB2 data model is<br>
required to handle these templates. We hope to implement it in time<br>
for 6.4.0 but that is not yet certain.<br>
 -dave<br>
<br>
<br>
On Tue, Jul 26, 2016 at 12:23 PM, Debasish Hazra<br>
<div class="HOEnZb"><div class="h5">&lt;<a href="mailto:debasish.hazra5@gmail.com">debasish.hazra5@gmail.com</a>&gt; wrote:<br>
&gt; Hi Dennis,<br>
&gt;<br>
&gt; The variables in the range  62000 to 62010 in the updated grib2 table<br>
&gt; &quot;<a href="http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-233.shtml" rel="noreferrer" target="_blank">http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-233.shtml</a>&quot; are<br>
&gt; &quot;optical depth&quot; and has no units associated with them.<br>
&gt;<br>
&gt; 62000 Total Aerosol<br>
&gt; 62001 Dust Dry<br>
&gt; 62006 Sulphate Dry<br>
&gt; 62008 Sea Salt Dry<br>
&gt; 62009 Black Carbon Dry<br>
&gt; 62010 Particulate Organic Matter Dry<br>
&gt;<br>
&gt; 62010-62016 are mixing ratios in kg/kg<br>
&gt;<br>
&gt; Debasish<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Jul 26, 2016 at 2:13 PM, Dennis Shea &lt;<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Again, I will forward this. please send to ncl-talk. Otherwise, I am just<br>
&gt;&gt; a middleman forwarding the emails.<br>
&gt;&gt;<br>
&gt;&gt; Usually the GRIB tables have units:<br>
&gt;&gt;<br>
&gt;&gt; Examples:<br>
&gt;&gt; <a href="http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/ncep_141.htm" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/ncep_141.htm</a><br>
&gt;&gt; <a href="http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/ecmwf_132.htm" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/ecmwf_132.htm</a><br>
&gt;&gt;<br>
&gt;&gt; NCL ... see GRIB section<br>
&gt;&gt; See:<br>
&gt;&gt; <a href="http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclFormatSupport.shtml" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclFormatSupport.shtml</a><br>
&gt;&gt;<br>
&gt;&gt; On Tue, Jul 26, 2016 at 12:05 PM, Debasish Hazra<br>
&gt;&gt; &lt;<a href="mailto:debasish.hazra5@gmail.com">debasish.hazra5@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The link updated grib2 table is here :<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; <a href="http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-233.shtml" rel="noreferrer" target="_blank">http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-233.shtml</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks<br>
&gt;&gt;&gt; Debasish<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Tue, Jul 26, 2016 at 1:33 PM, Dennis Shea &lt;<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; The issue is that the NGAC grib tables are not publicly available.<br>
&gt;&gt;&gt;&gt; If you know of where they are located, they can be included within NCL<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; In fact, there is a JIRA ticket on this:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; [JIRA] (NCL-2442) GRIB-2: warning: Entry (not found in code table file<br>
&gt;&gt;&gt;&gt; .../grib2_codetables/ncep/4/4.3.table<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Just yesterday, a comment was made on this ticket:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; ---------<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Unfortunately the &quot;not found in code table file&quot; errors<br>
&gt;&gt;&gt;&gt; that Dennis reported in this ticket cannot be corrected<br>
&gt;&gt;&gt;&gt; because the entries for that were not found are not documented<br>
&gt;&gt;&gt;&gt; by the NCEP GRIB2 web pages. Table 4.3 contains the generating process<br>
&gt;&gt;&gt;&gt; mapping. The values found in the file, all in the range 62000 to 62016,<br>
&gt;&gt;&gt;&gt; probably refer to local &quot;generating processes&quot; related to the NGAC<br>
&gt;&gt;&gt;&gt; model.<br>
&gt;&gt;&gt;&gt; If documentation can be found to describe these I would be happy to add<br>
&gt;&gt;&gt;&gt; them to the tables.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; The other option to get rid of these admittedly annoying<br>
&gt;&gt;&gt;&gt; messages might be to just not print the warnings for this piece of<br>
&gt;&gt;&gt;&gt; metadata<br>
&gt;&gt;&gt;&gt; since it is not usually of that much interest to the data consumer. I<br>
&gt;&gt;&gt;&gt; would<br>
&gt;&gt;&gt;&gt; be happy to consider this.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; ---------<br>
&gt;&gt;&gt;&gt; Note: the *values* returned by NCL are correct. The meta data is not<br>
&gt;&gt;&gt;&gt; because the<br>
&gt;&gt;&gt;&gt; NCEP GRIB2 web pages are not available.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; --------<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Again, if you know where the appropriate tables are located, please send<br>
&gt;&gt;&gt;&gt; to ncl-talk.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; THX<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Tue, Jul 26, 2016 at 11:21 AM, Debasish Hazra<br>
&gt;&gt;&gt;&gt; &lt;<a href="mailto:debasish.hazra5@gmail.com">debasish.hazra5@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I am trying to read grib2 file with ncl (v6.3) and it shows the<br>
&gt;&gt;&gt;&gt;&gt; following error while trying to open it:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; fatal:An internal error has occurred. The file format requested does<br>
&gt;&gt;&gt;&gt;&gt; not appear to be supported, could not open (ngac.t00z.aerf24.grib2)<br>
&gt;&gt;&gt;&gt;&gt; Variable: f<br>
&gt;&gt;&gt;&gt;&gt; Type: file<br>
&gt;&gt;&gt;&gt;&gt; (0) File Missing Value : -1<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I kept the data file in ftp. Any help on this is appreciated.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Thanks.<br>
&gt;&gt;&gt;&gt;&gt; Debasish<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; ncl-talk mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt;&gt;&gt;&gt;&gt; List instructions, subscriber options, unsubscribe:<br>
&gt;&gt;&gt;&gt;&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; ncl-talk mailing list<br>
&gt;&gt;&gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt;&gt;&gt; List instructions, subscriber options, unsubscribe:<br>
&gt;&gt;&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;<br>
</div></div></blockquote></div><br></div>