<div dir="ltr">Thanks David. Do I need to read the file as "binary" ?<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"><<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>></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 "ngac.t00z.aerf24.grib2" (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 <filename> | grep GRIB<br>
<br>
If this produces nothing then it's definitely not a GRIB file (of<br>
course the presence of "GRIB" 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 <filename> | egrep 'GRIB|7777'<br>
<br>
will produce alternating instances of 'GRIB' and '7777'. 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 "type of generating<br>
process". This is not the same as table 4.233 "Aerosol Type"<br>
and so the number 62006 in this context has nothing to do with 62006<br>
("Sulphate Dry") 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>
"Aerosol optical thickness" and based on the template there is another<br>
piece of metadata called "Aerosol Type" which is as documented in the<br>
"Aerosol Types" 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"><<a href="mailto:debasish.hazra5@gmail.com">debasish.hazra5@gmail.com</a>> wrote:<br>
> Hi Dennis,<br>
><br>
> The variables in the range 62000 to 62010 in the updated grib2 table<br>
> "<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>" are<br>
> "optical depth" and has no units associated with them.<br>
><br>
> 62000 Total Aerosol<br>
> 62001 Dust Dry<br>
> 62006 Sulphate Dry<br>
> 62008 Sea Salt Dry<br>
> 62009 Black Carbon Dry<br>
> 62010 Particulate Organic Matter Dry<br>
><br>
> 62010-62016 are mixing ratios in kg/kg<br>
><br>
> Debasish<br>
><br>
><br>
><br>
> On Tue, Jul 26, 2016 at 2:13 PM, Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br>
>><br>
>> Again, I will forward this. please send to ncl-talk. Otherwise, I am just<br>
>> a middleman forwarding the emails.<br>
>><br>
>> Usually the GRIB tables have units:<br>
>><br>
>> Examples:<br>
>> <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>
>> <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>
>><br>
>> NCL ... see GRIB section<br>
>> See:<br>
>> <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>
>><br>
>> On Tue, Jul 26, 2016 at 12:05 PM, Debasish Hazra<br>
>> <<a href="mailto:debasish.hazra5@gmail.com">debasish.hazra5@gmail.com</a>> wrote:<br>
>>><br>
>>> The link updated grib2 table is here :<br>
>>><br>
>>> <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>
>>><br>
>>> Thanks<br>
>>> Debasish<br>
>>><br>
>>> On Tue, Jul 26, 2016 at 1:33 PM, Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br>
>>>><br>
>>>> The issue is that the NGAC grib tables are not publicly available.<br>
>>>> If you know of where they are located, they can be included within NCL<br>
>>>><br>
>>>> In fact, there is a JIRA ticket on this:<br>
>>>><br>
>>>> [JIRA] (NCL-2442) GRIB-2: warning: Entry (not found in code table file<br>
>>>> .../grib2_codetables/ncep/4/4.3.table<br>
>>>><br>
>>>> Just yesterday, a comment was made on this ticket:<br>
>>>><br>
>>>> ---------<br>
>>>><br>
>>>> Unfortunately the "not found in code table file" errors<br>
>>>> that Dennis reported in this ticket cannot be corrected<br>
>>>> because the entries for that were not found are not documented<br>
>>>> by the NCEP GRIB2 web pages. Table 4.3 contains the generating process<br>
>>>> mapping. The values found in the file, all in the range 62000 to 62016,<br>
>>>> probably refer to local "generating processes" related to the NGAC<br>
>>>> model.<br>
>>>> If documentation can be found to describe these I would be happy to add<br>
>>>> them to the tables.<br>
>>>><br>
>>>> The other option to get rid of these admittedly annoying<br>
>>>> messages might be to just not print the warnings for this piece of<br>
>>>> metadata<br>
>>>> since it is not usually of that much interest to the data consumer. I<br>
>>>> would<br>
>>>> be happy to consider this.<br>
>>>><br>
>>>> ---------<br>
>>>> Note: the *values* returned by NCL are correct. The meta data is not<br>
>>>> because the<br>
>>>> NCEP GRIB2 web pages are not available.<br>
>>>><br>
>>>> --------<br>
>>>><br>
>>>> Again, if you know where the appropriate tables are located, please send<br>
>>>> to ncl-talk.<br>
>>>><br>
>>>> THX<br>
>>>><br>
>>>> On Tue, Jul 26, 2016 at 11:21 AM, Debasish Hazra<br>
>>>> <<a href="mailto:debasish.hazra5@gmail.com">debasish.hazra5@gmail.com</a>> wrote:<br>
>>>>><br>
>>>>> Hi,<br>
>>>>><br>
>>>>> I am trying to read grib2 file with ncl (v6.3) and it shows the<br>
>>>>> following error while trying to open it:<br>
>>>>><br>
>>>>> fatal:An internal error has occurred. The file format requested does<br>
>>>>> not appear to be supported, could not open (ngac.t00z.aerf24.grib2)<br>
>>>>> Variable: f<br>
>>>>> Type: file<br>
>>>>> (0) File Missing Value : -1<br>
>>>>><br>
>>>>> I kept the data file in ftp. Any help on this is appreciated.<br>
>>>>><br>
>>>>> Thanks.<br>
>>>>> Debasish<br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> ncl-talk mailing list<br>
>>>>> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
>>>>> List instructions, subscriber options, unsubscribe:<br>
>>>>> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
>>>>><br>
>>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> ncl-talk mailing list<br>
>>> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
>>> List instructions, subscriber options, unsubscribe:<br>
>>> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
>>><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
><br>
</div></div></blockquote></div><br></div>