<div dir="ltr">This file is fortran unformatted binary sequential, big endian, with varying record lengths. There are mixed data types, at least character and integer, probably also some floats, if I am not mistaken. The first record begins with the string "NEMSIO GFS bin4" which is likely a format identifier.<div><br></div><div>This is a custom made fortran file. This will be impossible to decode without some source documentation. NCL may have problems with the varying length records and mixed data types. This file was made for fortran access, not for NCL or other common climate software.</div><div><br></div><div>--Dave</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 7:40 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I don't know how this file is organized. I do know that the 'strings'<br>
tool outputs some stuff that looks like variable names at the<br>
beginning:<br>
<br>
strings ngac.t00z.aerf24 |more<br>
<br>
0NEMSIO GFS bin4<br>
<br>
bccmass bcdp001 bcdp002 bcem001<br>
bcem002 bceman bcembb bcembf<br>
bchyphil bcsd001 bcsd002 bcsmass<br>
bcsv001 bcsv002 bcwt001 bcwt002<br>
dmscmass dmssmass ducmass25 ducmass<br>
dudp001 dudp002 dudp003 dudp004<br>
dudp005 duem001 duem002 duem003<br>
duem004 duem005 dusd001 dusd002<br>
dusd003 dusd004 dusd005 dusmass25<br>
dusmass dusv001 dusv002 dusv003<br>
dusv004 dusv005 duwt001 duwt002<br>
duwt003 duwt004 duwt005 occmass<br>
ocdp001 ocdp002 ocem001 ocem002 oceman<br>
ocembb ocembf ocembg ochyphil<br>
ocsd001 ocsd002 ocsmass ocsv001<br>
ocsv002 ocwt001 ocwt002 so2cmass<br>
so2eman so2embb so2emve so2emvn<br>
so2smass so4cmass so4eman so4smass<br>
sscmass25 sscmass ssdp001 ssdp002<br>
ssdp003 ssdp004 ssdp005 ssem001<br>
ssem002 ssem003 ssem004 ssem005<br>
sssd001 sssd002 sssd003 sssd004<br>
sssd005 sssmass25 sssmass sssv001<br>
sssv002 sssv003 sssv004 sssv005<br>
sswt001 sswt002 sswt003 sswt004<br>
sswt005 sudp001 sudp002 sudp003<br>
sudp004 suem001 suem002 suem003<br>
suem004 supmsa supso2 supso4aq<br>
supso4g supso4wt susd001 susd002<br>
susd003 susd004 susv001 susv002<br>
susv003 susv004 suwt001 suwt002<br>
suwt003 suwt004<br>
<br>
atmos col atmos col atmos col atmos col atmos<br>
col atmos col atmos col atmos col atmos col<br>
atmos col atmos col atmos col atmos col<br>
atmos col atmos col atmos col atmos col atmos<br>
col atmos col atmos col<br>
<br>
.....<br>
<br>
The "bin4" at the beginning suggests maybe that it is 4 byte floats,<br>
but other than than I have no idea.<br>
<br>
I think you will need to find some explanation of the contents of this<br>
file from the people who created it.<br>
-dave<br>
<br>
<br>
On Tue, Jul 26, 2016 at 7:16 PM, Debasish Hazra<br>
<<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>> wrote:<br>
> Thanks David. Do I need to read the file as "binary" ?<br>
><br>
> Debasish<br>
><br>
> On Tue, Jul 26, 2016 at 6:12 PM, David Brown <<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</a>> wrote:<br>
>><br>
>> 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<br>
>> 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>
>> <<a href="mailto:debasish.hazra5@gmail.com" target="_blank">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" target="_blank">shea@ucar.edu</a>> wrote:<br>
>> >><br>
>> >> Again, I will forward this. please send to ncl-talk. Otherwise, I am<br>
>> >> 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>
>> >><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" target="_blank">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" target="_blank">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<br>
>> >>>> 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<br>
>> >>>> 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<br>
>> >>>> process<br>
>> >>>> mapping. The values found in the file, all in the range 62000 to<br>
>> >>>> 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<br>
>> >>>> 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<br>
>> >>>> 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" target="_blank">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></blockquote></div></div></div></div>